HLS stream sample with alternate audio/subtitle tracks

Feature requests for VLC.
KingKebab
Blank Cone
Blank Cone
Posts: 31
Joined: 05 Mar 2012 23:17
Operating System: Windows

HLS stream sample with alternate audio/subtitle tracks

Postby KingKebab » 11 Jul 2016 21:55

Hello,

Here is an HLS stream having :
. 6 video qualities (for Adaptive Bitrate streaming)
. 2 alternate audio tracks (English and French)
. 3 alternate subtitle tracks (English, English with audio description and French)

http://sample.vodobox.com/planete_inter ... rnate.m3u8

I tried to play this HLS stream with the newest VLC 2.2.4 from Windows and Linux operating systems, but I get errors like 404 server isn't responding.
However the same HLS stream plays pretty well on any iOS devices and Mac OSX operating systems.

With online JW Player too :
http://demo.jwplayer.com/stream-tester/ (untick option : Attempt to render in HTML5)

Hope this movie sample will help your team for future developments and VLC will be able to play streams with alternate media tracks.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: HLS stream sample with alternate audio/subtitle tracks

Postby Jean-Baptiste Kempf » 12 Jul 2016 10:59

This seems to work fine in 3.0
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

KingKebab
Blank Cone
Blank Cone
Posts: 31
Joined: 05 Mar 2012 23:17
Operating System: Windows

Re: HLS stream sample with alternate audio/subtitle tracks

Postby KingKebab » 12 Jul 2016 20:09

Hello Jean-Baptiste

I confirm VLC 3.0 can now start and play this HLS stream without providing error messages.

However :
. the scrollbar to forward/backward the time duration of the movie isn't working
. audio doesn't play the good sound track when changed
. subtitle tracks aren't found

I use VLC 2.0.3 for Android on my mobile devices and I find the same troubles.

To support alternate audio and subtitles tracks of a HLS stream, it requires many times of work. Alternate audio tracks have to override the main audio track for the playback. And subtitles are segmented into WebVTT streams. So it's not hurry :wink:

All I can provide is this proper HLS stream sample embedding multi audio/subtitle contents.
Hope you'll find it useful because it's not very easy to get a similar.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: HLS stream sample with alternate audio/subtitle tracks

Postby Jean-Baptiste Kempf » 25 Jul 2016 11:50

1) live -> no scrollbar
2) indeed
3) what format is it?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

KingKebab
Blank Cone
Blank Cone
Posts: 31
Joined: 05 Mar 2012 23:17
Operating System: Windows

Re: HLS stream sample with alternate audio/subtitle tracks

Postby KingKebab » 27 Jul 2016 23:50

Hello Jean-Baptiste,

[1] This HLS stream isn't a live stream but a pre-encoded HLS stream for VOD purpose.
Hosted and shared over Internet by a common Web server.
Each video playlists (M3U8) is closed with the #EXT-X-ENDLIST tag.

For your checking, here is URLs for each video stream qualities :

Code: Select all

. http://sample.vodobox.com/planete_interdite/low/planete_interdite_228_h264_144p.m3u8 . http://sample.vodobox.com/planete_interdite/medium/planete_interdite_500_h264_240p.m3u8 . http://sample.vodobox.com/planete_interdite/high/planete_interdite_1228_q264_360p.m3u8 . http://sample.vodobox.com/planete_interdite/veryhigh/planete_interdite_2080_q264_480p.m3u8 . http://sample.vodobox.com/planete_interdite/hdready/planete_interdite_4160_n264_720p.m3u8 . http://sample.vodobox.com/planete_interdite/fullhd/planete_interdite_8256_n264_1080p.m3u8
When reading each video stream qualities singly with VLC 3.0.0 its scrollbar works perfectly. But when VLC 3.0.0 is using the HLS master playlist to detect adaptive bitrate video tracks and the multiple audio+subtitle tracks, its scrollbar load, display the video time length properly (1 hour and 38 minutes). But it's not able to forward or rewind the video time duration. Scrollbar is in live TV mode instead of VOD mode.

When playing the same stream with two different master playlists (M3U8).

Scrollbar works perfectly with the adaptive bitrate master playlist :
http://sample.vodobox.com/planete_inter ... rdite.m3u8

But scrollbar becomes sick with the adaptive bitrate + alternates audio and subtitles master playlist :
http://sample.vodobox.com/planete_inter ... rnate.m3u8

So, I suppose something goes wrong while parsing the M3U8 master playlist (planete_interdite_alternate.m3u8) with alternates audio and subtitle tracks. And VLC thinks video is like a live HLS stream.


[3] Apple decided HLS streams must provide subtitles as segmented WebVTT files.

This is information about WebVTT format :
http://www.w3.org/TR/webvtt1/

And here are some extracts of the HTTP Live Stream documentation about the subtitle file segmentation :
Subtitle segments are formatted as WebVTT [WebVTT] files. Each subtitle segment MUST contain all subtitle cues that are intended to be displayed during the period indicated by the segment EXTINF duration. The start time offset and end time offset of each cue MUST indicate the total display time for that cue, even if part of the cue time range is outside the segment period. A WebVTT segment MAY contain no cues; this indicates that no subtitles are to be displayed during that period.

Each subtitle segment MUST either start with a WebVTT header or have a Media Initialization Section declared in the Media Playlist (Section 4.3.2.5).
Source : https://tools.ietf.org/html/draft-panto ... reaming-19


I hope my explanations are relevant and will serve your searches.

KingKebab
Blank Cone
Blank Cone
Posts: 31
Joined: 05 Mar 2012 23:17
Operating System: Windows

Re: HLS stream sample with alternate audio/subtitle tracks

Postby KingKebab » 28 Jul 2016 01:22

Oh ! I have a very good new :o

I just tested the VLC 3.0.0 GIT 2016-07-27 nightly build and the scrollbar is now working properly as VOD with adaptive bitrate and with adaptive bitrate + alternate audio and subtitle tracks.

This means you already solved [1] trouble.
All my congratulations :D

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: HLS stream sample with alternate audio/subtitle tracks

Postby Jean-Baptiste Kempf » 28 Jul 2016 22:06

This means you already solved [1] trouble.
All my congratulations :D
We solved some of it, yes :)
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “VLC media player Feature Requests”

Who is online

Users browsing this forum: No registered users and 12 guests