I've Googled this problem, and I can find examples of people using presets and proper syntax for two-pass H.264 encodes using x264, but I don't want to just copy-paste them; I want to understand what I'm doing wrong here. The documentation doesn't go into much detail regarding this.
So here's what I'm running, using ffmpeg on Windows, a January 14 2013 build.
ffmpeg -i pelicans.mpg -c:v libx264 -pass 1 -an -f rawvideo NUL
ffmpeg -i pelicans.mpg -c:v libx264 -q:v 5 -pass 2 -an pelicout.mkv
Error: Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width, or height.
The first command works correctly. The second is what gives me trouble. If I use -b:v 2500k, then that works fine. But -q:v 9 does not, and I haven't been able to understand why. If I invoke that command outside of a two-pass encode, it seems to work fine. And it's in the same position a flat bitrate indicator would be. So what's the deal here? What am I doing wrong?
So here's what I'm running, using ffmpeg on Windows, a January 14 2013 build.
ffmpeg -i pelicans.mpg -c:v libx264 -pass 1 -an -f rawvideo NUL
ffmpeg -i pelicans.mpg -c:v libx264 -q:v 5 -pass 2 -an pelicout.mkv
Error: Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width, or height.
The first command works correctly. The second is what gives me trouble. If I use -b:v 2500k, then that works fine. But -q:v 9 does not, and I haven't been able to understand why. If I invoke that command outside of a two-pass encode, it seems to work fine. And it's in the same position a flat bitrate indicator would be. So what's the deal here? What am I doing wrong?