video-dev / hls.js

HLS.js is a JavaScript library that plays HLS in browsers with support for MSE.
https://hlsjs.video-dev.org/demo
Other
14.63k stars 2.56k forks source link

Can't play with TS segment 15 FPS #5639

Closed robertvxt closed 1 year ago

robertvxt commented 1 year ago

What version of Hls.js are you using?

1.4.7

What browser (including version) are you using?

Chrome 114.0.5735.199

What OS (including version) are you using?

Windows 10, Windows 11

Test stream

No response

Configuration

{
  "debug": true,
  "enableWorker": true,
  "lowLatencyMode": true,
  "backBufferLength": 90,
  "manifestLoadingTimeOut": 30000;
  "levelLoadingTimeOut: 30000;
  "manifestLoadingMaxRetry": 4;
}

Additional player setup steps

No response

Checklist

Steps to reproduce

  1. Prepare hls.m3u8 playlist with TS segment. e.g.
    #EXTM3U
    #EXT-X-VERSION:3
    #EXT-X-TARGETDURATION:1
    #EXT-X-MEDIA-SEQUENCE:15
    #EXTINF:1.001000,
    live_000000000015.ts
  2. Play with hls.js
    hlsObject.loadSource(urlPath);
    hlsObject.attachMedia(video);
    hlsObject.on(Hls.Events.MANIFEST_PARSED, function () {
            video.currentTime = playTimer;
            video.autoplay = true;
            video.play();
    });

Expected behaviour

Can play TS segment

What actually happened?

Can't play TS segment with 15 FPS

Console output

[log] > Debug logs enabled for "main" in hls.js version 1.4.7

Chrome media internals output

No response

robertvxt commented 1 year ago

Any help on this? Sorry I'm newbie with this player

robwalch commented 1 year ago

Please include full logs and a sample stream.

robertvxt commented 1 year ago

@robwalch Please use https://drm.kunai.tv:84/hls.m3u8 stream

I've tried to use the demo: https://hlsjs.video-dev.org/demo

2023-07-10-hls js demo

Following is the log during play by above demo page: hls_js_15FPS.txt

robertvxt commented 1 year ago

@robwalch any explanation when mark to Work as expected ?

robwalch commented 1 year ago

https://hlsjs.video-dev.org/demo/?src=https%3A%2F%2Fdrm.kunai.tv%3A84%2Fhls.m3u8%20&demoConfig=eyJlbmFibGVTdHJlYW1pbmciOnRydWUsImF1dG9SZWNvdmVyRXJyb3IiOmZhbHNlLCJzdG9wT25TdGFsbCI6ZmFsc2UsImR1bXBmTVA0IjpmYWxzZSwibGV2ZWxDYXBwaW5nIjotMSwibGltaXRNZXRyaWNzIjotMX0=

Plays in Safari and Firefox. Does not in Chrome.

robertvxt commented 1 year ago

Can't play on chrome or safari image

But possible play by firefox

robertvxt commented 1 year ago

so this is problem of safari/chrome or my stream format?

robwalch commented 1 year ago

Take a look at dev-tools > Media tab > demo page > Messages. File a Chromium bug with steps, including the link above, expected and actual results.

I can play the media in Firefox 115 and Safari 16.5.1 on macOS 13.4.1. There is nothing indicating this is an HLS.js bug. In Chrome MSE appends the muxed fmp4 without any errors, but the buffer is empty as a result.

robwalch commented 1 year ago

so this is problem of safari/chrome or my stream format?

Could be both (Safari Desktop and iPad only - iPhone does not support MSE required by HLS.js). File bugs against the browsers and link here. Thanks.

robertvxt commented 1 year ago

Thanks @robwalch , I saw chrome://media-internals/ complained ISO-BMFF container metadata for video frame indicates that the frame is a keyframe, but the video frame contents indicate the opposite. I will dive deeper into the stream generation and check with chromium community.

In addition, I've tried on Safari iPad and it's able to play the stream. But somehow, there are symptoms as following: ipad_noise_blur ipad_number

Should this be expectation also?

robwalch commented 1 year ago

Should this be expectation also?

There is an open issue for Safari TS>mp4 mux artifacts #5526 that may be related.

Providing a few files that reproduce the artifacts along with a description of the original source, or a comparison to playback using native playback in Safari (does src=m3u8 not produce these artifacts?) will help recognize, track, and test the issue and possible fixes.

robertvxt commented 1 year ago

Thanks @robwalch for supporting, let's close this for now.