Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HLS stream subtitles

Im working with HLS HD streams via live channels .
Everythings works fine , outstanding my requirements ,
but i need to include a subtitle stream with the video and audio.
it is possible to use LIVE subtitles in HLS ?
these subtitles streams come along the audio and video , generally in DVB subtitle format.

ffmpeg takes this from original stream

Stream #0:12[0x580]: Video: h264 ([27][0][0][0] / 0x001B), 29.97 tbr, 90k tbn
Stream #0:13[0x581]: Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, 5.1(side), s16, 384 kb/s
Stream #0:14[0xbc2](spa): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)

and convert audio and video smoothly to hls.

but many channels have no sense without subtitles.
maybe putting a first instance of ffmpeg in order to burn subtitles into original video stream ,
but this require more complex process and probably another machine to do this first.
0 Kudos
12 REPLIES 12

Re: HLS stream subtitles

interesting article :

http://www.overdigital.com/2011/12/27/h ... ould-care/

maybe implementation of HDS will be the answer to the subtitle quiz.

this is useful for impaired people.
0 Kudos
Anonymous
Visitor

Re: HLS stream subtitles

Hi Hugo,

We currently have support for subtitles on live and on-demand SmoothStreaming and on-demand HLS. This is all in SMPTE-TT format. We're looking at supporting 608-format closed captions for live HLS, but I don't have any info on potential timing for you at this time
0 Kudos

Re: HLS stream subtitles

ok. any clue to catch info about "support for subtitles on live and on-demand SmoothStreaming and on-demand HLS. This is all in SMPTE-TT format. " ?
0 Kudos
bosborne
Visitor

Re: HLS stream subtitles

I'm looking for details on this as well.
0 Kudos
bosborne
Visitor

Re: HLS stream subtitles

Has there been any update on this? Thanks
0 Kudos
RokuKevin
Visitor

Re: HLS stream subtitles

In order to get closed captioning working, all you have to do is set the subtitleUrl content meta data parameter to the TTML url and turn on and off the captions using the new roVideoScreen method ShowSubtitle( Boolean enable).

--Kevin
0 Kudos
bosborne
Visitor

Re: HLS stream subtitles

Okay, so we need to specify an external TTML file, and Roku doesn't support embedded TTML in Smooth or HLS?
0 Kudos

Re: HLS stream subtitles

ok. i solve this issue this a lot of processors. first decode to mpeg2 , then merge the dvb subs , then recode to h264 ,
works well , even with variable fps (crf=20) , with a final resolution of 850x480 (from 1280x720) in realtime , via an i7 6cores 3.4Ghz.
next week i post the data.
i test some decoders , works best with ffmpeg , but vlc is more stable chopping HLS.
ffmpeg 10.5 only (at least in centos 6.3 64bits), other versions do not work properly selecting streams from dvb multicast udp.

maybe i need to make another post : clues to select reverse-forward ?
on a simple m3u8 list with 8 segments , ever start at the oldest, giving no chance to point to the newest , or at least the subsequent.
theres may be an interesting point . the proccess of encoding takes 99% of processing , while chopping takes only 0.3%
so , with two (or more , via unix tee) you can have (and offer) many m3u8 lists from same "live" HLS with only 9sec of delay (3segments od 3 sec),
or "recorded" HLS from past hour and so on. i tested up to 1440 segments of 1 min , with m3u8 lists of last 60 - 120 - 180 -etc segments .

but i cant jump from segment to another , in order to forward-rewind the "live" HLS.
it is possible?
0 Kudos
bosborne
Visitor

Re: HLS stream subtitles

Just wanted to follow up on my previous question:

"Okay, so we need to specify an external TTML file, and Roku doesn't support embedded TTML in Smooth or HLS?"
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.