Search code examples
video-streamingvideo-processingmpeg2-ts

MPEG2-TS : PCR and PTS


In mpegts, is there any relation between PCR and PTS? I mean, why should we provide PCR and what value should be assigned as PCR?
In some posts I saw that PCR can be calculated from PTS, how?
Well, it is clear that, PTS must be incremental, but what about PCR? Should it also be incremental?


Solution

  • The PCR is there for over the air and satellite transmission. As you know, PTS is 90000 ticks per second. But first the encoder and decoder needs to decide on the definition of a second. A decoders clock could run a little fast (causing buffering) or a little slow (causing memory exhaustion). The PCR is a signal sent very frequently to keep these clocks synced in one way signal transmission. This is less of an issue today as devices are connected to the internet and regularly sync their clock via a separate method. For your purpose, yes just using the PTS from another stream will work fine as, as unless you are are making a broadcast encoder for Motorola, it won't matter.