Multi audio tracks with HLS

Hello,

I have one video containing multiples subtitles et multiples audiotracks.

I follow this tutorial to display subtitles on my iPad : https://www.wowza.com/docs/how-to-stream-webvtt-subtitles-to-ios-for-closed-captioning

It’s working great, but now i want to have the possibility to switch audio tracks on my iPad.

There is a tutorial for switching audiotracks on iOS with HLS streaming ?

Thank you !

I implemented “IMediaReaderActionNotify” solution but it’s not what i need.

I want to switch audio tracks like i switch subtitles (in the native iOS player).

Thanks in advance… :slight_smile:

You can do that with Wowza Closed Caption and JW player Flash RTMP playback: you will have a choice of language tracks that you can switch dynamically. And JW player has HLS fallback, but I am not sure if you can switch dynamically with their HLS player. I will have to test, but I don’t think so.

For reference:

https://www.wowza.com/docs/how-to-configure-closed-captioning-for-video-on-demand-streaming#jw

https://www.wowza.com/docs/how-to-use-jw-player-with-wowza-streaming-engine

Richard

Ben,

Sorry, no, this is not supported using Wowza.

Richard

You can do that with Native iOS player and either mp4 or HLS packaged videos. You need to make sure you have subtitle support switched on and you obviously need to have your encode setup for it as well.

On the encode side you need to encode a seperate audio track and if VOD you can embed it as a seperate element in the HTML5 player tags or if live you need to create a segmented aac playlist and include this as alternate audio in your master playlist.

I will add that it is non-trivial and once I get it all down I will write it up but happy to answer specific questions to when I get time.

Hey thanks for your replies !

I thinks it’s possible i found this m3u8 playlist from Apple

#EXTM3U
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="bipbop_audio",LANGUAGE="eng",NAME="BipBop Audio 1",AUTOSELECT=YES,DEFAULT=YES
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="bipbop_audio",LANGUAGE="eng",NAME="BipBop Audio 2",AUTOSELECT=NO,DEFAULT=NO,URI="alternate_audio_aac/prog_index.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="English",AUTOSELECT=YES,FORCED=NO,LANGUAGE="eng",URI="subtitles/eng/prog_index.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="English (Forced)",DEFAULT=YES,AUTOSELECT=YES,FORCED=YES,LANGUAGE="eng",URI="subtitles/eng_forced/prog_index.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Français",AUTOSELECT=YES,FORCED=NO,LANGUAGE="fra",URI="subtitles/fra/prog_index.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Français (Forced)",AUTOSELECT=YES,FORCED=YES,LANGUAGE="fra",URI="subtitles/fra_forced/prog_index.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Español",AUTOSELECT=YES,FORCED=NO,LANGUAGE="spa",URI="subtitles/spa/prog_index.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Español (Forced)",AUTOSELECT=YES,FORCED=YES,LANGUAGE="spa",URI="subtitles/spa_forced/prog_index.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="日本人",AUTOSELECT=YES,FORCED=NO,LANGUAGE="jpn",URI="subtitles/jpn/prog_index.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="日本人 (Forced)",AUTOSELECT=YES,FORCED=YES,LANGUAGE="jpn",URI="subtitles/jpn_forced/prog_index.m3u8"
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=263851,CODECS="mp4a.40.2, avc1.4d400d",RESOLUTION=416x234,AUDIO="bipbop_audio",SUBTITLES="subs"
gear1/prog_index.m3u8
#EXT-X-I-FRAME-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=28451,CODECS="avc1.4d400d",URI="gear1/iframe_index.m3u8"
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=577610,CODECS="mp4a.40.2, avc1.4d401e",RESOLUTION=640x360,AUDIO="bipbop_audio",SUBTITLES="subs"
gear2/prog_index.m3u8
#EXT-X-I-FRAME-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=181534,CODECS="avc1.4d401e",URI="gear2/iframe_index.m3u8"
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=915905,CODECS="mp4a.40.2, avc1.4d401f",RESOLUTION=960x540,AUDIO="bipbop_audio",SUBTITLES="subs"
gear3/prog_index.m3u8
#EXT-X-I-FRAME-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=297056,CODECS="avc1.4d401f",URI="gear3/iframe_index.m3u8"
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1030138,CODECS="mp4a.40.2, avc1.4d401f",RESOLUTION=1280x720,AUDIO="bipbop_audio",SUBTITLES="subs"
gear4/prog_index.m3u8
#EXT-X-I-FRAME-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=339492,CODECS="avc1.4d401f",URI="gear4/iframe_index.m3u8"
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1924009,CODECS="mp4a.40.2, avc1.4d401f",RESOLUTION=1920x1080,AUDIO="bipbop_audio",SUBTITLES="subs"
gear5/prog_index.m3u8
#EXT-X-I-FRAME-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=669554,CODECS="avc1.4d401f",URI="gear5/iframe_index.m3u8"
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=41457,CODECS="mp4a.40.2",AUDIO="bipbop_audio",SUBTITLES="subs"
gear0/prog_index.m3u8

As you can see there is two “EXT-X-MEDIA:TYPE=AUDIO”, it corresponds to audio tracks i can choose.

There is a screenshot of the result on an iPad :

It’s possible to intercept the Wowza playlist.m3u8 creation to add “EXT-X-MEDIA:TYPE=AUDIO” lines ?

Thanks in advance :slight_smile:

I you want to try on iOS :

http://testing.activpik.com/player/test/hls.php

It’s the result i’m looking for. I don’t want to use jwplayer just a video tag like my example

Nobody can help me to find a solution ? :slight_smile: