MPEG System standard (13818) allows packet to be duplicated, it says:
“In transport streams, duplicate packets may be sent as two, and only two, consecutive transport stream packets of the same PID. The duplicate packets shall have the same continuity_counter value
as the original packet and the adaptation_field_control field shall be equal to ’01’ or ’11’. In duplicate packets each byte of the original packet shall be duplicated, with the exception that in the program clock reference fields,
if present, a valid value shall be encoded.”
So, what’s a reason to duplicate packets? i think to enhance error resilience. Not all packets should be duplicated, for example packets carrying important information like SPS/PPS headers are worth to be repeated, because in case of bit-stream error the whole GOP (or even video sequence) gets invalidated. Many players (e.g. VLC, ffplay and Pot players) don’t discard duplicated packets if they are present in transport stream. Consequently, video is played corrupted.
For example, if a duplicated packet contains only SPS/PPS then the output elementary stream would contains a pair of SPS/PPS (not error). However, if the duplicated packet contains SPS/PPS and the start of the slice header
then the output stream is a mess (non-parseable).
Therefore it’s worth to detect and remove duplicated packets before playing back the stream. How to detect duplicated ts-packets?
If two successive packets with the same PID and continuity_counter are sensed then the following check is executed:
Compare content of these two packets excluding PCR field if it present.
if they are “identical” then remove one of them
23+ years’ programming and theoretical experience in the computer science fields such as video compression, media streaming and artificial intelligence (co-author of several papers and patents).
the author is looking for new job, my resume
Thank you a lot for giving everyone remarkably terrific possiblity to check tips from here. It’s always very terrific plus packed with a good time for me and my office mates to visit the blog at the very least three times in a week to see the new guidance you will have. Not to mention, we’re usually pleased concerning the stunning methods served by you. Some 2 facts in this post are clearly the very best I have had.
Good write-up, I’m regular visitor of one’s website, maintain up the excellent operate, and It’s going to be a regular visitor for a long time.
Your place is valueble for me. Thanks!…
Hello, Neat post. There’s an issue together with your web site in internet explorer, might check this?K IE still is the market chief and a large element of people will leave out your wonderful writing due to this problem.
Very interesting subject , thankyou for posting.
Excellent read, I just passed this onto a colleague who was doing some research on that. And he just bought me lunch as I found it for him smile So let me rephrase that: Thank you for lunch!
Just want to say your article is as amazing. The clarity in your post is just nice and i can assume you are an expert on this subject. Fine with your permission allow me to grab your feed to keep up to date with forthcoming post. Thanks a million and please keep up the gratifying work.
you are welcome to take any part of the content and use it in your blog
Hello! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!
Wonderful blog! I found it while surfing around on Yahoo News. Do you have any tips on how to get listed in Yahoo News? I’ve been trying for a while but I never seem to get there! Thank you
Exactly what I was looking for, thankyou for posting.
I see something genuinely interesting about your site so I saved to fav.
This is really interesting, You’re a very skilled blogger. I’ve joined your rss feed and look forward to seeking more of your wonderful post. Also, I’ve shared your web site in my social networks!
I see something genuinely special in this site.
Does your site have a contact page? I’m having a tough time locating it but, I’d like to send you an e-mail. I’ve got some creative ideas for your blog you might be interested in hearing. Either way, great blog and I look forward to seeing it develop over time.
Thank you for sharing with us, I believe this website really stands out : D.
Hello very nice web site!! Guy .. Beautiful .. Superb .. I’ll bookmark your blog and take the feeds additionally…I’m happy to seek out numerous useful info right here in the submit, we need develop extra techniques in this regard, thank you for sharing.