[MEncoder-users] lavc & h.264

Raimund Berger raimund.berger at gmail.com
Tue Jul 15 10:12:02 CEST 2008


Philippe MONROUX <phi2-monroux at wanadoo.fr> writes:

> De (from) (von) <morganw at chemikals.org> :
>
>> > I actually encode with -ovc x264 -x264encopts ...
>> > I heard it was possible to h.264 encode with lavc. How can I do and is
>> > ti better (faster) ?
>
>> I don't know if it is any faster/better, but it should work something 
>> like:
>> -ovc lavc -lavcopts vcodec=libx264:<etc>
>
> Ok. Thanks for the response. I think it's good for autoaspect
> (speed). Is there an example of good compromise between speed and
> quality of encoding with lavcopts vcodec=libx264 because it seems that
> lavc options for are note the same...
>
> For example following options:
>
> subq=5:partitions=all:8x8dct:frameref=2:bframes=3:b_pyramid:weight_b
>
> doesn't existe in lavcopts vcodec=libx264

It seems you are kind of going a bit astray here.

First, autoaspect has little or nothing to do with speed. It's just a
comfort feature for aspect ratio calculation, which you can do by hand
if you wish. I wouldn't try that with the actual encoding.

Second, both the mencoder builtin and the lavc h264 encoders rely on an
external library, namely libx264, to do the grunt work. Since by far the
most cpu time is spent on the encoding, it's of little matter which of
those stubs you use. So to answer your initial question regarding the
speed difference - no, there is none, since all the hard work is done in
libx264.

Third, the lavc x264 stub implements it's own x264 option
mappings. That's what you apparently found out, but unfortunately didn't
yet bother to further investigate in the docs. If you had, you would
have found out that the information you want is already there in the man
page resp. the online docs.

Fourth, if you plan to regularly update your libx264 library maybe even
by pulling from the x264 git repo, I'd recommend *not* using the lavc
stub. Why? Because, due to those option mappings, it's usually a little
behind latest x264 developments. The x264encopts on the other hand are
just passed through to libx264, so that stub is very likely to work with
the very latest x264 version.



More information about the MEncoder-users mailing list