shaka-project / shaka-player

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

My hls video has a section that will be skipped #7349

Open vaseala opened 3 days ago

vaseala commented 3 days ago

Have you read the Tutorials? Yes

Have you read the FAQ and checked for duplicate open issues? Yes

If the question is related to FairPlay, have you read the tutorial?

Not relate to FairPlay

What version of Shaka Player are you using? 4.11.4

What browser and OS are you using? latest chrome and macOS

Please ask your question I created a github repository to reproduce this issue:https://github.com/issuebox/video-problem

Start the local service and open http://localhost:5173/shaka

When the video is played to around 48 seconds, it will jump directly to 60 seconds, and the video between 48s-60s cannot be played

After playing to 65s, when I adjust the progress bar to about 40s, it jumps to 60s, and then I can't reposition it to 42s

avelad commented 1 day ago

For me your manifest is poorly generated:

#EXTM3U
## Generated with https://github.com/shaka-project/shaka-packager version v3.2.0-53b8668-release

#EXT-X-INDEPENDENT-SEGMENTS

#EXT-X-MEDIA:TYPE=AUDIO,URI="audio-flac/main.m3u8",GROUP-ID="audio",LANGUAGE="zh",NAME="CHINESE",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="6"

#EXT-X-MEDIA:TYPE=AUDIO,URI="audio-aac/main.m3u8",GROUP-ID="audio",LANGUAGE="zh",NAME="ENGLISH",DEFAULT=NO,CHANNELS="2"

#EXT-X-STREAM-INF:BANDWIDTH=34233597,AVERAGE-BANDWIDTH=22854301,CODECS="avc1.640029,flac,mp4a.40.2",RESOLUTION=1920x1080,FRAME-RATE=24.390,AUDIO="audio",CLOSED-CAPTIONS=NONE
video/main.m3u8

You are mixing two different audio codecs in the same variant.

Your content should be:

#EXTM3U
## Generated with https://github.com/shaka-project/shaka-packager version v3.2.0-53b8668-release

#EXT-X-INDEPENDENT-SEGMENTS

#EXT-X-MEDIA:TYPE=AUDIO,URI="audio-flac/main.m3u8",GROUP-ID="audio-flac",LANGUAGE="zh",NAME="CHINESE",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="6"

#EXT-X-MEDIA:TYPE=AUDIO,URI="audio-aac/main.m3u8",GROUP-ID="audio-aac",LANGUAGE="zh",NAME="ENGLISH",DEFAULT=NO,CHANNELS="2"

#EXT-X-STREAM-INF:BANDWIDTH=34233597,AVERAGE-BANDWIDTH=22854301,CODECS="avc1.640029,flac",RESOLUTION=1920x1080,FRAME-RATE=24.390,AUDIO="audio-flac",CLOSED-CAPTIONS=NONE
video/main.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=34233597,AVERAGE-BANDWIDTH=22854301,CODECS="avc1.640029,mp4a.40.2",RESOLUTION=1920x1080,FRAME-RATE=24.390,AUDIO="audio-aac",CLOSED-CAPTIONS=NONE
video/main.m3u8
vaseala commented 1 day ago

Thank you for your reply @avelad The m3u8 I submitted in the previous version has a problem, which makes the video unable to play in shaka-player. I have submitted the modified m3u8

Now when it plays to about 50 seconds, the video will jump about 10 seconds and jump directly to about 61 seconds. I don’t know what causes it. I hope you can clone the repository and help me analyze it.

avelad commented 1 day ago

It seems that there is some problem with the video, if I use disableVideo everything works fine (only the audio is played). If I use disableAudio the issue persists (only the video is played).

The manifest is created correctly, so there is some problem in the segment that produces the gap.

vaseala commented 1 day ago

But with hls.js , it can play all the seconds of the video. In the same repository, open http://localhost:5173/hls . and with desktop vlc player, It works ok.

avelad commented 1 day ago

@joeyparrish can you review it? The sample stream is https://raw.githubusercontent.com/issuebox/video-problem/refs/heads/main/public/media/video/main.m3u8 Thanks!