shaka-project / shaka-player

JavaScript player library / DASH & HLS client / MSE-EME player
Apache License 2.0
7.2k stars 1.34k forks source link

A/V sync problem on both multi-period DASH and HLS after SSAI ad break #5007

Closed jolytv2 closed 11 months ago

jolytv2 commented 1 year ago

Have you read the FAQ and checked for duplicate open issues? Yes, possible (closed) duplicate 4589

What version of Shaka Player are you using? Tested with both 4.3.2 (custom build) and 4.3.4

Can you reproduce the issue with our latest release version? Yes

Can you reproduce the issue with the latest code from main? Yes

Are you using the demo app or your own custom app? Both custom and demo app (demo app integrated in a Tizen demo app)

For embedded devices (smart TVs, etc.), what model and firmware version are you using? Tizen 3.0 - 7.0 (2017 - 2023) WebOS 3.x - 8.x (2016 - 2023)

Seemingly all models are equally affected.

What are the manifest and license server URIs? DASH

HLS

What configuration are you using? What is the output of player.getConfiguration()? default

What did you do?

What did you expect to happen? Audio / video to remain in sync over extended play across ad breaks

What actually happened?

Additional information We have attempted running the latest Shaka, created an HLS version of the stream and running with the yo.pdt=sync setting as mentioned in 4589 - but we still have the issue.

joeyparrish commented 1 year ago

Please confirm that your playlists have EXT-X-PROGRAM-DATE-TIME, and that the timestamps in them are accurate. That is the basis for HLS AV sync, both in Shaka and according to the HLS spec.

Please let us know what you find.

jolytv2 commented 1 year ago

Hi @joeyparrish

HLS Regarding your question, on HLS we are running with the yo.pdt parameter from Yospace that inserts the EXT-X-PROGRAM-DATE-TIME - I am not sure how to tell the accuracy of them though. It did seem however that the stream went significantly out of sync with Shaka and yo.pdt=sync, but sometimes went back into sync. Without yo.pdt=sync it didn't seem to recover, at least not as much.

DASH It should be noted though, that HLS was something we tested, due to the 4589 ticket, but we normally run multiperiod DASH on our SmartTVs.

Recent observations on DASH is:

a) It seems out timescale is different for content and ads, ads are 12800 and content 180000. This would appear to present problems for SmartTVs, that don't handle changes in timescale well. We haven't the option of aligning the timescale on Yospace and changing our timescale on content isn't trivial either. We have in another player seen that having the player do a remapping of the timescale to match our contents timescale, removes a part of the de-sync issue.

b) We have also seen that small gaps and overlaps in segments seem to be the second cause of sync problems. When we look at the media internals on web in Chrome, we can sometimes see that the player handles these gaps/overlaps without issue, but on SmartTV this is not the case. In the other player adjustments were made to handle this better on SmartTVs, and combined with regular re-syncs, and the above timescale thing, we can keep the sync down to a few frames, which is within reasonable boundaries.

avelad commented 1 year ago

Can you test again with the latest release (4.4.2)? Thanks!

jolytv2 commented 1 year ago

Hi Álvaro, thank you, we will test and get back!

avelad commented 11 months ago

Can you test again with the latest release (4.6.3)? Thanks!

shaka-bot commented 11 months ago

Closing due to inactivity. If this is still an issue for you or if you have further questions, the OP can ask shaka-bot to reopen it by including @shaka-bot reopen in a comment.