[Ffmpeg-devel] Intra-frame rate control
Fri Apr 6 06:29:49 CEST 2007
If avcodec.lib can only change Q values at picture boundaries for MPEG2
files that's a huge limitation. The advantage of MPEG2 over MJPEG is the
ability to change the Q in the middle of an image. A common clip people use
to show this off is a field of daisies under a blue sky. The blue sky can
be encoded well with a high Q value while the more complex field of daisies
portion of the image can be encoded with a lower Q value.
Another problem I'm seeing caused by avcodec.lib only changing Q values at
picture boundaries is that the instantaneous bitrate of an encoded clip
jumps around too much. For example when a complex image follows several
black frames the bitrate skyrockets because the rate controller lowered the
Q during the black frames and doesn't readjust it until the end of the
complex frame. This problem is especially bad when working with HD images.
If I'm correct that avcodec.lib will only change Q values at picture
boundaries, could someone point me to which files I could modify to change
this? I assume mpegvideo.c would be the main one.
On Wed, Apr 04, 2007 at 02:56:24PM -0700, RLopez wrote:
> I'm trying to use avcodec.lb to encode 1920x1080 frames in MPEG-2.
> I've noticed that the Q value for all the slices in each encoded frame
> is always constant. Is this a limitation of avcodec.lib? In other
> words can the rate control only adjust Q values at picture boundaries
> and not at slice boundaries? Is there a setting somewhere to allow
> the library to adjust the Q within a frame instead of only at frame
RTFM, RTFS and use ffmpeg-user for user questions
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
More information about the ffmpeg-devel