Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support IMSC1 in HLS #986

Closed
avelad opened this issue Aug 24, 2017 · 4 comments
Closed

Support IMSC1 in HLS #986

avelad opened this issue Aug 24, 2017 · 4 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Milestone

Comments

@avelad
Copy link
Member

avelad commented Aug 24, 2017

IMSC1 in HLS

Carried as XML text inside fMP4 Segments
HLS defines support for the IMSC1 Text profile
Mark your Media Playlists as IMSC1 with the CODECS attribute
• CODECS="stpp.TTML.im1t, …"

//IMSC1 alongside WebVTT in a Master Playlist
#EXTM3U
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="vtt",LANGUAGE="eng",NAME="English",URI="vtt.m3u8"
#EXT-X-STREAM-INF:BANDWIDTH=90000,CODECS="avc1.4d001e,ac-3",SUBTITLES="vtt"
bipbop_gear1/prog_index.m3u8
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="imsc",LANGUAGE="eng",NAME="English",URI="imsc.m3u8"
#EXT-X-STREAM-INF:BANDWIDTH=90000,CODECS="avc1.4d001e,ac-3,stpp.TTML.im1t",SUBTITLES="imsc"
bipbop_gear1/prog_index.m3u8

Documentation:
https://devstreaming-cdn.apple.com/videos/wwdc/2017/504op4c3001w2f222/504/504_advances_in_http_live_streaming.pdf
https://developer.apple.com/videos/play/wwdc2017/504/
https://developer.apple.com/streaming/HLS-WWDC-2017-Preliminary-Spec.pdf

@joeyparrish joeyparrish added flag: good first issue This might be a relatively easy issue; good for new contributors type: enhancement New feature or request labels Aug 24, 2017
@joeyparrish
Copy link
Member

We already support TTML in MP4 (independent of any particular manifest format such as HLS or DASH). The parser for TTML in MP4 is registered by MIME type and codec string, so we can simply add "stpp.TTML.im1t" to that registration:

https://github.com/google/shaka-player/blob/33c38e9c7ef47abb35b7bd27e374999ab5b64b22/lib/text/mp4_ttml_parser.js#L91

@joeyparrish joeyparrish added this to the v2.3.0 milestone Aug 24, 2017
@joeyparrish joeyparrish self-assigned this Aug 24, 2017
@ismena
Copy link
Contributor

ismena commented Aug 24, 2017

Small nit: hls parser currently assumes all text streams it encounters are vtt, so will need to update it as well.

@joeyparrish joeyparrish removed the flag: good first issue This might be a relatively easy issue; good for new contributors label Aug 28, 2017
@joeyparrish
Copy link
Member

This turns out to be much more complicated than I realized. Still working on the solution. Thanks!

joeyparrish added a commit that referenced this issue Aug 31, 2017
Previously, our HLS implementation only supported WebVTT, because
that seemed to be the only supported format in HLS.

Now, we add support for other formats by extending the MIME and codec
guessing system to text streams.  We also add a parser registration
for HLS's new "stpp.TTML.im1t" codec string.

Closes #986

Change-Id: I0a58ca4650675ff0546e36edf4114290f7931239
@joeyparrish
Copy link
Member

Cherry-picked to v2.2.1

@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants