Roku Direct Publisher

Roku Direct Publisher - the easiest way to create a great TV experience. Learn more about how to create a Roku channel and share your experiences with others.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
billgaffney3
Visitor

TTML Captions Not Displaying

Thank you in advance for reviewing my question.

As a quick summary, we building a channel by leveraging the Direct Publisher option in the dev site.  The associated content type  "shortFormVideo" feed -- produced as Direct Publisher Feed (JSON) -- is successfully being read according to its "Feed Status".  The problem is that while we are not seeing any errors, our captions are not rendering on screen (we have confirmed that captions are enabled on the testing device).  While captions are optional for the content type, we need them to be included.  

Below is an abridged example of the feed...
{
"providerName": "KMOV.com",
"lastUpdated": "2017-09-12T20:04:54+00:00",
"language": "en",
"shortFormVideos": [{
"id": "Clip13702236",
"title": "C-17 jets take off from Scott Air Force Base to bring supplies to Hurricane Irma victims",
"shortDescription": "U.S. Air Force pilots are delivering supplies to Hurricane Irma victims in Florida.",
"genres": ["news"],
"tags": ["news"],
"releaseDate": "2017-09-12T17:22:14+00:00",
"longDescription": "U.S. Air Force pilots are delivering supplies to Hurricane Irma victims in Florida.",
"thumbnail": "http:\/\/cdn-images.meredithlmg.com\/KMOV\/800\/16:9\/13702236_vf.jpg",
"content": {
"dateAdded": "2017-09-12T17:22:14+00:00",
"duration": 125,
"videos": [{
"url": "http:\/\/kmov.videodownload.worldnow.com\/KMOV_1209201712165100000AA.mp4",
"videoType": "MP4",
"bitrate": 3157813,
"quality": "HD"
}, {
"url": "http:\/\/kmov.videodownload.worldnow.com\/KMOV_1209201712165100000AB.mp4",
"videoType": "MP4",
"bitrate": 961178,
"quality": "HD"
}],
"captions": {
"url": "http:\/\/KMOV.images.worldnow.com\/metadata\/13702236.ttml",
"language": "en",
"captionType": "CLOSED_CAPTION"
}
}
}],
"categories": [{
"name": "Top Headlines",
"playlistName": "News",
"order": "most_recent"
}]
}

And below is an abridged example of the TTML embedded in the feed above...
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<tt xmlns:tts="http://www.w3.org/ns/ttml#styling" xmlns:ttm="http://www.w3.org/ns/ttml#metadata" xml:lang="en" xmlns="http://www.w3.org/ns/ttml">
    <head>
        <styling>
            <style xml:id="captionsStyle" tts:fontFamily="Arial" tts:color="#ffffffff" tts:backgroundColor="#00000087" />
        </styling>
        <layout>
            <region xml:id="captionsRegion">
                <style style="captionsStyle" tts:origin="10% 56%" tts:extent="80% 10%" tts:fontSize="100%" tts:textAlign="center" tts:displayAlign="center" />
            </region>
        </layout>
    </head>
    <body>
        <div region="captionsRegion" ttm:role="captions">
            <p begin="00:00:01.80" end="00:00:04.24">IT LOOKS LIKE A A GREAT TIME.</p>
            <p begin="00:00:04.27" end="00:00:04.97">AND WE ARE FOLLOWING BREAKING</p>
            <p begin="00:00:05.00" end="00:00:10.00">NEWS IS AN APARTMENT FIRE IN</p>
...
            <p begin="00:01:14.34" end="00:01:16.04">MOTHER WANTED TO GIVE YOU THIS</p>
            <p begin="00:01:16.08" end="00:01:20.65">LOOK AND WHAT AN INCREDIBLE COME</p>
            <p begin="00:01:20.68" end="00:01:21.31">INCREDIBLY SCARY SITUATION.</p>
        </div>
    </body>
</tt>

Is there an additional tool to help confirm the integrity of the TTML feed as to its compliance with Roku's needs?  Is there anything that jumps out at anyone who has successfully associated captions?  Thank you in advance for your help.

Regards,
Bill Gaffney
0 Kudos
1 REPLY 1
billgaffney3
Visitor

Re: TTML Captions Not Displaying

ANSWERED:
Self answering the question based off looking at other forum member's JSON (thank you all).   Captions are a list and each caption is an item, and as such I needed to wrap them in a square bracket.

Corrected:
"captions": [ { object }, { object } ]

Corrected JSON...
{
"providerName": "kmov.com",
"lastUpdated": "2017-09-12T21:09:37+00:00",
"language": "en",
"shortFormVideos": [{
"id": "Clip13702236",
"title": "C-17 jets take off from Scott Air Force Base to bring supplies to Hurricane Irma victims",
"shortDescription": "U.S. Air Force pilots are delivering supplies to Hurricane Irma victims in Florida.",
"genres": ["news"],
"tags": ["news"],
"releaseDate": "2017-09-12T17:22:14+00:00",
"longDescription": "U.S. Air Force pilots are delivering supplies to Hurricane Irma victims in Florida.",
"thumbnail": "http:\/\/cdn-images.meredithlmg.com\/KMOV\/800\/16:9\/13702236_vf.jpg",
"content": {
"dateAdded": "2017-09-12T17:22:14+00:00",
"duration": 125,
"videos": [{
"url": "http:\/\/kmov.videodownload.worldnow.com\/KMOV_1209201712165100000AA.mp4",
"videoType": "MP4",
"bitrate": 3157813,
"quality": "HD"
}, {
"url": "http:\/\/kmov.videodownload.worldnow.com\/KMOV_1209201712165100000AB.mp4",
"videoType": "MP4",
"bitrate": 961178,
"quality": "HD"
}],
"captions": [{
"url": "http:\/\/KMOV.images.worldnow.com\/metadata\/13702236.ttml",
"language": "en",
"captionType": "CLOSED_CAPTION"
}]
}
}],
"categories": [{
"name": "Top Headlines",
"playlistName": "News",
"order": "most_recent"
}]
}

Caption now operating beautifully.  Thanks again for sharing your JSON in the forums.
0 Kudos