[FFmpeg-user] XVID-Encoding with ffmpeg

Timothy Gu timothygu99 at gmail.com
Wed Mar 6 21:54:39 CET 2013


On Fri, Mar 1, 2013 at 9:08 AM, llarevo at gmx.net <llarevo at gmx.net> wrote:
> Hello,
>
> thank you for your quick reply.
>
>> > I would like to migrate from mencoder to ffmpeg, but I can't find
>> > sufficient information how to "translate" the parameters for encoding
>> > with xvid from the mencoder commandline to a sufficient ffmpeg
>> > commandline.
>>
>> I don't think there is an "encopts" option in ffmpeg. You will need to
>> translate all the xvid options to ffmpeg options.
>
> OK, I thought so.
>
>> > The xvidenc-configuration in mencoder is
>> >
>> > -xvidencopts
>> >
pass=1:profile=dxnhtpal:(no)greyscale:me_quality=6:max_bframes=1:noqpel:nogmc:(no)cartoon:quant_type=mpeg:trellis:(no)interlacing:chroma_me:chroma_opt:vhq=4
>>
>> For example, -pass 1 -bf 1 and so on.
>
> OK, I found these already, but not all of them.
>
>> >
>> > The most important part for me is profile=dxhtnpal because this setting
>> > ensures a maximum bitrate over 3 sec not over 8 MBit/s, and a avaerage
>> > bitrate not higher than around 4,8 MBit/s (cf.
>> > http://www.mplayerhq.hu/DOCS/HTML/de/menc-feat-xvid.html)
>>
>>
>> Use the table on
>>
http://www.mplayerhq.hu/DOCS/HTML/de/menc-feat-xvid.html#menc-feat-xvid-encoding-profiles
>> to help you translate it.
>
> I know that site. My problem is, that I don't find some options from the
> mplayer site in the ffmpeg man pages or ffmpeg-documentation.
>
> So my concrete question is: what is ffmpeg-syntax-equivalent for
>
> profile=htdxnpal

-s:v 720x576 -r 25 -maxrate 4854k -bf 1
Unfortunately, I cannot find an option for peak bitrate (maybe there is,
but I don't know).

> me_quality=6

-me_method full
"full" is 6. See line 374 of libavcodec/libxvid.c.
http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/libxvid.c;h=dae8ac82442b48167ccef36182881e7a59f30aa6;hb=HEAD

> quant_type=mpeg

-mpeg_quant

> trellis

-trellis

> interlacing

I don't think ffmpeg support interlacing.

> chroma_me

-cmp chroma

> chroma_opt

ffmpeg might not support the option.

> vhq=4

-mbd 2

>
> Additional questions are:
>
> Where should I look for the syntax of these parameters?

You should always go to http://ffmpeg.org/ffmpeg-codecs.html for
codec-related param.

>
> Exists a rule to deduce the commandline like e.g. "if you have a=b in
> mencoder, then the ffmpeg-commandline is X=Y" or "look in the xvid
> sourcefile bla.h, get the name of the xvid parameter there and write x=y
> in the ffmpeg-commandline."?

You can look at libavcodec/libxvid.c in ffmpeg and libmpcodecs/ve_xvid4.c,
and compare the opts, but trust me, you'd rather read the docs.

>
> the question in general behind this is: How to transport parameters to
> an external encoding lib (like e.g. x264, although this part seems to be
> way better documented.)

AFAIK, you can only read documentation (or read C source files, which is
harder for me).

>
>> You can set up a ffmpeg preset to avoid the mess to type in every
>> params every time. http://ffmpeg.org/ffmpeg.html#Preset-files-1
>
> Thanks for this useful hint!
>
> Regards
> --
> Felix
>
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user

Timothy


More information about the ffmpeg-user mailing list