Forum Discussion

jj358mhz's avatar
jj358mhz
Channel Surfer
11 years ago

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 🙂

4 Replies

  • You have to explicitly enable caption rendering for the roVideoPlayer. Take a look at roCaptionRenderer and roVideoPlayer.GetCaptionRenderer in the SDK docs.
  • jj358mhz's avatar
    jj358mhz
    Channel Surfer
    Could anyone provide some insight to enabling this functionality?
  • jj358mhz's avatar
    jj358mhz
    Channel Surfer
    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"}