When trying to execute the script under TrueNAS 12U1, I got an error that I would have to setup h/w transcoding manually even though I had set all of the variables up properly in my config file. The script ran fine and the install still worked as expected, just h/w transcoding wasn't setup by default.
I have a Xeon e-2176g with the embedded igpu, which has been enabled in the BIOS.