[Ffmpeg-devel] Why I cannot get the results I want ???

Baptiste Coudurier baptiste.coudurier
Tue Oct 31 18:26:37 CET 2006


Thomas Parmegiani wrote:
> Hi all !
> I would like to implement ffmpeg library in my application to schedule
> conversion tasks.
> User will choose an encoding profile (type : Always MPEG2, constant bitrate
> : 10->80 Mbs, GOP : I only, IP or IBBP (with fixed gop size)).
> I tried first using ffmpeg command line but most of my encoding don't
> produce that I want :
> - I cannot reach the desired constant bitrate :
> ffmpeg -i /G/test-50mbs.ts -minrate 25000K -maxrate 25000K -bufsize
> 2500K -bt 1 -intra /G/test-25mbs-intra-only.ts
> It does not work. I get too many buffer underflows and the final bitrate is
> 4mbs instead of desired 25mbs.
> I tried to change bufsize value without any success.
> Can anyone help me to find the correct command line to have the desired
> constant bitrate ?

See a thread named: "[Ffmpeg-devel] [BUG] Rate Control For MPEG CBR"
Michael provided some usefull tweaks for CBR encoding.

> - I cannot have a fixed gop size :
> ffmpeg -i /G/test-50mbs.ts -minrate 25000K -maxrate 25000K -bufsize
> 2500K -bf 2 -g 12 -flags2 sgop /G/test-25mbs-intra-only.ts

Don't you miss the '+' before sgop ? -flags works that way.
also for MPEG2 I suggest you to use +alt, and -flags2 +ivlc.


Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A.                                    http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312

More information about the ffmpeg-devel mailing list