HLS stream is not showing all audio tracks
@tianyif is already working on this.
Since Jan 29, 2024.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
So I'm having a scenario with a HLS stream that doesn't show all of the audio tracks and my guess is that this is according to specs but either I can't figure out what I can do about it.
I've searched this github as well as the old exoplayer github for answers but it's difficult to sort out anything that can be of interest for this topic.
What I have is:
- Adaptive HLS with muxed video and audio streams
- Audio contains multiple tracks
What I get is:
- Demo app only shows 1 audio track (first in list)
If I extract one of the streams from the adaptive HLS I get a mpeg-ts stream and if I try to play that I get all the tracks. There is no definition of the tracks in the HLS using any metadata keywords. Is this what is lacking, and if so can it be fixed?
I have followed the code all the way from TsExtractor where it doesn't store the track pid but instead gets the stream type using
int trackId = false && mode == MODE_HLS ? streamType : elementaryPid;
Fast forward into HlsSampleStreamWrapper it seem to filter the tracks using 'sampleQueues' and basically group the audio tracks together so even if I override the code in TsExtractor to output all the tracks it doesn't get past this.
So I stopped debugging and seeing how it is grouped together I figured there might be a flag or something else I missed? Or maybe most likely the HLS is not well formed and will not work. The question is: how can I then make the HLS well formed?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.