[Libav-user] MPEG2 Encoding with a determined bit_rate
andrey.krieger.utkin at gmail.com
Tue Mar 13 10:02:56 CET 2012
2012/3/13 <francesco at bltitalia.com>:
> Hi to all
> I am attempting to convert in mpeg2 with a bitrate of 30Mbit/sec and with a
> 50Mbit/sec but it seems that the bit rate variation doesn't work.
> Here is my routine that gets as input a buffer with my originary coded frame
> (not interlaced),
> decompress and interlace it and recompress using MPEG2 compressor (Hsize and
> VSize are field dimension,this is why the VSize is doubled):
Please provide minimal, but compiling source code of your app that
reproduces the issue.
Besides that, i recommend you to check that you feed in frames with
timestamps in encoder's AVCodecContext.time_base.
Printing pts of frames/packets you produce can help in debugging it.
More information about the Libav-user