Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video Skips First Few Seconds When Using DASH Streaming #3338

Closed
3 tasks done
Ulsah opened this issue Jul 15, 2020 · 13 comments
Closed
3 tasks done

Video Skips First Few Seconds When Using DASH Streaming #3338

Ulsah opened this issue Jul 15, 2020 · 13 comments
Assignees
Milestone

Comments

@Ulsah
Copy link

Ulsah commented Jul 15, 2020

#3335 ### Environment

  • Link to playable MPD file:
  • Dash.js version: 3.1.1
  • Browser name/version: Mozilla Firefox/68.8.0esr
  • OS name/version: Debian 10

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
  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
Observed behaviour

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;

@dsilhavy
Copy link
Collaborator

Can you please host your content so we can check? Moreover, please test in plain dash.js:
http://reference.dashif.org/dash.js/nightly/samples/dash-if-reference-player/index.html

@dsilhavy dsilhavy added this to the 3.1.3 milestone Jul 20, 2020
@dsilhavy dsilhavy self-assigned this Jul 20, 2020
@Ulsah
Copy link
Author

Ulsah commented Jul 22, 2020

We hosted a sample .mpd file on our cloud storage for you to test. Here is the link:

https://storage.cloud.google.com/know-it-282016.appspot.com//storage/testchunks/Intro%20to%20CPU.mpd

I tested it in the link given above, but it was failing because CORS requests were getting blocked. Please check the link and see what's the issue.

Thank you.

@dsilhavy
Copy link
Collaborator

@Ulsah I need a playable sample in order to help you, just looking at the manifest won't help. Please host the content and the media segments on a server with CORS enabled.

@Ulsah
Copy link
Author

Ulsah commented Jul 25, 2020

The content and media segments are hosted and CORS is enabled in our cloud storage. The link I provided is the is URL to the manifest file which can be used to play the content. Its the link we used to test the playing on our live server and that's where I found out the issue.

@dsilhavy
Copy link
Collaborator

@Ulsah I still see the CORS issues:
Access to XMLHttpRequest at 'https://storage.cloud.google.com/know-it-282016.appspot.com//storage/testchunks/Intro%20to%20CPU.mpd' from origin 'http://reference.dashif.org' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
XHRLoader.js:79 GET https://storage.cloud.google.com/know-it-282016.appspot.com//storage/testchunks/Intro%20to%20CPU.mpd net::ERR_FAILED

@Ulsah
Copy link
Author

Ulsah commented Jul 28, 2020

I apologize. We're currently performing some maintenance on our server and storage. I will post a new link here once its finished. I will get back asap. Thank you.

@Ulsah
Copy link
Author

Ulsah commented Jul 30, 2020

Here is a working link https://storage.googleapis.com/know-it-282016.appspot.com//storage/public/CPU/video/1/9/streamHWvkse.mpd. I tested it in the site you've mentioned. And as I said I have to either wait or skip the first few seconds for the video to play correctly.

@the-provost
Copy link

Still persists

@dsilhavy
Copy link
Collaborator

dsilhavy commented Aug 3, 2020

@Ulsah I checked in the ref client with Firefox 79 on MacOS: http://reference.dashif.org/dash.js/nightly/samples/dash-if-reference-player/index.html

Video starts fine for me, please check if the problem occurs for you in the ref demo page as well. I do not have a Debian system with a Firefox 68 so I will not be able to test your environment

@Ulsah
Copy link
Author

Ulsah commented Aug 5, 2020

The video playback is fine now in the reference player. It wasn't earlier. Did you make any changes or perhaps is there a workaround for this issue?

There is also a discussion happening in the video.js repo. Here is the link: videojs/video.js#6757

@dsilhavy
Copy link
Collaborator

The seek logic at startup was changed in 3.1.2, maybe that fixed your issue. If it is not working with video.js it might be related to an older version of dash.js or a different initialization of dash.js.

@Ulsah
Copy link
Author

Ulsah commented Aug 13, 2020

I've worked around the issue for now using an older version of video.js and video-http-streaming. If there's an update I'll post it here

@dsilhavy
Copy link
Collaborator

Ok I will close this for now as this is not an issue in the current version of dash.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants