Hls.js: Mp3 streaming doesn't work

Created on 30 Mar 2017  路  14Comments  路  Source: video-dev/hls.js

Environment

  • [x] The stream has correct Access-Control-Allow-Origin headers (CORS)
  • [x] There are no network errors such as 404s in the browser console when trying to play the stream
  • [x] The issue observed is not already reported by searching on Github under https://github.com/video-dev/hls.js/issues
  • [x] The issue occurs in the latest reference client on http://video-dev.github.io/hls.js/demo and not just on my page
  • Link to playable M3U8 file: http://212.143.237.109:1935/WS40-V01-audio/mp3:0000050B.mp3/playlist.m3u8
  • Hls.js version: 0.74
  • Browser name/version: Chrome 57.0.2987.98
  • OS name/version: Windows 7
Steps to reproduce

Load the provided stream url in hls.js demo page.

Expected behavior

According to https://github.com/video-dev/hls.js/pull/808 & https://github.com/video-dev/hls.js/pull/908 I expect to be able to play Audio only mp3 hls stream but it doesn't work for me.
I'm using Wowza (version 4.4.1) as a streaming server.

Actual behavior

Mp3 stream doesn't work.

Console output
logger.js:39 [log] > destroy
logger.js:39 [log] > detachMedia
logger.js:39 [log] > media source detaching
logger.js:39 [log] > main stream:PARSED->STOPPED
logger.js:39 [log] > loadSource:http://ws40183-v01:1935/WS40-V01-audio/mp3:0000050B.mp3/playlist.m3u8
logger.js:39 [log] > trigger BUFFER_RESET
logger.js:39 [log] > set autoLevelCapping:-1
logger.js:39 [log] > attachMedia
logger.js:39 [log] > media source opened
logger.js:39 [log] > manifest loaded,1 level(s) found, first bitrate:63701
logger.js:39 [log] > startLoad(-1)
logger.js:39 [log] > switching to level 0
logger.js:39 [log] > loading playlist for level 0
logger.js:39 [log] > main stream:STOPPED->IDLE
logger.js:39 [log] > main stream:IDLE->WAITING_LEVEL
logger.js:39 [log] > audio tracks updated
logger.js:39 [log] > subtitle tracks updated
logger.js:39 [log] > level 0 loaded [0,51],duration:516.833
logger.js:39 [log] > main stream:WAITING_LEVEL->IDLE
logger.js:39 [log] > Loading 0 of [0 ,51],level 0, currentTime:0.000,bufferEnd:0.000
logger.js:39 [log] > demuxing in webworker
logger.js:39 [log] > main stream:IDLE->FRAG_LOADING
(index):371 parsing level duration :130us,count:1
logger.js:39 [log] > Loaded  0 of [0 ,51],level 0
logger.js:39 [log] > main stream:FRAG_LOADING->PARSING
logger.js:39 [log] > Parsing 0 of [0 ,51],level 0, cc 0
logger.js:39 [log] > main:discontinuity detected
logger.js:39 [log] > main:switch detected
blob:http://video-dev.github.io/b3c20d84-629a-4944-b97f-930be4b0105f:5038 [log] > manifest codec:undefined,ADTS data:type:2,sampleingIndex:4[44100Hz],channelConfig:0
blob:http://video-dev.github.io/b3c20d84-629a-4944-b97f-930be4b0105f:5038 [log] > parsed codec:mp4a.40.5,rate:44100,nb channel:0
blob:http://video-dev.github.io/b3c20d84-629a-4944-b97f-930be4b0105f:5038 [log] > audio sampling rate : 44100
logger.js:39 [log] > creating sourceBuffer(audio/mp4;codecs=mp4a.40.5)
logger.js:39 [log] > main track:audio,container:audio/mp4,codecs[level/parsed]=[undefined/mp4a.40.5]
logger.js:39 [error] > sourceBuffer error: Event {isTrusted: true, type: "error", target: SourceBuffer, currentTarget: SourceBuffer, eventPhase: 2鈥
(anonymous) @ logger.js:39
onSBUpdateError @ buffer-controller.js:218
(index):529 Object {type: "mediaError", details: "bufferAppendingError", fatal: false}
(anonymous) @ (index):529
EventEmitter.emit @ events.js:96
trigger @ hls.js:82
onSBUpdateError @ buffer-controller.js:222
logger.js:39 [log] > media source ended
logger.js:39 [log] > Parsed audio,PTS:[0.000,0.580],DTS:[0.000/0.580],nb:25,dropped:0
logger.js:39 [error] > trying to append although a media error occured, flush segment and abort
(anonymous) @ logger.js:39
doAppending @ buffer-controller.js:431
onBufferAppending @ buffer-controller.js:289
onEventGeneric @ event-handler.js:65
onEvent @ event-handler.js:53
EventEmitter.emit @ events.js:96
trigger @ hls.js:82
(anonymous) @ stream-controller.js:1125
onFragParsingData @ stream-controller.js:1118
onEventGeneric @ event-handler.js:65
onEvent @ event-handler.js:53
EventEmitter.emit @ events.js:96
trigger @ hls.js:82
onWorkerMessage @ demuxer.js:140
logger.js:39 [error] > trying to append although a media error occured, flush segment and abort
(anonymous) @ logger.js:39
doAppending @ buffer-controller.js:431
onBufferAppending @ buffer-controller.js:289
onEventGeneric @ event-handler.js:65
onEvent @ event-handler.js:53
EventEmitter.emit @ events.js:96
trigger @ hls.js:82
(anonymous) @ stream-controller.js:1125
onFragParsingData @ stream-controller.js:1118
onEventGeneric @ event-handler.js:65
onEvent @ event-handler.js:53
EventEmitter.emit @ events.js:96
trigger @ hls.js:82
onWorkerMessage @ demuxer.js:140
logger.js:39 [log] > main stream:PARSING->PARSED
(index):718 The video could not be loaded, either because the server or network failed or because the format is not supported
handleVideoEvent @ (index):718
logger.js:39 [log] > media source closed

For media errors reported on Chrome browser, please also paste the output of chrome://media-internals 
Enhancement Help wanted

All 14 comments

Hi @alonfixler i just checked your playlist, audio is encapsulated in mp3 container.
I rechecked the code and only mp3 embedded in TS is supported for now. this would require a little bit of work to write a mp3-demuxer.
=> readme is wrong, i will update it.
pinging @nochev who added mp3 support in hls.js

Thank you @mangui !
I've changed cupertinoPacketizeAllStreamsAsTSVOD property on Wowza to be true and now the stream works fine.

Hello,
Sorry for the late inclusion. @alonfixler can you generate a playlist with cupertinoPacketizeAllStreamsAsTSVOD Wowza property to false in order to investigate the issue with mp3 container?

Hi @nochev ,
I've set cupertinoPacketizeAllStreamsAsTSVOD back to false so you can investigate it.
Please let me know when you're done.

Thanks!

Hello @alonfixler and @mangui ,

I managed to enable MPEG audio only support in HLS.js. Here is working demo and pull request https://github.com/video-dev/hls.js/pull/1113. I just copied the playlist to SSL location because demo is running only over HTTPS.

Unfortunately, this doesn't work anymore. Test the demo in @nochev's last comment.

Hi together,

@fwjavox @nochev same trouble here. Playlist will be reloaded, Segments sadly not.

Hello,
Yes the demo was broken due to a bug in hls.js which was deployed for another fix. I updated the demo with latest upstream changes, so now it's working fine.

@nochev Thank you!

@nochev , seems like this is broken again. it's exactly the tool i need so any fix is greatly appreciated.

@eliataylor, hls.js on latest should support audio-only playlists, does it not for you with your own content? From my testing it does.

@nochev it seems like https://pl.streamingvideoprovider.com/mp3-playlist/playlist.m3u8 certificate has expired. Were you the original one who added this into the hls.js testing?

thanks @itsjamie, the demo does work again now. i'm still working on my server but this tool is very handy for isolating the issue between the stream and player.

Hello @itsjamie, I forgot to update the certificate on that server, it's used for testing purposes only. It's updated now, sorry for the inconvenience.

@nochev No inconvenience at all! I was just wondering who would have access, and if we should move it elsewhere if they weren't interested in hosting it anymore. Thank you for handling it right away. Super appreciated.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

harbinha picture harbinha  路  3Comments

fredvb picture fredvb  路  3Comments

mmmmoj picture mmmmoj  路  3Comments

jlacivita picture jlacivita  路  3Comments

GeorgySerga picture GeorgySerga  路  3Comments