How is a video frame rate calculated in a transport stream?

Marc Leeman marc.leeman at gmail.com
Thu Feb 14 23:48:35 PST 2013


> 1. Is it the job of demuxer(tsdemux)?Is it based on dts/pts present in
> transport PES in such a case? If dts/pts id not present how does it get
> calculated?
> 2. Is it the job of videoparse(h264parse)r?
> 3. Is it the job of video decoder(avdec_h264)?

AFAIK, the decoder only decodes; it does not drop frames unless there
is another underlying issue (e.g. load).

> I'm using decodebin which internally is using libav decoders. I have this
> question because because certain H264 streams have a framerate of 0/1 when
> they come out of decodebin. I'm not sure why it is happening

How do you determine that it only has 1 fps?

Might sound like a stupid question, but if you do not disable the sync
on your video sink; you might have more frames but due to incorrect
timiing, you only show about 1 fps. In any case, disabling the sync is
not the solution; it is just a poor workaround for determining your
problem.

Where is your source, is it network or file? In the case of network; I
know there a bug (for which a patch has been provided, that needed to
be reworked a bit) that needs to be applied for TS in MPEG (not H.264)
because there was something off in the buffer timestamping in the
parser that resulted in this behaviour when the sink had sync=1


More information about the gstreamer-devel mailing list