This should do it!

Fixed conversion errors, and new ffmpeg builds (tested with >=v2.2.2)