videojs / http-streaming

HLS, DASH, and future HTTP streaming protocols library for video.js
https://videojs-http-streaming.netlify.app/
Other
2.45k stars 416 forks source link

DASH playlist cannot scrub forward in time #1517

Open molten-firescar96 opened 1 month ago

molten-firescar96 commented 1 month ago

Description

Tags: timing, PTS, DTS, scrubbing, seeking, DASH manifest, byte offset After upgrading to version 8.12.0 of videojs I can no longer scrub to a future time in my dash manifest. Something changed in how videojs calculates which segment of video to download. I've noticed in the player stats, that when I scrub to a future time, one segment of video for a much earlier time, up to 60 seconds earlier is downloaded to the video buffer, and no further downloads are made.

The same DASH stream still works in the videojs-contrib-dash test player, which I suspect used to use the same approach to filling the video buffer as http-streaming. None of the available optional flags on the test player seem to fix the problem.

Sources

This test stream can be used https://mtonomy-dev.s3.amazonaws.com/622fe341ea9e4290e7c4c0f5/video_file2022-07-11-03-57-5262cb9fc094e14ab524cc0fb9/frag_3000/stream.mpd

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.

  1. Visit the http-streaming test player: https://videojs-http-streaming.netlify.app/
  2. Input this test url
  3. Visit the videojs-contrib-dash test player: https://videojs.github.io/videojs-contrib-dash/ and try the same stream

Results

Although the video stream starts correctly, scrubbing causes the video playlist to be removed

Additional Information

My hypothesis is that the issue is related to the difference in duration between segments of video. Since not all of my video segments are exactly the same duration (eg. 4 seconds). I noticed that HLS playlists define duration and byte ranges on a per segment level, but it seems DASH playlists can only define segments by byte range, or duration, not both.

I was previously on videojs version 8.10.0, which mostly worked, but for some of my streams I encountered segments being repetitively redownloaded. This issue was fixed in the upgrade to version, 8.12.0 and VHS 3.12.1.

Browsers

Chrome and Firefox DASH stream are affected. My HLS streams generated from the same source video are okay.

molten-firescar96 commented 4 days ago

The HLS streams are okay, and HLS streams include both segment timing and segment byte size information. Because of this we were able to determine that videos with large discrepancies, in our tests up to 7 seconds, between the sizes of segments would cause scrubbing issues when used with a DASH manifest.

Would someone from the videojs team, maybe @mister-ben, be able to attempt to reproduce the issue?

mister-ben commented 2 days ago

I can reproduce on Chrome 126 on Sonoma, but others are troubleshoot this type of issue further than I. It would be useful to narrow down the exact version where things changed, do any of the 8.11.x versions behave as 8.12.0?

Player logs