Search code examples
ffmpeghttp-live-streaming

How can I call m3u8 with multiple audio


I have the following playlist.m3u8 with multiple audio:

#EXTM3U
#EXT-X-VERSION:3

#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",LANGUAGE="fr",NAME="France",AUTOSELECT=NO,URI="fr/test.m3u8"
 #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",LANGUAGE="en",NAME="English",AUTOSELECT=NO,URI="en/test.m3u8"

#EXT-X-STREAM-INF:BANDWIDTH=800000,RESOLUTION=360x640,AUDIO="audio"
640p.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1400000,RESOLUTION=480x842,AUDIO="audio"
842p.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2800000,RESOLUTION=720x1280,AUDIO="audio"
1280p.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=5000000,RESOLUTION=1080x1920,AUDIO="audio"
1920p.m3u8

if I only call the URL http://XXX.playlist.m3u8, the french audio file is played automatically. I know that the selection of the language in the native player at Apple is displayed like this:

enter image description here

Is there an additional possibility to select the language for example by parameters?

http://XXX.playlist.m3u8?LANGUAGE=DE for example

And is it possible to run two audio files in parallel?


Solution

  • That is not a standard feature if HLS. It would be possible to build a manifest server to do that, but you would need to build and run it.