[FFmpeg-devel] [bug/patch] MPEG-TS muxer: PCR not in sync with PTS/DTS

Mike Scheutzow scheutzow
Mon Feb 8 18:52:32 CET 2010


 > I'm having a problem with this patch. I'm writing a segmenter that
 > needs to produce TS stream with packets that have pts and dts delayed
 > by an offset. The patch however cause lot of empty packets at the
 > beginning of each segment (to compensate for delayed pts/dts).
 >
 > Is there any way to avoid this?
 >
 > Thanks.
 > -Matej

Please don't top-post on this list.

It is my understanding that the mpeg-ts muxer is supposed to generate 
Constant Bitrate (CBR) transport streams.  In the current code, the PCR 
*always* starts at 0, so the behavior you call "a problem" is actually 
the correct behavior.

One solution would be to add a new feature to the mpeg-ts mux so that 
the initial PCR can be specified by the caller (using metadata?) or 
maybe calculated from the first DTS received.

I'll work on a patch if Baptiste indicates he is OK with the concept.


Mike Scheutzow



More information about the ffmpeg-devel mailing list