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
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.
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 😞
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.
Hey, have you tried our example stream? We are still waiting for the issue to be fixed 😕