问题
I'm trying to extract the PCR time value from an MPEG-TS packet. According to wiki, the PCR contains 33+6+9 number of bits and also it states that the first 33 bits are based on a 90 kHz clock while the last 9 are based on a 27 MHz clock. I extract the bits that follows adaptation field byte, when the PCR flag is enabled.
The question is, how do I calculate the PCR time stamp value with this 48 (33+6+9) bits I have, by considering the respective clock frequency values.
Thanks.
回答1:
PCR(i) = PCR_base(i)*300 + PCR_ext(i)
Where (i) is the index of the byte containing the last bit of the program_clock_reference_base field.
Source:
- PCR measurements
- Also check this post
回答2:
Depending of the accuracy needed by your application, you can work only with the 90kHz clock. The 27Mhz component is used to detect drift in a broadcasting environment.
来源:https://stackoverflow.com/questions/29245281/extract-pcr-time-value-from-mpeg-ts