Ensure encoding options are properly applied to encoders
The main change in this MR is to ensure we apply encoding options correctly. As it turns out, the FFmpeg API does something tricky with the options dictionary that resulted in us always using a null dictionary for options. So change that so we pass a properly constructed options dictionary instead.
The other commits are mostly about extra logging and some cleanup.
Edited by Arjen Hiemstra