Handling of PCR insertion in mpegtsmux

Marc Olzheim marc at your.tv
Tue Aug 6 04:50:10 PDT 2013


On Tue, Aug 06, 2013 at 02:12:12AM -0700, Baby Octopus wrote:
> Hi,
> 
> Just wondering if I have a pipeline which ends like ..... ! mpegtsmux !
> udpsink  that I should be inserting PCR just before I push the packet out of
> my network. I'm not really thinking of how to handle this for different
> sinks or how neatly this can be done. From correctness stand point it seems
> more appropriate to enter the system time into the packet just before it
> goes out

Well, I guess it depends on how you look at it. If I look at it in the
other direction, the PCR reflects the system clock of the encoder and
needs not be influenced by delays introduced by buffering done
afterwards. So logically the PCR could be added close to the encoder.

Udpsink's output could then be scheduled to more closely follow the PCR
so as to smoothen the stream.

This (not with mpegtsmux at the moment) also allows for handling MPTS
streams with multiple PCRs without having to meddle with all of them at
the end of the pipeline.

Marc


More information about the gstreamer-devel mailing list