The python script PcrAnalysis.py  is tailored to check PCR integrity (or timing integrity) of MPEG TS stream.

This script analyzes:

  1. whether PCR interval is smaller or equal to 100ms (as required by MPEG System standard). If not a violation is reported.
  2. whether PCR values are monotonic unless the discontinuity flag is set. If not a violation is reported.
  3. whether PCR is coupled with PES header (or aligned to video frame)

Usage:

python PcrAnalysis.py  ts-file

 

Example:

python PcrAnalysis.py  test.ts

Total Pkts  117138, pcr cnt  12296

Maximal PCR Diff 691598 (25.6147ms), attained at packet  309

PCR is not always followed by PES header, dangling pcr cnt  10776

 

 

Elaboration:

‘pcr cnt’ is the total number of PCRs detected in the input stream

‘PCR Diff’ – is measured in units of 27Mhz

‘Dangling pcr cnt’ – PCRs which are not alighned to PES headers

 

 

Note:

PCRs are timestamps in units of 27Mhz which must be transmitted in transport stream at intervals <100ms (mandatory in MPEG2-System).

PCRs are necessary to eliminate clock drift between Sender  and Receiver (the client), otherwise potentially the clock drift can cause Receiver to discard frames because theirs signaled timestamps are smaller Receiver current clock (in such case Receiver would derive that this frames arrive too late).

14 Responses

  1. You really make it seem so easy with your presentation but I find this topic to be actually something which I think I would never understand. It seems too complex and very broad for me. I am looking forward for your next post, I will try to get the hang of it!

  2. I haven’t checked in here for some time since I thought it was getting boring, but the last several posts are great quality so I guess I will add you back to my everyday bloglist. You deserve it my friend 🙂

  3. This site is known as a stroll-by means of for all of the info you wished about this and didn’t know who to ask. Glimpse right here, and you’ll positively uncover it.

  4. Wonderful items from you, man. I have be mindful your stuff prior to and you’re just extremely fantastic. I really like what you’ve got right here, really like what you are saying and the way in which you assert it. You’re making it entertaining and you continue to care for to stay it sensible. I cant wait to read much more from you. This is really a great web site.

  5. Nice post. I learn something more challenging on different blogs everyday. It will always be stimulating to read content from other writers and practice a little something from their store. I’d prefer to use some with the content on my blog whether you don’t mind. Natually I’ll give you a link on your web blog. Thanks for sharing.

  6. I have not checked in here for a while as I thought it was getting boring, but the last several posts are good quality so I guess I will add you back to my daily bloglist. You deserve it my friend 🙂

  7. Fantastic goods from you, man. I’ve take into account your stuff prior to and you are just too fantastic. I actually like what you have got here, really like what you are stating and the best way wherein you are saying it. You’re making it entertaining and you continue to take care of to stay it sensible. I can’t wait to read far more from you. This is actually a wonderful web site.

Leave a Reply

Your email address will not be published. Required fields are marked *