[MPlayer-users] mencoder: effective use of qp, crf params for x264?

matthew.garman at gmail.com matthew.garman at gmail.com
Tue Jan 30 18:02:46 CET 2007


Hello!

On Tue, Jan 30, 2007 at 04:27:35PM +0100, Guillaume POIRIER wrote:
> the bitrate that will end up being used by qp will depend on the
> complexity of the scene (more or less equivalent to "how well it
> compresses"), and the "amount of efforts" that the codec put towards
> trying to make good use of the bits.
> Likewise, if you give bitrate as a target, the average quant of the
> frame/the movie will depend on how well the movie compresses with the
> given encoding parameters

Hmmm... that's causing me to re-think my scheme.

Seems like crf might be more flexible for inputs that are greatly
different.  For example, I've been encoding TV episodes with
bitrate=1400 (and other params similar to what I've posted
previously).  But with *animation* (cartoons), I could drop that
down to bitrate=900 and still have acceptable quality.

Now I wonder if I had found some "optimal" crf value (optimal for
*me* of course), that I could have saved myself some
trial-and-error, i.e. using crf, mencoder would have known that it
could use fewer bits with animation.

Conversely, I'm concerned with hitting the "ceiling" when using
bitrate=x: I'll get an encoding that's not to my liking if x aren't
enough bits for some random movie with many extremely complex motion
scenes.  Of course I could go with x+1, but now I'm wasting a bunch
of bits for the majority of movies that aren't so complex.
(Compared to a sufficiently low crf, which would use plenty of bits
on the complex movie, but know to use fewer on everything else. (?))

So is it fair to say that specifying bitrate=x is generally
preferred when you have the time to fine tune x---for every
individual job?  Otherwise, do some initial experimentation with
crf, find your optimal value and run with it?

Is there a way for mplayer to combine the best of both worlds?
E.g., something along the lines of using crf on the first pass,
having mencoder tell you what the optimal bitrate would be, then
using that bitrate on pass=2?

Thanks again for all the help and clarification!
Matt




More information about the MPlayer-users mailing list