http-streaming icon indicating copy to clipboard operation
http-streaming copied to clipboard

false positive illegalMediaSwitch

Open mjneil opened this issue 5 years ago • 4 comments

Description

A segment that has multiple differing PMTs can cause a false positive illegalMediaSwitch to occur. The setup is a muxed stream where each segment contains more than one PMT, where the FIRST PMT only contains 1 track (audio or video), and the next PMT contains both tracks. For transmuxing and playback, this is fine and valid, as our transmuxer will "refresh" its internal PMT whenever it encounters a new one. However, illegalMediaSwitch detection uses the results of the tsprobe, which ONLY parses the FIRST PMT it finds and stops since it runs on the main thread and we want to probe very quickly. This means SegmentLoader will think startingMedia will be only video or only audio, depending on the value of the first PMT. The false positive occurs when a future segment in the stream has a first PMT with the track that was not present in the starting segment, falsely thinking we are transitioning from an audio only stream to a video only stream (or vice versa) even though every segment has audio and video frames.

An easy and obvious solution would be to have the probe parse every single packet to look for additional PMTs, but being on the main thread this could have performance impacts. TBA changes would probably take care of this automatically.

Sources

http://d2zihajmogu5jn.cloudfront.net/bad-pmt/media.ts http://d2zihajmogu5jn.cloudfront.net/bad-pmt/index.m3u8

videojs-http-streaming version

latest

mjneil avatar Mar 08 '19 22:03 mjneil

Hi @mjneil. Thanks for creating this ticket. This is a rather urgent problem for us as we were not able to release the new version of videojs for our clients last Friday. We have not been able to address this issue on our end using PMT as you suggested. I couldn't find any information on this. Can you provide an estimate as to when you think the videojs team will address this?

Thank you.

Matt

mparisi76 avatar Mar 11 '19 14:03 mparisi76

Any updates on this?

mparisi76 avatar Mar 15 '19 18:03 mparisi76

Any updates on this?

mparisi76 avatar Mar 19 '19 11:03 mparisi76

@mjneil Any updates up on this?

Thank you.

Matt

mparisi76 avatar Apr 03 '19 13:04 mparisi76