Your Digital Media Has Never Looked So Good

 
jaxim
Topic Author
Posts: 26
Joined: Mon Sep 26, 2016 6:25 am

How to enable closed captioning w/ Video node

Tue Oct 10, 2017 6:04 am

What is the the BrightScript code to enable subtitles if I am using a video node as my video player? I've attempted to enable the player by setting globalCaptionMode to "On"; however the subtitles do not appear.

Also, what formats of closed captioning are supported? Is it only SMPTE-TT, EIA-608, WebVTT as it is indicated on the following documentation URL? The same documentation page makes reference that SRT is available on legacy Roku platforms. However, does this mean that the SRT format not available on all Roku devices?
https://sdkdocs.roku.com/display/sdkdoc/Closed+Caption+Support
 
jaxim
Topic Author
Posts: 26
Joined: Mon Sep 26, 2016 6:25 am

Re: How to enable closed captioning w/ Video node

Tue Oct 10, 2017 9:10 am

Below seems to be the care minimum code to enable the closed captioning. I tested a track with a SRT file and it worked, so it appears Roku also supports SRT files.

videoContent = createObject("RoSGNode", "ContentNode")
videoContent.SubtitleConfig = {
                                    ShowSubtitle: 1,
                                    TrackName: "URL2ClosedCaptioningFile"
                              }
m.video.content = videoContent
m.video.globalCaptionMode = "On"

The additional question I have is that I noticed in some apps, when I click the options button, a closed captioning menu appears. Is this a menu that the app developer created or is this a Roku-made menu that the developer can enable?
 
Joltarin
Posts: 12
Joined: Fri Apr 25, 2014 5:41 pm
Location: New England, USA

Re: How to enable closed captioning w/ Video node

Mon Nov 06, 2017 6:10 pm

jaxim wrote:
The same documentation page makes reference that SRT is available on legacy Roku platforms. However, does this mean that the SRT format not available on all Roku devices?
https://sdkdocs.roku.com/display/sdkdoc/Closed+Caption+Support

No, to me it means that SRT is the only format supported by all Roku players and Roku TVs (and that newer models support additional formats).  FYI, the WebVTT standard is based on SRT.
Roku 3 (4200X) and Roku 2 XS (3100X) with Plex
 
User avatar
RokuCC
Posts: 11
Joined: Tue Nov 07, 2017 12:05 pm

Re: How to enable closed captioning w/ Video node

Tue Nov 07, 2017 12:45 pm

All Roku players supporting a recent firmware release support all those standard as far as I can tell.
 
User avatar
RokuCC
Posts: 11
Joined: Tue Nov 07, 2017 12:05 pm

Re: How to enable closed captioning w/ Video node

Tue Nov 07, 2017 1:45 pm

for the original question:
Video node has a field called "content "
This content has SubtitleTracks, which needs to be populated with side loaded tracks. The demultiplexers for the different container formats will add tracks too.
(video node field availableSubtitleTracks will show the complete set).
Special case is eia608 which needs to be added to SubtitleTracks to kick-start the software so it will start searching for these tracks.
SubtitleConfig  in the content and the video node's subtitleTrack allows a channel to select a track. This is not recommended in 8.0 since it may get in the way of automatic track selection based on the "preferred caption language" menu item.

relevant documents:
https://sdkdocs.roku.com/display/sdkdoc ... +Meta-Data
https://sdkdocs.roku.com/display/sdkdoc/Video

Who is online

Users browsing this forum: No registered users and 2 guests