[FFmpeg-devel] Remaining problems in H.264 handling

Uoti Urpala uoti.urpala
Sun Mar 29 00:38:50 CET 2009

On Sat, 2009-03-28 at 23:27 +0100, Ivan Schreter wrote:
> Carl Eugen Hoyos wrote:
> > Thank you for resending.
> > Unfortunately, the patch fixes no samples with MPlayer.
> >
> >   
> Sorry to hear that. I tested the second sample with my patch and it 
> detected correct frame rate. So it must be something different, what is 
> going wrong in mplayer and must be analyzed by mplayer developers.

MPlayer does not care about frame rate, it's perfectly fine if no two
intervals between frames in the video are the same and there is no sane
way to even define a "frame rate". What it cares about is packet
timestamps (the pts timestamp to be precise). And if there are two input
packets with set timestamps (not NOPTS_VALUE) for every output frame
from the decoder then things won't work well because the current code
does not know what input timestamp to associate with what decoder

To produce output that works with current MPlayer code libavformat would
need to either combine the packets so that one input packet corresponds
to one decoder output, or leave out "extra" timestamps that will not
correspond to anything output by the libavcodec decoder and use
AV_NOPTS_VALUE instead. Alternatively MPlayer can be changed to use a
different timing mode for such streams that have lots of timed packets
that do not correspond to video frames.

More information about the ffmpeg-devel mailing list