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: 
Alien1
Reel Rookie

Player bug in processing WebVTT subtitles

Hey,

I've came across a problem trying to display WebVTT subtitles in HLS. Displaying subtitles by RokuTV (version 12.0.0, build 4184-50) for our MPEG-TS streams seemed to be working randomly. In some streams the subtitles were rendered just fine, whereas in others they were not displayed at all, or were appearing and disappearing randomly. The worst was that the behavior was not always deterministic and I could not reproduce the issue even under same conditions. Our other platforms did not have this issue and rendered subtitles properly.

After several hours of debugging it started to be apparent that there must be a bug in Roku Video player when processing subtitles in WebVTT format with the time bigger than approximately 6 hours and 37 mins.

Example of vtt file (the time for our subtitles can vary from 0 to 26,5 hours, with X-TIMESTAMP-MAP always set to 0):

 

WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:0

06:52:49.468 --> 06:52:51.972
Some text...

 

 

I discussed the problem with co-workers and the magic time 6 h 37 min seems to have it's reason:

6 hours 37 mins = 23820 seconds. With fixed PTS=90kHz in MPEG-TS stream we have 23820*90000 = ~2,147,483,647 which is max value for signed 32 integer (2^31).

So it seems this value is stored by Roku in int32 which under specified conditions just overflows and causes subtitles stop displaying properly. 

Now we are kind of stuck, because we need to support live streams as well as catchup on TV channels and with our current technology we are unable to bypass this bug 😞

Any chance it will be fixed soon?

Thanks

 

0 Kudos
5 REPLIES 5
RokuBen
Community Moderator
Community Moderator

Re: Player bug in processing WebVTT subtitles

Thanks for the detailed debugging. I've opened an internal issue for this, but it would be good to also open the issue with Roku partner success in order to add priority to it.

0 Kudos
Alien1
Reel Rookie

Re: Player bug in processing WebVTT subtitles

Hello, any progress fixing this bug?

Approx two months ago I got info from your colleague (Roku Partner Success) that bug ticket was created and the issue should have been fixed in OS 12.5.

I just tested it on TLC with updated OS to version 12.5.0 (build 4176) and the bug remains there 😞

0 Kudos
RokuBen
Community Moderator
Community Moderator

Re: Player bug in processing WebVTT subtitles

I saw code changes go into the build for this, but maybe it fixed a different issue than your original report.  The fix was called "webvtt fails on live streams after 6 hr and 37 min" and that was merged into the 12.5.0 branch in August.  The involved upgrading the internal variables used to parser timestamps from WebVTT files to 64-bit.

0 Kudos
Alien1
Reel Rookie

Re: Player bug in processing WebVTT subtitles

Oh, then there is probably some other issue in player.

We have been testing subtitles behavior on our example stream.

You can test it in web browser in to see that subtitles are displayed properly in whole stream (except few seconds in the beginning where the ad is playing).

If you play the same stream in Roku, subtitles 100% work in first half of the stream, but in second half they behave very non-deterministically - sometimes they show up, sometimes don't. Just try to seek backward and forward multiple times in the stream + reset player multiple times. After few tries you will see the problem.
0 Kudos
Alien1
Reel Rookie

Re: Player bug in processing WebVTT subtitles

Hey, have you tried our example stream? We are still waiting for the issue to be fixed 😕

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.