Dash-Industry-Forum / dash.js

A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers.
http://reference.dashif.org/dash.js/nightly/samples/dash-if-reference-player/index.html
Other
5.09k stars 1.67k forks source link

Live subtitle test source available, but TTML timestamps too restrictive for live services. #614

Closed TobbeMobiTV closed 9 years ago

TobbeMobiTV commented 9 years ago

The TTML parser follows the conventions in http://www.w3.org/TR/ttml10-sdp-us which limits the timing to 24hours. This is not an appropriate choice for DASH live service where the sessions may be much longer.

In the TTML spec itself, it is said that there should be at least two hours in the timestamp.

Line 48 in TTMLParser.js should thus be changed from

    timingRegex = /^(0[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])((\.[0-9][0-9][0-9])|(:[0-9][0-9]))$/,

to something like

    timingRegex = /^([0-9][0-9]+):([0-5][0-9]):([0-5][0-9])((\.\d+)|(:[0-9][0-9]))$/,

and the reference to http://www.w3.org/TR/ttml10-sdp-us should be removed.

The change to the decimals is already reported in #604 and in a pull request by @bbcrddave.

A test source is available: http://vm2.dashif.org/livesim-dev/testpic_2s/Manifest_stpp.mpd With the proposed change in TTMLParser.js it works properly in dash.js.

davemevans commented 9 years ago

Comments from line 40 onward should be removed too to avoid confusion, including those relating to decimal places which I neglected to remove in my PR.

TobbeMobiTV commented 9 years ago

Yes, I'm making a pull request including update to the comments.

TobbeMobiTV commented 9 years ago

Fixed in commit 294730374c22eca8e41d813d7b092413755ae87c.