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.69k stars 2.56k forks source link

Hls.js displays wrong duration in the video player #3976

Closed iyromanov closed 3 years ago

iyromanov commented 3 years ago

What version of Hls.js are you using?

1.0.4

What browser and OS (including versions) are you using?

macOS Catalina 10.15.7 Chrome 91.0.4472.77

Test stream:

https://api-http.aitube.kz/kz.aitudala.aitube.staticaccess/video/205121f5-16ef-47a3-80ca-b356a73b56d0/video

Configuration:

Default config on demo page:

{
  "debug": true,
  "enableWorker": true,
  "lowLatencyMode": true,
  "backBufferLength": 90
}

Checklist

Steps to reproduce

Open https://hls-js-dev.netlify.com/demo and put https://api-http.aitube.kz/kz.aitudala.aitube.staticaccess/video/205121f5-16ef-47a3-80ca-b356a73b56d0/video

Expected behavior

Duration of the video must be 00:49

Actual behavior

Duration of the video is 54:06:27

Console output

Nothing special

vlazh commented 3 years ago

Same issue. First fragment has very big appendedPTS. Works fine with hls.js@1.0.3.

robwalch commented 3 years ago

Somethings up with your audio. Take a look at remuxAudio; what has changed there; why is the audio appended longer than 4-5 seconds? Set "enableWorker": false, to debug the remuxer.

https://github.com/video-dev/hls.js/blob/v1.0.5/src/remux/mp4-remuxer.ts#L795-L821

robwalch commented 3 years ago

@iyromanov and @vlazh please take a look at #3997 demo build https://deploy-preview-3997--hls-js-dev.netlify.app/demo/ and let me know if this addresses the issue or you see any other AAC related regressions. Thanks!

vlazh commented 3 years ago

@robwalch v1.0.6 works fine for me. Thank you!

iyromanov commented 3 years ago

@robwalch now works as expected, thanks!