How to get high quality videos at reasonable sizes. Needed this in the past for conferences and again now for a friend submission to notodofilmfest.
$ ffmpeg -i <inputfile> -threads 0 -pass 1 -vcodec libx264 -vpre medium_firstpass -b <bitrate>k <outputfile>.flv
$ ffmpeg -i <inputfile> -threads 0 -pass 2 -vcodec libx264 -vpre medium -b <bitrate>k <outputfile>.flv
-threads 0 detects available CPUs. The important thing here is selecting the appropriate video codec.
Bitrate, I'm afraid, can only be determined somewhat empirically, if you want a target file size. I ended doing binary search.
I guess that if you're desperate for quality you can use -vpre placebo[_firstpass].
For single-pass, it's said to be better to use -crf <something in 15-25 range>, less is higher quality/larger size, instead of -b. Also the -vpre hq profile might be interesting?
For completeness, including the audio codec, I had:
$ ffmpeg -i <inputfile> -threads 0 -acodec libmp3lame -ab 160k -ar 44100 -pass 1 -vcodec libx264 -vpre medium_firstpass -b <bitrate>k <outputfile>.flv
| Next > |
|---|


