videojs / video.js

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

unable to play HLS/DASH uhd(4k) #6458

Open TvojTatk0 opened 4 years ago

TvojTatk0 commented 4 years ago

Description

Hello everyone. I have problem with playing uhd(4k) HLS or DASH VOD (without DRM). On android/ios native apps with different players implementation everything works. I normally init player and like always after receiving streaming data I pass src and type into player instance.

player.src({ src: 'https://mydomain/xo-DN4YbGfSo8yPutl3vKA==,1582030616/vod/0050/4670/uhd-jldLyU4I/eng-uhd2_hevc.m3u8', type: 'application/x-mpegURL' });

I'm able to run UHD stream from https://github.com/videojs/videojs-contrib-hls/issues/1309 post when I pass {hls: {bandwidth: 30000000}}}) to videojs options but it doesn't solve my problem

Received m3u8 file:

EXTM3U

EXT-X-VERSION:7

EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_A1",NAME="audio_2",DEFAULT=YES,URI="media_2.m3u8"

EXT-X-STREAM-INF:BANDWIDTH=10000091,RESOLUTION=3840x2160,AUDIO="group_A1"

media_1.m3u8

Received media_1.m3u8 file:

EXTM3U

EXT-X-VERSION:6

EXT-X-TARGETDURATION:4

EXT-X-MEDIA-SEQUENCE:1

EXT-X-MAP:URI="init_1.m4s"

EXTINF:4.000000,

seg_1_000001.m4s

EXTINF:4.000000,

seg_1_000002.m4s

EXTINF:4.000000,

seg_1_000003.m4s

EXTINF:4.000000,

seg_1_000004.m4s

EXTINF:4.000000,

seg_1_000005.m4s

EXTINF:4.000000,

... seg_1_000986.m4s

EXTINF:4.000000,

seg_1_000987.m4s

EXTINF:0.920000,

seg_1_000988.m4s

EXT-X-ENDLIST

Please do you have any advice? I have similar issue with DASH. I'm pretty sure this problem its not caused by videojs player. I don't understand why there are .m4s chunks because regular full hd and stream from post which I mentioned above have .ts chunks.

Thank you

Results

image

Additional Information

versions

videojs

7.7.4 (without videojs-contrib-hls)

browsers

chrome, firefox

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.

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.

ttshivers commented 4 years ago

This issue is still present

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.

ttshivers commented 4 years ago

This issue still exists

gkatsev commented 4 years ago

Is the stream only in HEVC or is it a mixed codec playlist? Most browsers do not support HEVC playback, even on mobile devices. VHS 2.1 which we just put into pre-release (and will go into Video.js soon) has better support for playback of mixed codec streams when the browser supports all codecs. It also fixes a whole bunch of bugs Are you able to share a link to your stream? 4K streams do work but they may load slowly if they are h264 encoded (for example https://videojs-http-streaming.netlify.app/?debug=false&autoplay=false&muted=false&minified=false&liveui=true&partial=false&url=https%3A%2F%2Fd2zihajmogu5jn.cloudfront.net%2F4k-hls%2Fout.m3u8&type=application%2Fx-mpegurl&keysystems=)

ttshivers commented 4 years ago

The example stream on that page causes the error Failed to execute 'appendBuffer' on 'SourceBuffer' on latest chrome 84.0.4147.105 on Windows 10. (https://d2zihajmogu5jn.cloudfront.net/4k-hls/out.m3u8). If you play that stream from the start, the errors appear in the console and the video get stuck forever in buffering at around 30-40 seconds in.

gkatsev commented 4 years ago

Seems to mostly work fine for me, though. I occasionally see the sourcebuffer is full issue. We do plan on addressing the running out of source buffer soon.

stale[bot] commented 3 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.

ttshivers commented 3 years ago

Tested it again and issue is still present. Same procedure as my previous comment.

znoooo commented 3 years ago

Same error here, also if playlist 4K it's not present too (but original video encoded was 4K)

znoooo commented 3 years ago

Problem seems related to high value of bitarate on the video, forced bitarate <3000k and seems works

gkatsev commented 3 years ago

Yeah, high bitrates are the issue. We need to handle clearing the buffer better but haven't had the chance to focus on that yet.

tolew1 commented 3 years ago

I'm unable to support 4k as of now because of this issue. Is there anything we can do or a work around? 4k usage is increasing and it would be great if this is supported.

bastolino commented 3 years ago

Stephan Hesse (@tchakabam) commented here https://github.com/videojs/videojs-contrib-hls/issues/705 that he had a patch against it under here: https://github.com/videojs/videojs-contrib-hls/pull/1242 I have no clue if the issue is really related in deep, but maybe it could help? As this thing (not this issue, just to make sure nothing is misunderstood) seems to be in it for several years now, it was awesome if someone with more knowledge in the VideoJS-Code could have a look at it and maybe even hand in a PR? I'd appreciate any fix, even a good patch :)

gkatsev commented 3 years ago

We have an initial fix for this in Video.js 7.11.7. See more info here https://github.com/videojs/http-streaming/issues/344#issuecomment-797664536

Migacz85 commented 1 year ago

I'm using video.js 8 and still same bug. On egde there is sound no video. Chrome there is video for short time till it breaks and no sound. On android its working but instead of stereo it plays 5.1 sound 👯

ChR-iSz commented 1 year ago

Same here with video.js 8 and Wowza Streaming Server. Only audio with black video...