Skip to content

demux adaptive hls http live streaming mp3 audio sometimes detected as aac lead to no audio or other errors

It seems that when an m3u8 hls playlist contains raw mp3 audio sometimes de demuxer isn't able to detect the corret audio format. This lead to use a wrong decoder that make playback fail.

An example public playlist that lead to errors is this (audio only at time of writing):

http://hls1.addictradio.net/addictrock_hls/playlist.m3u8

...This happens also on playlists with both audio and video.

Looking at the messages window it seems that vlc is trying to use the "faad" decoder that is the wrong choice leading to:

"adaptive error: Failed to create demuxer 0000000000000000 Unknown"

The problem seems to exist on many VLC versions (I use 3.0.16 on Windows but I observed the same error on android VLC 3.4.4 and I've found this thread https://forum.videolan.org/viewtopic.php?t=151610 that could depend on the same issue)

IMPORTANT may be usefull for developers:

I really haven't look at VLC's code and I don't know why VLC is choosing to use faad but it may be usefull to read this page: https://github.com/video-dev/hls.js/pull/1113 That page is a coversation between hls.js developers that may have solved a similar problem in they library in the past. Theyr problem was the difficulty to distinguish between raw mp3 and raw aac. Here's an excerpt:

nochev on 25 Apr 2017

Main problem here is to properly recognize ADTS or MPEG audio frames. For MPEG Version 2 (ISO/IEC 13818-3) first 12 bits are 0xFFF the same as sync word for ADTS.

...As I understand in that page there are some links that show how they solved and hopefully, if the problem is really the same, can be used as references for VLC developers.

Thank you very much!

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information