video-dev / hls.js Goto Github PK
View Code? Open in Web Editor NEWHLS.js is a JavaScript library that plays HLS in browsers with support for MSE.
Home Page: https://hlsjs.video-dev.org/demo
License: Other
HLS.js is a JavaScript library that plays HLS in browsers with support for MSE.
Home Page: https://hlsjs.video-dev.org/demo
License: Other
What's the priority for audio container support?
@mangui Congrats for hls.js !!!
Would like to know the priority for adding timed metadata support for live streams.
Would be great if you could brief about how you are planning to implement it.
Thanks
Niresh
When I run npm run build
on windows 8.1 it fails at a few points for various reasons.
I am using the MINGW (http://www.mingw.org/) shell.
rm: cannot remove 'dist/*': No such file or directory
. This can be fixed by adding the f
flag. I.e. rm -rf dist/*
test
task and this fails at mocha tests/
withi:\My Documents\GitHub\hls.js\node_modules\mocha\lib\utils.js:626
throw new Error("cannot resolve path (or pattern) '" + path + "'");
^
Error: cannot resolve path (or pattern) 'tests/'
at Object.lookupFiles (i:\My Documents\GitHub\hls.js\node_modules\mocha\lib\utils.js:626:15)
at i:\My Documents\GitHub\hls.js\node_modules\mocha\bin\_mocha:316:30
at Array.forEach (native)
at Object.<anonymous> (i:\My Documents\GitHub\hls.js\node_modules\mocha\bin\_mocha:315:6)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
test
task the build finishes, but the generated javascript files do not export the Hls
variable anywhere for some reason meaning the demo doesn't work.I'm seeing crash using Android 4.3 Samsung galaxy S3, chrome 46.x and videojs plugin.
It's working fine with other Android 4.4.x phones
My chrome browser ( latest/OSX ) loads fragments at 16kb increments always regardless of the source/server throughput, which is really really slow.
Any knowledge on that issue ?
looks like it's JS related
p.s. looks like a promising project !
manifest : https://nl3.seedr.co.il/media/video/lq_hls/c4d55aafa6a931fe63619e48e699ee759dc0f7d4/vid.m3u8
On firefox it fires an endless amount of requests for no apparent reason - not really sure why,
and please note the server runs over nginx/HTTP/2 if it's in any way relevant.
I've tried turning off http/2 but that didn't help either
The server has 200mbit/sec available and should easily push a significantly high-bandwidth stream.
The one I used is very low bandwidth and that doesn't help.
Investigating Android issues with Chrome simulator (currently no device at hand):
http://dailymotion.github.io/hls.js/demo/?src=http%3A%2F%2Fstream.flowplayer.org%2Fdrive.m3u8 errors out
whereas http://dailymotion.github.io/hls.js/demo/?src=http%3A%2F%2Fwww.streambox.fr%2Fplaylists%2Fx36xhzz%2Fx36xhzz.m3u8 does
loadSource:http://stream.flowplayer.org/drive.m3u8
hls.js:100attachVideo
hls.js:267 media source opened
level-controller.js:78 manifest loaded,7 level(s) found, first bitrate:502309
demuxer.js:12 TS demuxing in webworker
level-controller.js:109 switching to level 2
level-controller.js:115 (re)loading playlist for level 2
buffer-controller.js:794 level 2 loaded [0,13],duration:67.9
buffer-controller.js:261 Loading 0 of [0 ,13],level 2, currentTime:0,bufferEnd:0.000
buffer-controller.js:853 Demuxing 0 of [0 ,13],level 2
buffer-controller.js:880 selected A/V codecs for sourceBuffers:mp4a.40.2,avc1.42c01e
buffer-controller.js:909 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/0.000/5.000/0.000/5.000/150
buffer-controller.js:909 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/0.000/5.016/0.000/5.016/108
buffer-controller.js:957 video buffered : [0,4.999999]
level-controller.js:109 switching to level 6
level-controller.js:115 (re)loading playlist for level 6
buffer-controller.js:794 level 6 loaded [0,13],duration:67.966667
buffer-controller.js:261 Loading 1 of [0 ,13],level 6, currentTime:0,bufferEnd:5.300
buffer-controller.js:853 Demuxing 1 of [0 ,13],level 6
buffer-controller.js:909 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/5.067/10.067/5.000/10.000/150
buffer-controller.js:909 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/5.016/10.005/5.016/10.005/107
buffer-controller.js:354 error while trying to append buffer:Failed to execute 'appendBuffer' on 'SourceBuffer': The HTMLMediaElement.error attribute is not null.,try appending later
The same stream works fine in generic HLS. A Dash stream created from the same MP4s works with dash.js.
Any ideas, hints are welcome.
Possible duplicate/overlap with #28.
Hey guys,
I have a stream playing fine on FF but when I try it on Chrome I can see the network streaming the data but I just get a white player with the html controls.
No errors in the console. Just a few warnings:
"level controller,levelLoadError on live stream, discard" - hls.jsmin:1781
"buffer controller: levelLoadError while loading frag,switch to IDLE state ..." hls.js:768
My code looks like this
playStream: function (streamUrl) {
if(Hls.isSupported()) {
console.log("START STREAMING:" + streamUrl);
console.log(streamUrl);
var video = document.getElementById('streamPlayer');
var hlsConfig = { debug: true};
var hls = new Hls(hlsConfig);
hls.loadSource(streamUrl);
hls.attachVideo(video);
hls.on(Hls.ErrorDetails.MANIFEST_LOAD_ERROR, function () {
console.log("MANIFEST_LOAD_ERROR");
});
hls.on(Hls.ErrorDetails.MANIFEST_PARSING_ERROR, function () {
console.log("MANIFEST_PARSING_ERROR");
});
hls.on(Hls.ErrorDetails.MANIFEST_LOAD_TIMEOUT, function () {
console.log("MANIFEST_LOAD_TIMEOUT");
});
hls.on(Hls.ErrorDetails.MANIFEST_LOAD_TIMEOUT, function () {
console.log("MANIFEST_LOAD_TIMEOUT");
});
hls.on(Hls.ErrorTypes.NETWORK_ERROR, function () {
console.log("Hls.ErrorTypes.NETWORK_ERROR");
});
hls.on(Hls.Events.MANIFEST_PARSED, function () {
console.log("SHOULD BE PLAYING:");
video.play();
});
hls.on(Hls.ErrorDetails.FRAG_APPENDING_ERROR, function (data) {
console.log("Frag Appending ERROR");
console.log(data);
debugger;
});
}else{
console.log("MSE not supported");
}
},
I understand there is not to go with, I cannot provide you with the stream as it's a private sports stream. The stream MediaFormat is "HLS" the BitrateLevel is "Adaptive" the file is a ".m3u8"
What I found strange is that this stream "https://s3.amazonaws.com/tablo-theoplayer-testing/playlist.m3u8" plays fine on both browsers.
The following video starts playing but soon run into infinite loop of downloading first and second ts:
http://makostore-vh.akamaihd.net/i/SHORT/CH22_NEWS/2015/09/press_vtr2_n20150903_v1/press_vtr2_n20150903_v1_,500,850,.mp4.csmil/master.m3u8?hdcore=3.0.3
Log in debug:
loadSource:http://makostore-vh.akamaihd.net/i/SHORT/CH22_NEWS/2015/09/press_vtr2_n2015โฆ03_v1/press_vtr2_n20150903_v1_,500,850,.mp4.csmil/master.m3u8?hdcore=3.0.3
hls.js:87 attachVideo
hls.js:254 media source opened
level-controller.js:61 manifest loaded,2 level(s) found, first bitrate:436000
demuxer.js:11 TS demuxing in webworker
level-controller.js:92 switching to level 0
level-controller.js:98 (re)loading playlist for level 0
buffer-controller.js:771 level 0 loaded [1,32],duration:314.646
buffer-controller.js:258 Loading 1 of [1 ,32],level 0, currentTime:0,bufferEnd:0.000
buffer-controller.js:837 Demuxing 1 of [1 ,32],level 0
buffer-controller.js:864 selected A/V codecs for sourceBuffers:mp4a.40.5,avc1.42e01e
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/0.006/10.006/0.000/10.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/0.000/10.008/0.000/10.008/431
level-controller.js:92 switching to level 1
level-controller.js:98 (re)loading playlist for level 1
buffer-controller.js:771 level 1 loaded [1,32],duration:314.646
buffer-controller.js:258 Loading 2 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 2 of [1 ,32],level 1
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/10.006/20.006/10.006/20.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/10.008/20.016/10.008/20.016/431
buffer-controller.js:254 SN just loaded, load next one: 3
buffer-controller.js:258 Loading 3 of [1 ,32],level 1, currentTime:0.488242,bufferEnd:10.299
buffer-controller.js:837 Demuxing 3 of [1 ,32],level 1
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/20.006/30.006/20.006/30.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/20.016/30.000/20.016/30.000/430
buffer-controller.js:258 Loading 2 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 2 of [1 ,32],level 1
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/10.006/20.006/10.006/20.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/10.008/20.016/10.008/20.016/431
buffer-controller.js:254 SN just loaded, load next one: 3
buffer-controller.js:258 Loading 3 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 3 of [1 ,32],level 1
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/20.006/30.006/20.006/30.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/20.016/30.000/20.016/30.000/430
buffer-controller.js:258 Loading 2 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 2 of [1 ,32],level 1
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/10.006/20.006/10.006/20.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/10.008/20.016/10.008/20.016/431
buffer-controller.js:254 SN just loaded, load next one: 3
buffer-controller.js:258 Loading 3 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 3 of [1 ,32],level 1
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/20.006/30.006/20.006/30.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/20.016/30.000/20.016/30.000/430
buffer-controller.js:258 Loading 2 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
level-controller.js:189 level controller,fragLoopLoadingError: emergency switch-down for next fragment
buffer-controller.js:940 buffer controller: fragLoopLoadingError while loading frag,switch to IDLE state ...
level-controller.js:92 switching to level 0
buffer-controller.js:258 Loading 2 of [1 ,32],level 0, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 3 of [1 ,32],level 0
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/20.006/30.006/20.006/30.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/20.016/30.000/20.016/30.000/430
level-controller.js:92 switching to level 1
buffer-controller.js:258 Loading 2 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 2 of [1 ,32],level 0
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/10.006/20.006/10.006/20.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/10.008/20.016/10.008/20.016/431
level-controller.js:92 switching to level 1
buffer-controller.js:254 SN just loaded, load next one: 3
buffer-controller.js:258 Loading 3 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 2 of [1 ,32],level 1
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/10.006/20.006/10.006/20.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/10.008/20.016/10.008/20.016/431
buffer-controller.js:254 SN just loaded, load next one: 3
buffer-controller.js:258 Loading 3 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 3 of [1 ,32],level 1
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/20.006/30.006/20.006/30.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/20.016/30.000/20.016/30.000/430
buffer-controller.js:258 Loading 2 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 3 of [1 ,32],level 1
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/20.006/30.006/20.006/30.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/20.016/30.000/20.016/30.000/430
buffer-controller.js:258 Loading 2 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
level-controller.js:189 level controller,fragLoopLoadingError: emergency switch-down for next fragment
buffer-controller.js:940 buffer controller: fragLoopLoadingError while loading frag,switch to IDLE state ...
buffer-controller.js:837 Demuxing 2 of [1 ,32],level 1
level-controller.js:92 switching to level 0
buffer-controller.js:258 Loading 2 of [1 ,32],level 0, currentTime:0,bufferEnd:10.299
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/10.006/20.006/10.006/20.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/10.008/20.016/10.008/20.016/431
buffer-controller.js:254 SN just loaded, load next one: 3
buffer-controller.js:258 Loading 3 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
level-controller.js:189 level controller,fragLoopLoadingError: emergency switch-down for next fragment
buffer-controller.js:940 buffer controller: fragLoopLoadingError while loading frag,switch to IDLE state ...
level-controller.js:92 switching to level 0
buffer-controller.js:258 Loading 2 of [1 ,32],level 0, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 2 of [1 ,32],level 0
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/10.006/20.006/10.006/20.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/10.008/20.016/10.008/20.016/431
level-controller.js:92 switching to level 1
buffer-controller.js:254 SN just loaded, load next one: 3
buffer-controller.js:258 Loading 3 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 2 of [1 ,32],level 0
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/10.006/20.006/10.006/20.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/10.008/20.016/10.008/20.016/431
level-controller.js:92 switching to level 1
buffer-controller.js:254 SN just loaded, load next one: 3
buffer-controller.js:258 Loading 3 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 3 of [1 ,32],level 1
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/20.006/30.006/20.006/30.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/20.016/30.000/20.016/30.000/430
buffer-controller.js:258 Loading 2 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 3 of [1 ,32],level 1
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/20.006/30.006/20.006/30.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/20.016/30.000/20.016/30.000/430
buffer-controller.js:258 Loading 2 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 2 of [1 ,32],level 1
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/10.006/20.006/10.006/20.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/10.008/20.016/10.008/20.016/431
buffer-controller.js:254 SN just loaded, load next one: 3
buffer-controller.js:258 Loading 3 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
level-controller.js:189 level controller,fragLoopLoadingError: emergency switch-down for next fragment
buffer-controller.js:940 buffer controller: fragLoopLoadingError while loading frag,switch to IDLE state ...
level-controller.js:92 switching to level 0
buffer-controller.js:258 Loading 2 of [1 ,32],level 0, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 2 of [1 ,32],level 1
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/10.006/20.006/10.006/20.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/10.008/20.016/10.008/20.016/431
buffer-controller.js:254 SN just loaded, load next one: 3
buffer-controller.js:258 Loading 3 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
level-controller.js:189 level controller,fragLoopLoadingError: emergency switch-down for next fragment
buffer-controller.js:940 buffer controller: fragLoopLoadingError while loading frag,switch to IDLE state ...
level-controller.js:92 switching to level 0
buffer-controller.js:258 Loading 2 of [1 ,32],level 0, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 2 of [1 ,32],level 0
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/10.006/20.006/10.006/20.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/10.008/20.016/10.008/20.016/431
level-controller.js:92 switching to level 1
buffer-controller.js:254 SN just loaded, load next one: 3
buffer-controller.js:258 Loading 3 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 2 of [1 ,32],level 0
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/10.006/20.006/10.006/20.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/10.008/20.016/10.008/20.016/431
buffer-controller.js:254 SN just loaded, load next one: 3
buffer-controller.js:258 Loading 3 of [1 ,32],level 0, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 3 of [1 ,32],level 1
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/20.006/30.006/20.006/30.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/20.016/30.000/20.016/30.000/430
buffer-controller.js:258 Loading 2 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 2 of [1 ,32],level 1
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/10.006/20.006/10.006/20.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/10.008/20.016/10.008/20.016/431
buffer-controller.js:254 SN just loaded, load next one: 3
buffer-controller.js:258 Loading 3 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
level-controller.js:189 level controller,fragLoopLoadingError: emergency switch-down for next fragment
buffer-controller.js:940 buffer controller: fragLoopLoadingError while loading frag,switch to IDLE state ...
level-controller.js:92 switching to level 0
buffer-controller.js:258 Loading 2 of [1 ,32],level 0, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 2 of [1 ,32],level 0
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/10.006/20.006/10.006/20.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/10.008/20.016/10.008/20.016/431
level-controller.js:92 switching to level 1
buffer-controller.js:254 SN just loaded, load next one: 3
buffer-controller.js:258 Loading 3 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 3 of [1 ,32],level 1
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/20.006/30.006/20.006/30.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/20.016/30.000/20.016/30.000/430
buffer-controller.js:258 Loading 2 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 2 of [1 ,32],level 1
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/10.006/20.006/10.006/20.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/10.008/20.016/10.008/20.016/431
buffer-controller.js:254 SN just loaded, load next one: 3
buffer-controller.js:258 Loading 3 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
level-controller.js:189 level controller,fragLoopLoadingError: emergency switch-down for next fragment
buffer-controller.js:940 buffer controller: fragLoopLoadingError while loading frag,switch to IDLE state ...
level-controller.js:92 switching to level 0
buffer-controller.js:258 Loading 2 of [1 ,32],level 0, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 2 of [1 ,32],level 0
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/10.006/20.006/10.006/20.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/10.008/20.016/10.008/20.016/431
level-controller.js:92 switching to level 1
buffer-controller.js:254 SN just loaded, load next one: 3
buffer-controller.js:258 Loading 3 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 3 of [1 ,32],level 1
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/20.006/30.006/20.006/30.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/20.016/30.000/20.016/30.000/430
buffer-controller.js:258 Loading 2 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 2 of [1 ,32],level 1
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/10.006/20.006/10.006/20.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/10.008/20.016/10.008/20.016/431
buffer-controller.js:254 SN just loaded, load next one: 3
buffer-controller.js:258 Loading 3 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
level-controller.js:189 level controller,fragLoopLoadingError: emergency switch-down for next fragment
buffer-controller.js:940 buffer controller: fragLoopLoadingError while loading frag,switch to IDLE state ...
level-controller.js:92 switching to level 0
buffer-controller.js:258 Loading 2 of [1 ,32],level 0, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 2 of [1 ,32],level 0
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/10.006/20.006/10.006/20.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/10.008/20.016/10.008/20.016/431
level-controller.js:92 switching to level 1
buffer-controller.js:254 SN just loaded, load next one: 3
buffer-controller.js:258 Loading 3 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 3 of [1 ,32],level 1
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/20.006/30.006/20.006/30.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/20.016/30.000/20.016/30.000/430
buffer-controller.js:258 Loading 2 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 2 of [1 ,32],level 1
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/10.006/20.006/10.006/20.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/10.008/20.016/10.008/20.016/431
buffer-controller.js:254 SN just loaded, load next one: 3
buffer-controller.js:258 Loading 3 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
level-controller.js:189 level controller,fragLoopLoadingError: emergency switch-down for next fragment
buffer-controller.js:940 buffer controller: fragLoopLoadingError while loading frag,switch to IDLE state ...
level-controller.js:92 switching to level 0
buffer-controller.js:258 Loading 2 of [1 ,32],level 0, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 2 of [1 ,32],level 0
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/10.006/20.006/10.006/20.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/10.008/20.016/10.008/20.016/431
level-controller.js:92 switching to level 1
buffer-controller.js:254 SN just loaded, load next one: 3
buffer-controller.js:258 Loading 3 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 3 of [1 ,32],level 1
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/20.006/30.006/20.006/30.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/20.016/30.000/20.016/30.000/430
buffer-controller.js:258 Loading 2 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 2 of [1 ,32],level 1
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/10.006/20.006/10.006/20.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/10.008/20.016/10.008/20.016/431
buffer-controller.js:254 SN just loaded, load next one: 3
buffer-controller.js:258 Loading 3 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
level-controller.js:189 level controller,fragLoopLoadingError: emergency switch-down for next fragment
buffer-controller.js:940 buffer controller: fragLoopLoadingError while loading frag,switch to IDLE state ...
level-controller.js:92 switching to level 0
buffer-controller.js:258 Loading 2 of [1 ,32],level 0, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 2 of [1 ,32],level 0
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/10.006/20.006/10.006/20.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/10.008/20.016/10.008/20.016/431
level-controller.js:92 switching to level 1
buffer-controller.js:254 SN just loaded, load next one: 3
buffer-controller.js:258 Loading 3 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 3 of [1 ,32],level 1
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/20.006/30.006/20.006/30.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/20.016/30.000/20.016/30.000/430
buffer-controller.js:258 Loading 2 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
buffer-controller.js:837 Demuxing 2 of [1 ,32],level 1
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/10.006/20.006/10.006/20.006/250
buffer-controller.js:901 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/10.008/20.016/10.008/20.016/431
buffer-controller.js:254 SN just loaded, load next one: 3
buffer-controller.js:258 Loading 3 of [1 ,32],level 1, currentTime:0,bufferEnd:10.299
level-controller.js:189 level controller,fragLoopLoadingError: emergency switch-down for next fragment
buffer-controller.js:940 buffer controller: fragLoopLoadingError while loading frag,switch to IDLE state ...
level-controller.js:92 switching to level 0
buffer-controller.js:258 Loading 2 of [1 ,32],level 0, currentTime:0,bufferEnd:10.299
@mangui - First off: congrats! Very exciting.
Now the bad news ;-)
Mac OS Safari's MediaSource
implementation is rather suboptimal. It hangs with the samples at http://dailymotion.github.io/hls.js/demo/
Some other streams make it at least to the second segment.
As I said, I presume it's Safari's MediaSource
implementation, with MPEG-DASH one encounters similar 'surprises', for instance MediaSource.isTypeSupported
is even less useful than canPlayType
, for instance MediaSource.isTypeSupported('video/mp4; codecs="bogus"')
returns true
.
Not sure whether there's a way around generic hls in Safari yet (e.g. for smooth manual bit rate switching). But maybe you already have ideas.
I am using Flowplayer version, but same happens when using dailymotion demo page.
When video is streamed through hlsjs engine (from common desktop browsers latest Chrome/FF/IE11) there is no audio. When video streams through html5 engine (iOS Safari) sound is OK.
You can check here: http://94.101.229.216/test/html5.html
For simplicity in m3u8 file I left only one bandwidth version, streaming is provided by Adobe Streaming server.
Yet there is no codec version in m3u8 file but I tried different ones, no change. I understand that hlsjs tries to guess right encoding if codec information is not provided.
Same result on http://dailymotion.github.io/hls.js/demo/?src=http%3A%2F%2F94.101.229.216%2Ftest%2Fplaylist1943.m3u8
mp4 file is encoded with this settings:
===================== Video =====================
Id : 1
Format : AVC
Format info : Advanced Video Codec
Format profile : [email protected]
Use of CABAC : Yes
RefFrames : 4 frames
Codec Id : avc1
Codec info : Advanced Video Coding
Duration (ms) : 12mn 38s
Bitrate mode : Variable
===================== Audio =====================
Id : 2
Format : AAC
Format info : Advanced Audio Codec
Format profile : LC
Codec Id : 40
Duration (ms) : 12mn 38s
Source_Duration/String : 12mn 38s
Bitrate mode : Variable
Bitrate : 192 Kbps
Bitrate maximum : 297 Kbps
Channel(s) : 2 channels
ChannelPositions : Front: L R
Sampling rate : 48.0 KHz
Compression_Mode/String : Lossy
https://github.com/dailymotion/hls.js/blob/master/src/demux/exp-golomb.js#L26
Intermittently I run into the issue where availableBytes
equals 0, the video stops, and I have to manually start it again through my application so it reloads the video.
When this error is thrown the source is the blob file, so I don't know how to catch and handle the error in my code. What actually causes availableBytes
to equal 0? Is there a way to recover the stream or avoid this issue?
Using hls.js 0.2.1 inside electron
add a retry mechanism upon xhr timeout / xhr timeout
max nb of retry should be customizable
We are experiencing a stutter with the first few fragments of our playlists.
The duration of each segment is set-up to ramp up until they reach 10 seconds. For example, the first three segments are ~2 seconds each, the next three are ~3 seconds, etc, until they reach ~10 seconds and it stays that length until the end of the stream.
However, during those first few segments, we experience some stuttering. It's hard to say if it occurs at the boundaries of each segment.
Here is an example stream that I kept only the first 6 segments for testing:
When you scroll around slowly, you can see the stutter much more significantly.
hello
i'm beginner and i can't use this file
my issue on the flowplayer is that the flowplayer cant play this file:
http://216.126.193.9/live/video/adab-marefat.m3u8
1- can i play this file by this project?
2- how can i setup this project on the flowplayer in wordpress?
thanks.
Hey, @mangui !
We have a lot of NVR's and cameras and we can't re-encode video due to performance issues.
Some of them is working fine. Some of them not.
For example, we have a couple of cameras with unstable streams (corrupted frames, dropped frames and so on). Firefox, IE and Safari is able to decode this streams but Chrome is not.
The problem is: chrome://media-internals
is not helping. I mean, there is too little debug information in this log. pipeline: decode error
is not enough.
I will try to publish restream on some public-available server.
Meanwhile... let's just say: you have better experience with MSE and maybe you know how to debug MSE in Chrome properly?
PS. HLS.js's log says only error while trying to append buffer:Failed to execute 'appendBuffer' on 'SourceBuffer': The HTMLMediaElement.error attribute is not null.,try appending later
Actual codecs
avc1.66.30 (Constrained Baseline), mp4a.40.2 (AAC-LC)
Either I'm completely out of it or stream.js and jsonpack.js are completely missing from this repository. The player will not load, using my web browser debugger, I'm getting 404 for stream.js and jsonpack.js. They are both nowhere to be found in this repository, or I could just be missing something.
Hi, I have problems with live stream on FF 42.
Video is choppy during appending next ts. Probably this is some problem with buffer length.
You can check my stream on http://dailymotion.github.io/hls.js/demo/?src=http%3A%2F%2Flive.twon.popler.tv%2Fpublishlive%2Fopera_all%2Fplaylist.m3u8
It's working k on Chrome. You have to watch few minutes, because problem is starting after some time playing.
An option to only load last X fragments on start playing.
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:2
#EXT-X-TARGETDURATION:10
#EXTINF:10.010,
1.ts
#EXTINF:10.010,
2.ts
#EXTINF:10.010,
3.ts <---- load it on call hls.loadSource()
In the dist build from 10/15 (525bb79), hls.js is working on my on Windows Phone 8.1 (Luma 920). However, it fails with the latest dist built from 11/3 (0185996).
The play button entirely fails to activate on the current dist build. I am not too familiar with troubleshooting on Windows Phone, so I don't have more information at this time. I am loading an adaptive bitrate m3u8.
Hello,
I have very strange issue with hls.js.
I'm using it to live streaming from my camera. When I'm pressing the button, the command "start making HLS stream" is going to my cam, and m3u8 with slices is generating.
In most of time everything is ok, but often I have bad issue:
Sometimes, I can fix it by calling hls.recoverMediaError() or hls.startLoad from the Chrome's console, but it doesn't always works. In addiction, I don't know which event I should use to call hls.recoverMediaError() in my situation.
I've tried testing in another (flash) player without hls.js and there everyting is working OK.
My parameters:
hls = new Hls({
debug: true,
enableWorker: true,
maxBufferLength: 2,
liveSyncDurationCount: 2,
fragLoadingTimeOut : 2000,
fragLoadingMaxRetry : 6,
fragLoadingRetryDelay : 100,
});
NOTE: This is live camera streaming, so delay and buffer must be short as possible.
Can you help me, please?
Best regards,
Marcin
Hi @mangui firstly thanks for open sourcing this!
Having a few issues with our live stream, and from running some tests it appears to only crop up with higher resolutions. The audio always seems to be fine but the video locks up and goes streaky.
All my tests have been in Chrome.
Here are some of our urls:
We are using wowza as the streaming server.
All of the above urls work fine on iOS and in your flashls player.
Any ideas what might be wrong?
Thanks!
Hi @mangui,
I was wondering if you have considered moving from JS to CoffeeScript. ES6 is indeed nice, but there's still a lot of sugar missing and CS might provide a cleaner code in general, thus improving future collaboration from developers.
If it's something you might be willing to consider let me know, I could start the transition.
Cool project btw (and finally in a language I can contribute to ;))
cheers, c.
I don't mean maxBufferLength, but maxMaxBufferLength
We have a stream with a sliding window. How are we supposed to determine the start time in the video element when the video content actually starts, given that content at the beginning is actually being removed as the stream progresses?
I would have expected the earliest value that seekable
property would return to be this value but seems to be sticking at 0. If I set currentTime
to 0
the play position jumps back to the live point given the content has been deleted.
Thanks!
refs clappr/clappr#668
max buffer length
max IO retry
logs ...
should be configurable through API means
Hey,
I am planning on writing a P2P-extension for this project - great work by the way. Is there a way to only modify the way fragments are loaded? Right now if I change the loader in the configuration, it is called already when the playlist is loaded. I don't seem to be able to find out where the call comes from and manipulate just the fragment loader. I would prefer to load the playlist and use it as a "script" of fragments that I need to download from peers.
Thank ahead,
stiller-leser
follow up of https://bugzilla.mozilla.org/show_bug.cgi?id=1208035
Attempting to watch NASA TV stream:
http://dailymotion.github.io/hls.js/demo/?src=http%3A%2F%2Fnasatv-lh.akamaihd.net%2Fi%2FNASA_101%40319270%2Fmaster.m3u8
shows either stalls or visual corruptions.
This stream http://wowza.streamroot.io:1935/live/stream1/index.m3u8 freezes after a random time (sometimes quite long).
The console shows this error message:
error while trying to append buffer:Failed to execute 'appendBuffer' on 'SourceBuffer': The HTMLMediaElement.error attribute is not null.,try appending later
(buffer-controller.js:354)
which leads me to believe that a segment has not been transmuxed corectly and appended to MSE.
I'm not sure how to give a more precise repro though.
http://flowplayer.blacktrash.org/fp6/hlsjs-pure.html
These work fine with e912b42 (multiple instance aside).
I can try to bisect further.
I've been using video js contrib-hls plugin to provide HLS support to the browser that do not support it.
I would like to experiment with hls.js and video.js. Is there way to use hls.js with video.js right now?
Thanks.
Congrats on this modern work. Curious what the priority for decryption implementation is.
Hi,
First off, thank you for hls.js.. really interesting technology. :-)
I'm encountering an issue with hls.js on desktop versions of chrome - what appears to be corruption of the audio track post trans-mux. Details of platforms/versions tested below.. but, what's interesting is this same video plays fine in desktop chrome using hasplayer.js (test page: http://orange-opensource.github.io/hasplayer.js/1.2.1/dashif.html).
Test page: http://dailymotion.github.io/hls.js/demo/
Test video - option 1: http://216.129.119.216:8090/test-video1/stream.m3u8 (3 bitrates)
Test video - option 2: http://216.129.119.216:8090/test-video1/854x480.m3u8 (highest of the 3 bitrates)
(all encodes are via ffmpeg v2.8.1: AVC [email protected] video and AAC LC audio)
Video fails on:
Chrome 46.0.2490.86 on mac osx 10.11.1
Chrome 46.0.2490.86 on windows 10
Chrome 46.0.2490.86 on windows 7
Chrome 46.0.2490.80 on windows 7
Chrome 46.0.2490.71 on windows 7
Chrome 45.0.2454.85 on windows 7
Chrome 46.0.2490.80 on ubuntu 14.04.3
Video is working:
Chrome 46.0.2490.76 on android (native hls & hls.js)
Firefox 42.0 on android (hls.js)
Firefox 42.0 on windows 7 (hls.js)
Firefox 42.0 on windows 10 (hls.js)
Firefox 42.0 on ubuntu 14.04.3 (hls.js)
Firefox 42.0 on mac osx 10.11.1 (hls.js plays, but partial video corruption during playback)
Safari 9.0.1 on mac osx 10.11.1 (native hls ok & hls.js plays, but partial video corruption during playback)
Safari on ipad 9.1 (native hls)
Edge 20.10240 on windows 10 (hls.js)
The /stream.m3u8 also plays fine in vlc 2.2.1.
Mediainfo and ffplay both report the encode as ok.
chrome://media-internals/
Timestamp Property Value
00:00:00 00 pipeline_state kCreated
00:00:00 00 event WEBMEDIAPLAYER_CREATED
00:00:00 01 url blob:http%3A//dailymotion.github.io/6ec72753-5e99-4858-9297-e14972335e32
00:00:00 05 pipeline_state kInitDemuxer
00:00:01 718 info Audio codec: mp4a.40.2
00:00:01 718 found_audio_stream true
00:00:01 736 audio_codec_name aac
00:00:01 736 duration 20
00:00:01 737 info Video codec: avc1.42c029
00:00:01 737 found_video_stream true
00:00:01 737 video_codec_name h264
00:00:01 738 pipeline_state kInitRenderer
00:00:01 832 audio_dds false
00:00:01 832 audio_decoder FFmpegAudioDecoder
00:00:01 904 video_dds false
00:00:01 904 video_decoder FFmpegVideoDecoder
00:00:01 904 pipeline_state kPlaying
00:00:01 904 seek_target 14
00:00:01 904 pipeline_state kSeeking
00:00:01 906 pipeline_state kPlaying
00:00:01 918 error audio decode error
00:00:01 918 error audio decode error during playing
00:00:01 919 pipeline_error pipeline: decode error
00:00:01 919 pipeline_state kStopping
00:00:01 923 pipeline_state kStopped
debug output from hls.js:
loadSource:http://216.129.119.216:8090/test-video1/stream.m3u8
hls.js:104 attachVideo
hls.js:266 media source opened
level-controller.js:78 manifest loaded,3 level(s) found, first bitrate:400000
demuxer.js:12 demuxing in webworker
level-controller.js:109 switching to level 0
level-controller.js:115 (re)loading playlist for level 0
buffer-controller.js:819 level 0 loaded [38,47],duration:20
buffer-controller.js:833 live playlist - first load, unknown sliding
buffer-controller.js:258 Loading 45 of [38 ,47],level 0, currentTime:14,bufferEnd:14.000
buffer-controller.js:879 Demuxing 45 of [38 ,47],level 0
buffer-controller.js:906 selected A/V codecs for sourceBuffers:mp4a.40.5,avc1.42c029
buffer-controller.js:935 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/14.000/16.000/14.000/16.000/20
buffer-controller.js:935 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/14.076/16.125/14.076/16.125/16
buffer-controller.js:986 video buffered : [14.076488,16]
level-controller.js:109 switching to level 2
level-controller.js:115 (re)loading playlist for level 2
buffer-controller.js:258 Loading 0 of [0 ,63],level 4, currentTime:0,bufferEnd:0.000
buffer-controller.js:774 Uncaught TypeError: Failed to set the 'currentTime' property on 'HTMLMediaElement': The provided double value is non-finite.onVideoMetadata @ buffer-controller.js:774
abr-controller.js:47 Uncaught TypeError: Cannot read property 'length' of undefinedget @ abr-controller.js:47nextLoadLevel @ level-controller.js:232get @ hls.js:206tick @ buffer-controller.js:170onVideoSeeking @ buffer-controller.js:764
buffer-controller.js:819 level 2 loaded [38,47],duration:19.999998
buffer-controller.js:833 live playlist - first load, unknown sliding
buffer-controller.js:216 live playlist, switching playlist, load frag with next SN: 46
buffer-controller.js:258 Loading 46 of [38 ,47],level 2, currentTime:14,bufferEnd:16.300
buffer-controller.js:879 Demuxing 46 of [38 ,47],level 2
buffer-controller.js:935 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:video/16.000/17.842/16.000/17.842/45
buffer-controller.js:935 parsed data, type/startPTS/endPTS/startDTS/endDTS/nb:audio/16.125/17.917/16.125/17.917/15
buffer-controller.js:351 error while trying to append buffer:Failed to execute 'appendBuffer' on 'SourceBuffer': The HTMLMediaElement.error attribute is not null.,try appending latertick @ buffer-controller.js:351onFragParsed @ buffer-controller.js:956EventEmitter.emit @ events.js:80trigger @ hls.js:73onWorkerMessage @ demuxer.js:85
20buffer-controller.js:351 error while trying to append buffer:Failed to execute 'appendBuffer' on 'SourceBuffer': The HTMLMediaElement.error attribute is not null.,try appending later
Any thoughts on this?
Thnx!
This will turn out to be embarrassing for me, but here goes:
How do I create more than one Hls
instance?
This simple example fails miserably: http://flowplayer.blacktrash.org/fp6/hlsjs-pure.html
I'm missing something basic here, but what?
Not sure if this is a transcoding issue or more an encoding / chrome issue, but playback doesn't start on this stream (at least in chrome):
http://azubuhlsliveto5-i.akamaihd.net/hls/live/223502/hls-tokyo-5_1/video84224CHhungryapptv/master.m3u8
The reason is that the player determines that the startPosition is 1782s and seeks accordingly, but the buffered attribute on MSE shows that the start of the buffer is 1782,1xxx seconds. This tiny 0.1s gap between the curentTime and the beginning of the buffer prevents playback from starting.
Seeking at the beginning of the buffer makes the playback start without problem.
I'm not sure exactly where this timestamp problem comes from, but I think this could be handled in the transcoding from TS to MP4.
https://livestream.peer5.com/video/kite/index.m3u8 - sometimes plays, freezes after a few minutes
https://livestream.peer5.com/video/soccer/index.m3u8 - freezes after a few minutes
http://wowza.streams.peer5.com:1935/vod/smil:orionVodSplitAV.smil/playlist.m3u8
Probably because its looking for an inner manifest.
hls.js - cool project, but now project have Chicken and egg problem - people don't use them because traditional video player have there own flash based hls player or non at all
I think, that to solve that problem we need to help them remove there hls-flash based player
What do you think about that?
Hi,
I have successfully bridged hls.js with video.js, and I found an issue.
Video.js expects duration === Infinity
in order to render the propper controls for live streams.
Is there some way to detect wether hls.js has identified a live stream?
from https://github.com/dailymotion/hls.js/issues/22#issuecomment-146040643:
https://s3.amazonaws.com/tablo-theoplayer-testing/playlist.m3u8
the start position of each fragment (as inferred by the playlist via EXTINF) starts to drift away from the start position in the PTS data. This appears to get progressively worse over time.
For example:
Segment | EXTINF range | PTS range | Difference |
---|---|---|---|
#53 | 426 to 436 | 426.459377778 to 436.369277778 | 0.459 |
#368 | 3576 to 3586 | 3579.609366667 to 3589.519277778 | 3.609 |
#586 | 5756 to 5766 | 5761.789366667 to 5771.699266667 | 5.789 |
This gradual drift means that whenever one seeks, the player can't find an appropriate segment, as the data doesn't match up.
flashls logic should be imported in hls.js to cope with fragment drift:
in flashls, fragment duration are recomputed after fragment parsing, and the whole level (fragment start offset and duration) is re-adjusted to take into account any potential drift: https://github.com/mangui/flashls/blob/dev/src/org/mangui/hls/model/Level.as#L274-L368
also, when switching to a level on which PTS is unknown, a PTS analysis is first performed to find the right fragment : https://github.com/mangui/flashls/blob/dev/src/org/mangui/hls/loader/FragmentLoader.as#L682-L775
Just uploaded a test, I can't reproduce this .ts file:
Test Page: http://dailymotion.github.io/hls.js/demo/
Test Video: http://tario.github.io/m3u8test/sample/master.m3u8
I got:
"cannot recover fragLoopLoadingError error"
It fails three times at https://github.com/dailymotion/hls.js/blob/master/src/remux/mp4-remuxer.js#L65
I know it should be OK, because I did:
wget http://tario.github.io/m3u8test/sample/segment2_0_av.ts
ffmpeg -i segment2_0_av.ts output.mp4
vlc output.mp4
And it reproduces fine
Would love to see native support for closed captioning (CEA-608) in this player. If it's in the video stream it should be decoded.
Server sends 404s when the player tries to download expired segments on this stream: http://wowza.streamroot.io/live/stream1/index.m3u8
To repro, play this stream and throttle the bandwidth to 750kbps from chrome debugger.
This part of the code should prevent this to happen: https://github.com/dailymotion/hls.js/blob/master/src/controller/buffer-controller.js#L203-L210
But this stream has variable segment length, which can cause several smaller segments to expire at once if a bigger segment is made available at live edge, and on top of that the total duration of the index is also variable.
This part of the code is executing only the first time we download the manifest:
https://github.com/dailymotion/hls.js/blob/master/src/controller/buffer-controller.js#L816-L818
so with the variable playlist duration this.seekAfterStalling = this.startPosition + sliding;
might be before the start of the playlist when we need to seek.
Reevaluating this.startPosition
everytime we reload the manifest seems to help.
A possible improvement could be as well to limit the max latency we can have from the live edge.
(maybe make the startPosition configurable as well, as a time distance from the live edge)
Another possible improvement would be to loosen the criticity of getting a download error on a fragment for live streaming and try seeking forward if we can't download a segment (with a limited amounts of retries).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.