Fix transcoding runtime errors and add ffmpeg hardware acceleration

This adds a `hwAccel` configuration toggle in the Transcoding section. Setting it to 1 enables `-hwaccel auto` in ffmpeg, but not all ffmpeg versions support it.

This also fixes runtime errors when:

* the "iPad" profile is selected;
* the source file contains multiple output streams.