video-dev / hls.js

HLS.js is a JavaScript library that plays HLS in browsers with support for MSE.
https://hlsjs.video-dev.org/demo
Other
14.62k stars 2.56k forks source link

hls.js demo isn't working in Firefox on Ubuntu #475

Closed shacharz closed 8 years ago

shacharz commented 8 years ago

reproduced on: FF 46.0.1 (and a few more lower versions)

OS: NAME="Ubuntu" VERSION="14.04.4 LTS, Trusty Tahr" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 14.04.4 LTS" VERSION_ID="14.04"

reproduce: browse to http://dailymotion.github.io/hls.js/demo/ video isn't playing and there's a message:

you are using Firefox, it looks like MediaSource is not enabled,<br>please ensure the following keys are set appropriately in <b>about:config</b><br>media.mediasource.enabled=true<br>media.mediasource.mp4.enabled=true<br><b>media.mediasource.whitelist=false</b>

which are set by default on these FF versions

chjcken commented 8 years ago

I have just install ubuntu 14.04 on my new PC and have same issue above on firefox 46 but my old one with firefox 46 still work fine even if I uninstall firefox and reinstall it

@mangui Do you have any idea?

shacharz commented 8 years ago

It has to do with FF's mediaSourceExtension: window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'); returns false in FF on ubuntu

I overridden the function, and those are the logs:

window.MediaSource.isTypeSupported = function(){return true;};
function window.MediaSource.isTypeSupported()
 hls.js:8550:7
[log] > loadSource:http://www.streambox.fr/playlists/x36xhzz/x36xhzz.m3u8 hls.js:8550:7
[log] > trigger BUFFER_RESET hls.js:8550:7
[log] > set autoLevelCapping:-1 hls.js:8550:7
[log] > attachMedia hls.js:8550:7
[log] > media source opened hls.js:8550:7
[log] > manifest loaded,5 level(s) found, first bitrate:2149280 hls.js:8550:7
[log] > both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC hls.js:8550:7
[log] > startLoad hls.js:8550:7
[log] > demuxing in webworker hls.js:8550:7
[log] > switching to level 3 hls.js:8550:7
[log] > (re)loading playlist for level 3 hls.js:8550:7
[log] > level 3 loaded [0,63],duration:634.584 hls.js:8550:7
[log] > Loading 0 of [0 ,63],level 3, currentTime:0,bufferEnd:0.000 hls.js:8550:7
[log] > Loaded  0 of level 3 hls.js:8550:7
[log] > Demuxing 0 of [0 ,63],level 3 hls.js:8550:7
[log] > creating sourceBuffer with mimeType:audio/mp4;codecs=mp4a.40.2 hls.js:8550:7
[error] > internal error happened while processing hlsBufferCodecs:Operation is not supported hls.js:8550:7

[log] > track:audio,container:audio/mp4,codecs[level/parsed]=[mp4a.40.2/mp4a.40.2] hls.js:8550:7
[log] > track:video,container:video/mp4,codecs[level/parsed]=[avc1.64001f/avc1.64001f] hls.js:8550:7
[log] > parsed video,PTS:[0.033,10.033],DTS:[0.000/10.000],nb:600 hls.js:8550:7
[log] > parsed audio,PTS:[0.010,10.018],DTS:[0.010/10.018],nb:431
mangui commented 8 years ago

is ffmpeg installed ?

shacharz commented 8 years ago

yea, what does it have to do with it?

mangui commented 8 years ago

what is the output of https://www.jwplayer.com/html5/mediasource/ test section ?

cpeterso commented 8 years ago

is ffmpeg installed ?

yea, what does it have to do with it?

Chrome bundles its own H.264 and AAC decoders, whereas Firefox relies on the operating system to provide H.264 and AAC decoders.

shacharz commented 8 years ago

The Media Source Extensions are available for:

but window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"') returns false

shacharz commented 8 years ago

what is the output of https://www.jwplayer.com/html5/mediasource/ test section ?

FYI that page tests nothing, the test section is static. Just for the kicks here's a Firefox 8!!! passing the tests :)* image

shacharz commented 8 years ago

So yea, apperently the default Repo for Ubuntu 14.04 comes without the needed codecs (The default 16.04 comes with them btw)

Here's a command to add them: sudo apt-get install ubuntu-restricted-extras

Also, here's a tester that actually works.

phloxic commented 8 years ago

@shacharz - the youtube tester will of course still succeed even if media.mediasource.whitelist=true in about:config because youtube is/was whitelisted.

joyson-madtha0 commented 10 months ago

@shacharz @robwalch Do we have any way to catch this error? May be using hls.js api's? I just trying to show error message banner to the user... getting waring message like Media resource blob:[...] could not be decoded.

robwalch commented 10 months ago

Hi @joyson-madtha0,

Please file a new issue.

This issue has been closed for over 7 years. Even if your issue is with Firefox on Ubuntu a lot could have changed since then, and we can't help you without a detailed Bug Report describing how to reproduce the error you are experiencing. Be sure to include the version of hls.js you are using, the platform (OS and browser versions), debug logs (very important for errors/escapes), and other items in the Bug Report Template. Thank you!