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

Issue with Playing longer videos via MPEG-Dash #1484

Open
rk9155 opened this issue Feb 6, 2024 · 2 comments
Open

Issue with Playing longer videos via MPEG-Dash #1484

rk9155 opened this issue Feb 6, 2024 · 2 comments

Comments

@rk9155
Copy link

rk9155 commented Feb 6, 2024

Description

We generate MPD file (MPEG-Dash) using ffmpeg and then use the generated mpd and stream files to stream the video (and audio). We are using byte range segments (not time range segments) for generating the stream (chunk) files and generating and generating the strems in three resolutions (240, 480 and 720). When playing shorter videos (upto 10-20 mins long, sometime even longer) the video stream fine. But when we try to stream long video (around 80-90 mins or longer), it doesn't stream (the video keeps buffering forever) at all for the higher resolution.
The difference which we have observed is following:

  • When the video streams fine: the downloaded size of each chunk (byte segment) corresponds to the size requested for that chunk in the range header
  • When the video doesn't stream: the downloaded size (of the few chunks which get downloaded) is way more than the request size in range header. We are observing this problem only for very long videos and that too for higher resolutions (almost always for 720 and more often than not for 480). For shorter videos or 240 resolution it plays fine. We are not seeing any error in console.

Following is the ffmpeg command we are using to generate the mpd and audio/video stream files:
ffmpeg -y -i input_video.mp4 -c:v libx264 -x264opts "keyint=24:min-keyint=24:no-scenecut" -r 24 -c:a aac -b:a 128k -bf 1 -b_strategy 0 -sc_threshold 0 -pix_fmt yuv420p -map 0:v:0 -map 0:a:0? -map 0:v:0 -map 0:a:0? -map 0:v:0 -map 0:a:0? -b:v:0 250k -filter:v:0 "scale=-2:240" -profile:v:0 baseline -b:v:1 750k -filter:v:1 "scale=-2:480" -profile:v:1 main -b:v:2 1500k -filter:v:2 "scale=-2:720" -profile:v:2 high -single_file 1 -f dash output_dash.mpd

Working one
Screenshot 2024-02-06 at 4 20 24 PM
Screenshot 2024-02-06 at 4 23 13 PM

Failed one
Screenshot 2024-02-06 at 4 24 43 PM
Screenshot 2024-02-06 at 4 25 19 PM

Mpd file for failed one
dash.txt

Reduced test case

NA

Steps to reproduce

  1. Create a mpd file for long video using ffmpeg command provided in description
  2. Try to play that video in 480p resolution
  3. Player will stuck in loading

Errors

No any errors displayed in console or in players.

What version of Video.js are you using?

8.9.0

Video.js plugins used.

"jb-videojs-hls-quality-selector" , "videojs-markers-plugin"

What browser(s) including version(s) does this occur with?

Chrome 121

What OS(es) and version(s) does this occur with?

Macbook M1

Copy link

welcome bot commented Feb 6, 2024

👋 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.

@mister-ben mister-ben transferred this issue from videojs/video.js Feb 9, 2024
Copy link

welcome bot commented Feb 9, 2024

👋 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.

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

No branches or pull requests

1 participant