videojs / video.js

Video.js - open source HTML5 video player
https://videojs.com
Other
38.1k stars 7.45k forks source link

Video Skips First Few Seconds When Using DASH Streaming #6757

Closed Ulsah closed 4 years ago

Ulsah commented 4 years ago

Description

I'm developing a e learning platform that needs video streaming. I user vuejs and laravel for backend. I use DASH streaming to play videos. I use video js with dash.js a videojs-contrib-dash packages. When I try to stream the player skips first few seconds of the video and plays flawlessly. I tested the same source .mpd file in VLC media player and it played with no issues. Can someone please point me in the right direction?

Steps to reproduce

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

  1. Use ffmpeg to segment videos into 480p and 720p chunks and generate the .mpd file
  2. Pass the .mpd file as source to video.js src attribute and type as application/dash+xml
  3. Try playing the video

Results

Video plays after buffering for few seconds from the passed time location

Expected

Video playing from beginning

Actual

Video plays after buffering for few seconds from the passed time location

Additional Information

Here's the code I use in vue js:

// Video Options videoOptions: { autoplay: false, controls: true, preload: true, sources: [] } //Pushing source to videoOptions: // Sets video URL var source = video.link.replace('/public/', '/storage/'); var url = 'http://localhost:8000'+source+'video.mpd'; // The src and type attributes is added into videoOptions to be played var object = { src: url, type: 'application/dash+xml' } this.videoOptions.sources.push(object); this.videoKey += 1;

versions

videojs

Version: 7.8.3

browsers

Mozilla Firefox

OSes

Debian 10

plugins

dash.js and videojs-contrib-dash

welcome[bot] commented 4 years ago

πŸ‘‹ Thanks for opening your first issue here! πŸ‘‹

If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. To help make it easier for us to investigate your issue, please follow the contributing guidelines.

laloix commented 4 years ago

Having the same issue on chrome. Any workaround?

Ulsah commented 4 years ago

There is a discussion going on about the same issue in dash.js github repo. Please visit this link https://github.com/Dash-Industry-Forum/dash.js/issues/3338

deveshmishra34 commented 4 years ago

I was also facing the same issue after updating videojs ....for time being you can downgrade to videojs@7.6.6 and @videojs/http-streaming@1.10.6 it will work

Ulsah commented 4 years ago

Thank you so much for the suggestion. I will try that. Is this an issue with video.js or any other library that is used for DASH streaming?

gkatsev commented 4 years ago

Looks like this will be fixed with VHS 2.1. Tested with https://videojs-http-streaming.netlify.app/?debug=false&autoplay=false&muted=false&minified=false&liveui=true&partial=false&url=https%3A%2F%2Fstorage.googleapis.com%2Fknow-it-282016.appspot.com%2F%2Fstorage%2Fpublic%2FCPU%2Fvideo%2F1%2F9%2FstreamHWvkse.mpd&type=&keysystems= It's our next version of our playback engine. Should be out in Video.js soon. If you're using dashjs then it would mean an update to contrib-dash though, unfortunately, we haven't had the bandwidth to keep that plugin updated.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

gkatsev commented 4 years ago

Video.js 7.10, just released today, includes VHS 2.2.3.