[FFmpeg-devel] [PATCH/RFC] Update libx264.c to use new libx264 features (b_keyframe, DTS support)
Fri Jan 15 17:39:50 CET 2010
On Thu, Jan 14, 2010 at 9:55 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Thu, Jan 14, 2010 at 06:14:19PM -0500, Jason Garrett-Glaser wrote:
>> This patch updates libx264.c to support a few new features:
>> 1) Keyframes are now signalled by x264_picture_t->b_keyframe. ?This
>> allows x264 to have non-IDR keyframes, such as in the new Periodic
>> Intra Refresh feature (see http://x264dev.multimedia.cx/?p=249).
>> 2) DTS are now set correctly using x264's native VFR handling system.
>> 3) Timebase is now set using x264's native VFR handling system.
>> Potential issues:
>> 1) FPS is the same as timebase. ?Is this necessarily correct?
> probably not
>> Ideally, for ratecontrol purposes (x264 doesn't have VFR ratecontrol
>> yet, but it's getting it soon), the FPS should be the average input
>> fps, but that's probably not always possible. ?Is there any value we
>> should use instead of timebase?
> hmm, we have AVStream.avg_frame_rate but a encoder has no access to
> that currently
>> 2) x264's DTS values start at a negative value in the case of
>> B-frames; x264 leaves it up to the muxer whether to pass through the
>> negative values, fix them with an initial delay, fix them with DTS
>> compression, or use an EDTS element or similar. ?Will this work in
>> ffmpeg, or will libx264.c have to munge the dts values somehow?
> negative dts should work
Wait a minute here: AVFrames don't even have a place to store dts.
Where am I supposed to put it, or does the encoder just not do that?
More information about the ffmpeg-devel