Discussion:
[Ffmpeg-user] MPEG2 Video + max bitrate
Hauke Duden
2007-03-28 14:11:23 UTC
Permalink
Hi everyone,

I'm trying to encode MPEG2 video so that the bitrate is variable but
never exceeds a certain limit.

My limit in this case is 9MBit/s (for DVD video). I tried the following:

ffmpeg -i input.m2v -b 8000000 -bt 1000000 output.m2v

Unfortunately the bitrate exceeds 9 MBit/s in some places (sometimes by
quite a lot). Then I tried this:

ffmpeg -i input.m2v -b 4000000 -bt 1000000 output.m2v

And the bitrate still sometimes goes over 9 MBit/s.

Last but not least I tried this:

ffmpeg -i input.m2v -b 8000000 -maxrate 9000000 output.m2v

This produced the error:
[mpeg2video @ 6C15E000]a vbv buffer size is needed, for encoding with a
maximum bitrate

I'm not certain what the vbv buffer size is, so I don't really know what
a good value would be.

Do you have any suggestions?

Thanks!

Hauke
Víctor Paesa
2007-03-28 18:31:05 UTC
Permalink
Hi,
Post by Hauke Duden
I'm trying to encode MPEG2 video so that the bitrate is variable but
never exceeds a certain limit.
ffmpeg -i input.m2v -b 8000000 -bt 1000000 output.m2v
Unfortunately the bitrate exceeds 9 MBit/s in some places (sometimes by
ffmpeg -i input.m2v -b 4000000 -bt 1000000 output.m2v
And the bitrate still sometimes goes over 9 MBit/s.
ffmpeg -i input.m2v -b 8000000 -maxrate 9000000 output.m2v
maximum bitrate
I'm not certain what the vbv buffer size is, so I don't really know what
a good value would be.
If the destination is DVD video, a good value is 224kiB

Regards,
V?ctor
Dennis Meuwissen
2007-03-28 19:10:49 UTC
Permalink
Post by Víctor Paesa
Hi,
Post by Hauke Duden
I'm trying to encode MPEG2 video so that the bitrate is variable but
never exceeds a certain limit.
ffmpeg -i input.m2v -b 8000000 -bt 1000000 output.m2v
Unfortunately the bitrate exceeds 9 MBit/s in some places (sometimes by
ffmpeg -i input.m2v -b 4000000 -bt 1000000 output.m2v
And the bitrate still sometimes goes over 9 MBit/s.
ffmpeg -i input.m2v -b 8000000 -maxrate 9000000 output.m2v
maximum bitrate
I'm not certain what the vbv buffer size is, so I don't really know what
a good value would be.
If the destination is DVD video, a good value is 224kiB
You might also want to use -target ntsc-dvd (or -target pal-dvd). It
sets all the parameters needed to
produce a DVD compliant MPEG2 video.

Loading...