[Live-devel] non monotonic timestamps in mpeg transport stream

Alastair Bain Alastair.Bain at Cubic.com
Wed Sep 16 20:32:55 PDT 2009


I've got a source (hardware encoder) which delivers MPEG2 transport
stream frames with PCR's that are non-monotonic. This completely breaks
the MPEG2TransportStreamFramer as it uses these to determine the packet
duration. Anyone have any idea whether (a) it's even valid for the
hardware encoder to do this and (b) how to calculate a sensible duration
when this is the case?

The current approach I'm taking is to a append a timecode to the start
of the packet (to effectively go from TS to M2TS) and use this to
calculate the duration instead. I should mention that playback of data
is fine if it is saved directly to disk and then played using VLC (for
example), I guess VLC is able to read ahead and deliver the frames at
the correct times.

Alastair Bain 



More information about the live-devel mailing list