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

Michel Bardiaux mbardiaux
Tue Oct 31 17:48:30 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)).

These are VERY high bitrates. Why?

> 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

Output messages please.

And IIRC -bt is irrelevant for CBR.

> It does not work. I get too many buffer underflows and the final bitrate is
> 4mbs instead of desired 25mbs.

At least you explained what does not work. Many dont.

> I tried to change bufsize value without any success.

Aie, NOT so good, mention of unsuccessful tries but no command line, no 
output messages, no postmortem, no nothing.

> Can anyone help me to find the correct command line to have the desired
> constant bitrate ?
> - 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
> It works for some files I have but not all only a few. I have read somes
> posts and someone wrote to set scenechange_threshold = 1000000000. It does
> not fixed my problem.
> Can anyone help me to find the correct command line to have a fixed gop size
> ?

How do you know you dont have a fixed GOP size? What tool did you use?

> I am novice with MPEG2 format. And I am wonder if it possible to have a
> destination file according the profile I choose, in a very simply way. If
> not, will I have to play with all paramters such as qmin, qmax, max_qdiff,
> bufsize... until I get the target format I want ?

The priority should be to explain why you want such a profile.

> Thanks in advance for your clarifications...
> Best Regards,
> Thomas.P

Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles

More information about the ffmpeg-devel mailing list