[Libav-user] How to set bit_rate for MPEG4/2

Harald Schlangmann harry at gps-laptimer.de
Sun Apr 20 17:32:38 CEST 2014

Thanks for the reply! 

I tested it against a ffmpeg command doing approximately the same (except manipulating the individual frames, slightly different duration):

	ffmpeg -ss 00:06:48.27 -i IN.mp4 -c:v mpeg4 -c:a copy -t 00:01:11.89 -b:v 7257k OUT.mp4

This outputs 

    Stream #0:0(eng): Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 7257 kb/s, 12800 tbn, 25 tbc (default)

and generates a file of size 67.1 MB (roughly matches the expected size - 7722 kb/s).

>  At least constant quantizer vs. bitrate can (and must) be set.

bitrate is clear, constant quantizer matches which field and should be set to which value?

Greetings Harald

Harald Schlangmann
Antwerpener Str. 52, 50672 Köln, Germany
+49 151 2265 4439
Harry at gps-laptimer.de

On 20.04.2014, at 17:25, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> Harald Schlangmann <harry at ...> writes:
>> Looks I’m doing something fundamentally wrong here.
> Did you test with ffmpeg (the application)?
> I am not convinced that single pass encoding can 
> generally guarantee a target bitrate.
>> Any hint on how to influence result file size for mpeg4?
>> The only other fields I initialize for AVCodecContext 
>> are width, height, time_base, pix_fmt,  
> At least constant quantiser vs. bitrate can (and must) 
> be set.
> Carl Eugen
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4145 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20140420/1bcbdb9c/attachment.p7s>

More information about the Libav-user mailing list