[FFmpeg-user] VBR 2-pass or CRF when recording with libx264

Dainius (GreatEmerald) pastas4 at gmail.com
Mon Apr 4 19:15:07 CEST 2011

I am trying to determine the best way to record my screen here using
FFmpeg from Linux. I have already tried a lot of options, but I would
like to hear the opinion of others as well. The thing that makes
recording difficult in my case is that I need to use sox to actually
record and mix my microphone and system sounds. If I pipe sox to
FFmpeg, the recording performance plummets from constant 25 FPS to
constant 5 FPS, so obviously that's not usable. However, if I use sox
to output the MP3 file and then use FFmpeg to mix the two, I get a
video that is usable. However, there is something I want to find out
that I don't really get: FFmpeg can record using two-pass VBR, which
is probably the best way to save both quality and disk space. Is it
feasible to use it in my case, since I don't have the original
recording (it was the screen itself, after all)? If I try to run the
first pass, I do get a log file with all of the info in it, so I could
use that and use the video output I got from the first pass, but
wouldn't that destroy the point of doing a two-pass recording in the
first place?
And if not, and two-pass VBR is out of the question, then what would
be a good way to encode the video for a good quality/size ratio?
Single-pass VBR? If so, what settings are the most important for me
(since I'm recording a game through x11grab, and in case you want to
know, it's Heroes of Might and Magic III :) - it gets a fair share of
pretty static images)? For example, how different is changing qscale
from qmax/qmin? And should I be concerned with things like qdiff,
qblur and qcomp? In fact, does libx264 even acknowledge these settings
to begin with?

By the way, x264 guides say that the best single-pass option using
libx264 is crf, '-crf' in FFmpeg, but the FFmpeg manual does not list
that at all. So where should the argument go, and what are valid
options for it?

More information about the ffmpeg-user mailing list