shaka-player
shaka-player copied to clipboard
Audio and video are out of sync with a VOD content in HLS format
Have you read the FAQ and checked for duplicate open issues? yes
What version of Shaka Player are you using? 4.3.8
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? Demo App
If custom app, can you reproduce the issue using our demo app? yes
What browser and OS are you using? Chrome - MacOS
What are the manifest and license server URIs? The HLS manifest was shared by email
What did you do?
- Open the Shaka Player DEMO v4.3.8
- Add the above manifest as a custom content
- Play the VOD content
- Advance the content until the 30 minute
What did you expect to happen? Audio and video should keep synchronized
What actually happened? Audio and video are not synchronized
@FelipeAndresLopez can you try with the main branch? Yesterday I fixed some AV sync issues.
@FelipeAndresLopez can you try with the main branch? Yesterday I fixed some AV sync issues.
Hi @avelad, first of all, thanks for answering and checking this issue. can this bug fix be testable with the Shaka Player Demo v4.4.2? If yes, the issue persists and I can send you the manifest in HLS that we are using. If not, let me know how I can test it.
You can use: https://nightly-dot-shaka-player-demo.appspot.com/demo/
I just tested and the result is this: When playback starts goes well, and as long as nothing changes, it continues working normally. However when I change the language to Spanish (for instance) or I fast-forward the movie, the audio and video synchronization issue starts appearing. Let me know if you need the HLS file that I'm testing for better debugging. I could send you by email.
Looks like this issue is being mitigated by new configs. Setting manifest.hls.sequenceMode
to false
and manifest.hls. ignoreManifestTimestampsInSegmentsMode
to true
the video and audio are in sync.
I have reproduced the same error with the streams from https://github.com/shaka-project/shaka-player/issues/5445
@FelipeAndresLopez Can you send the manifest url to [email protected] ? Thanks!
@avelad we also have some streams where this issue occurs. The HLS manifests are only valid for an hour, but you can always get a fresh manifest by doing this:
- open https://www.buzzfeed.de/meinung/verbale-sexuelle-belaestigung-spd-gesetzesvorschlag-gesetz-catcalling-kommentar-video-92353864.html?info
- mouse over the video-player
- check the network tab for the
stream.m3u8
file
When the stream gets seeked to the end, the issue becomes noticeable.
@avelad we also have some streams where this issue occurs. The HLS manifests are only valid for an hour, but you can always get a fresh manifest by doing this:
* open https://www.buzzfeed.de/meinung/verbale-sexuelle-belaestigung-spd-gesetzesvorschlag-gesetz-catcalling-kommentar-video-92353864.html?info * mouse over the video-player * check the network tab for the `stream.m3u8` file
When the stream gets seeked to the end, the issue becomes noticeable.
Your stream is wrong, audio and video playlist duration is different 101 vs 105 (adding all EXTINF values), that causes the player to be out of sync, fix that and the player will work properly. Thanks!
@avelad thanks for having a closer look. I actually did not check it further because this stream got generated via AWS Elemental MediaConvert (using default settings) and it plays back without audio/video drift in hls.js. Will open a ticket with AWS, but I'm wondering what kind of error correction hls.js applies.
@robwalch How does hls.js work when the EXTINF is bad? (see my previous comment)
Shaka is appending media according to playlist durations and not media timestamps so drift in the playlist is not corrected. You have to talk to your provider to correct this. This is the way Shaka works, sorry!
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.
@shaka-bot reopen
This issue was opened before new discussion this months.
@avelad said that he replicated the issue.
It should keep opened until fixed.
Just to recap, there's a workaround:
Setting manifest.hls.sequenceMode
to false
and setting manifest.hls.ignoreManifestTimestampsInSegmenstMode
to true
@avelad commented that it should work without those configs
@shaka-bot reopen
@cristian-atehortua Just because it works by chance with some configuration (some errors are displayed in the console) does not mean that the stream is correct.
You have to talk to your provider to correct this. Sorry!
I attach the mediaStreamValidator report:
I attach the two main problems reported by the Apple tool:
I opened a ticket with AWS and I am awaiting feedback. But maybe the issue of @cristian-atehortua and @FelipeAndresLopez is a different one. Then sorry for hijacking this ticket.
https://github.com/shaka-project/shaka-player/issues/5445#issuecomment-1841050557
If someone wants to provide a stream, I can look at it again, but the only functional stream for this issue has those problems.
@avelad I have a stream that's falling out of sync when the bitrate changes. I've attempted to validate the stream but I can't find the same mediastreamvalidator
you referenced above. I downloaded a tool from apple but its not generating the same reporting as you sent along.
I'd be happy to privately send you an HLS stream for testing.
Maybe interesting for someone else who also has an issue with AWS MediaConvert and a Video/Audio drift with HLS in Shaka: We got the feedback from AWS that we should use fixed segment length for transcoding (setting SegmentLengthControl
to EXACT
).
FWIW, I'm using shaka-streamer
/shaka-packager
which, in turn is using ffmpeg
. One of the things I noticed about my HLS manifest files is that the length of the audio segments is ever so slightly different from the length of the video segments.