extract PCR time value from MPEG TS

a 夏天 提交于 2021-02-07 17:24:18

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!