HLS muxed audio missing format label
See original GitHub issueWe have the following HLS (live) master playlist:
#EXTM3U
#EXT-X-VERSION:6
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-STREAM-INF:BANDWIDTH=130780,CODECS="mp4a.40.2",AUDIO="aac-primary"
../../<path>/chunklist_ao.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=130780,CODECS="mp4a.40.2",AUDIO="aac-backup"
../../<path>/chunklist_ao.m3u8
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac-primary",NAME="Home",LANGUAGE="eng",DEFAULT=YES,AUTOSELECT=YES,CHANNELS="2"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac-backup",NAME="Home",LANGUAGE="eng",DEFAULT=YES,AUTOSELECT=YES,CHANNELS="2"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac-primary",NAME="Away",LANGUAGE="eng",URI="../../<path>/chunklist_ao.m3u8",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac-backup",NAME="Away",LANGUAGE="eng",URI="../../<path>/chunklist_ao.m3u8",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2"
Based on the HlsPlaylistParser
(line 514), if an audio track has no URI defined, then it will be stored in the muxedAudioFormat
. However in this case, whenever we query the audio tracks, the muxed one has no id/label in the Format
.
See the event logger’s output:
MediaCodecAudioRenderer [
Group:0, adaptive_supported=YES_NOT_SEAMLESS [
[ ] Track:0, id=0, mimeType=audio/mp4a-latm, bitrate=130909, codecs=mp4a.40.2, channels=2, sample_rate=48000, supported=YES
[ ] Track:1, id=1, mimeType=audio/mp4a-latm, bitrate=130909, codecs=mp4a.40.2, channels=2, sample_rate=48000, supported=YES
]
Group:1, adaptive_supported=YES_NOT_SEAMLESS [
[X] Track:0, id=aac-primary:Away, mimeType=audio/mp4a-latm, codecs=mp4a.40.2, channels=2, sample_rate=48000, language=en, label=Away, supported=YES
[ ] Track:1, id=aac-backup:Away, mimeType=audio/mp4a-latm, codecs=mp4a.40.2, channels=2, sample_rate=48000, language=en, label=Away, supported=YES
]
This is causing a problem for us, as we would need to select the tracks based on the labels. The question is whether the missing labels of muxed audio tracks is intentional or if it’s a bug? How could we workaround this issue on our side (without changing the manifest itself)?
Thanks in advance.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
HTTP Live Streaming (HLS) Authoring Specification for Apple ...
Learn the requirements for live and on-demand audio and video content ... The container format for H.264 video MUST be fragmented MP4 (fMP4)...
Read more >Using HLS inputs with AWS Elemental MediaConvert
Learn how to specify an HLS package as an input to AWS Elemental ... For example, given the following EXT-X-MEDIA tags, you can...
Read more >No sound in HLS (.ts) generated by GStreamer (h264 + Opus ...
voaacenc ! aacparse \ ! mux. On the receiving side, I have tried many variations for the 2nd to last line (decoding Opus,...
Read more >Transmuxing Guide - Brightcove Zencoder Documentation
Each of the H.264 video and the audio outputs above have labels in their ... "s3://example-bucket/hls-low/hls-low.m3u8", "label": "hls-low", ...
Read more >draft-pantos-hls-rfc8216bis-12 - IETF Datatracker
Supported Packed Audio formats are Advanced Audio Coding (AAC) with Audio Data Transport Stream ... If it is missing, its value should be...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I apply and test this commit locally, seems it also works for me, thanks very much!
Now we get two following muxed tracks, but the id is same, because we use one muxedAudioFormat, but from our master m3u8 it included two tracks which has no URI defined.
expected
This is a good observation. We’ll take a look; thanks!
There is a TODO about this here. If you’ve implemented it, please feel free to send us a pull request. If you’ve implemented it in a different way then that might also be interesting, or you could try and adapt your approach to match what’s written in the TODO.