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: 
jj358mhz
Channel Surfer

eia608 Captions w/the Videoplayer SDK Example

Hi,

I am new to developing and I have successfully enabled eia608 caption rendering with the simplevideoplayer SDK example playing a live/linear feed (hls .m3u8). I used the sample code (url modified for my feed) from the support docs in my appMain.brs and it worked great.

videoScreen = CreateObject("roVideoScreen")
subtitle_config = {
TrackName: "eia608/1"
}
metaData = {
Stream: {
Url: "http://server.com/test.m3u8"
}
StreamFormat: "hls"
SubtitleConfig: subtitle_config
}
videoScreen.SetContent( metaData )
videoScreen.Show()


I have now switched to the videoplayer example using XML files to build out a more complicated feed line up (playing the same type of live / linear hls feeds). Everything video and audio plays great, except I cannot get the Roku to enable / render captions. I have tried to model the aforementioned code example in my videoplayer channel but I cannot seem to enable captions on any of my feeds. That code is somewhat static when calling out the playback URL, whereas the videoplayer example requires a more dynamic flow. I have tried tweaking different .brs files and the XMLs but nothing seems to work.

Can anyone with experience provide some guidance and code examples to update my videoplayer channel? My boss was hoping to see a demo of this in use and I know he will want live captions on the feeds.

Many thanks in advance 🙂
0 Kudos
4 REPLIES 4
TheEndless
Channel Surfer

Re: eia608 Captions w/the Videoplayer SDK Example

You have to explicitly enable caption rendering for the roVideoPlayer. Take a look at roCaptionRenderer and roVideoPlayer.GetCaptionRenderer in the SDK docs.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
jj358mhz
Channel Surfer

Re: eia608 Captions w/the Videoplayer SDK Example

It is my understanding that on the newer Roku units running firmware 5.4 or higher, the Videoplayer SDK example uses roVideoScreen, so one does not need to add the other call-outs.

http://sdkdocs.roku.com/display/sdkdoc/ ... on+Support
0 Kudos
jj358mhz
Channel Surfer

Re: eia608 Captions w/the Videoplayer SDK Example

Could anyone provide some insight to enabling this functionality?
0 Kudos
jj358mhz
Channel Surfer

Re: eia608 Captions w/the Videoplayer SDK Example

I figured it out.

Add this line of code in the showFeed.brs file (in the section 'Set Default screen values for items not in feed)

item.SubtitleConfig = {TrackName: "eia608/1"}
0 Kudos