Open mjneil opened 5 years ago
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
Any updates on this?
Any updates on this?
@mjneil Any updates up on this?
Thank you.
Matt
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 thetsprobe
, 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 meansSegmentLoader
will thinkstartingMedia
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