0
votes

I'm trying to convert an image file combined with an .mp3 file into an .mp4 suitable for displaying in Firefox on a webpage (using mediaelement.js). I've found various guides that suggest using -pix_fmt yuv420p, but I get an error message of "Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height". Here is the exact command I'm using:

ffmpeg -loop 1 -framerate 2 -i byu-utah.png -i nfl.mp3 -c:v libx264 -preset medium -tune stillimage -crf 18 -c:a copy -shortest -pix_fmt yuv420p byu-utah.mp4

Files can be downloaded here:

http://www.chcs-ut.com/byu-utah.png

http://www.chcs-ut.com/nfl.mp3

1

1 Answers

0
votes

OK, figured it out. I needed to also include:

-s:v 1920x1080