Announcement: Our new CyberLink Feedback Forum has arrived! Please transfer to our new forum to provide your feedback or to start a new discussion. The content on this CyberLink Community forum is now read only, but will continue to be available as a user resource. Thanks!
CyberLink Community Forum
where the experts meet
| Advanced Search >
Bug when exporting subtitles in srt-file: rounding error
Roland vl [Avatar]
Newbie Joined: Nov 23, 2017 03:44 Messages: 39 Offline
[Post New]
Hi,

Example
Rate: 50fps
When I have a time indication with a very small number of frames after sec-number (1,2,3 or 4), PD "forget" to place a ZERO after the comma in the srt-file.
For example. If I see in the subtitle-room 05:00:02, when exporting this becomes 00:05:00,40 and not 00:05:00,040 (4 frames takes 4/50 = 0,040 seconds). This causes sometimes overlapping next subtitle and therefore Dailymotion refuges the srt-files.

Are other users aware of this bug? Nothing found in this forum
Thanks if someone could also check.
JL_JL [Avatar]
Senior Contributor Location: Arizona, USA Joined: Oct 01, 2006 20:01 Messages: 6091 Offline
[Post New]
Quote Hi,

Example
Rate: 50fps
When I have a time indication with a very small number of frames after sec-number (1,2,3 or 4), PD "forget" to place a ZERO after the comma in the srt-file.
For example. If I see in the subtitle-room 05:00:02, when exporting this becomes 00:05:00,40 and not 00:05:00,040 (4 frames takes 4/50 = 0,040 seconds). This causes sometimes overlapping next subtitle and therefore Dailymotion refuges the srt-files.

Are other users aware of this bug? Nothing found in this forum
Thanks if someone could also check.

Not sure on that, the field after the comma is milliseconds, so 00:05:00,40 is correct as 2 frames at 50fps is 40 milliseconds, no added zero needed.

hh:mm:ss:ff > video timecode
hh:mm:ss,mms > srt timecode

Jeff

This message was edited 1 time. Last update was at Feb 22. 2019 14:18

Roland vl [Avatar]
Newbie Joined: Nov 23, 2017 03:44 Messages: 39 Offline
[Post New]
Quote

.......40 milliseconds, no added zero needed.

hh:mm:ss:ff > video timecode
hh:mm:ss,mms > srt timecode

Jeff


I do not agree: 40 milliseconds needs a leading zero thus 040 and not 40

Why this is a bug?

PowerDirector of Cyberlink output time format of srt (subtitles) in a format which is not conform because not using zero-padded digits.

3 arguments:

1.The standard.
Wikipedia says : "The SubRip file format, as reported on the Matroska multimedia container format website, is "perhaps the most basic of all subtitle formats."[9] SubRip (SubRip Text) files are named with the extension .srt, and contain formatted lines of plain text in groups separated by a blank line. Subtitles are numbered sequentially, starting at 1. The timecode format used is hours:minutes:seconds,milliseconds with time units fixed to two zero-padded digits and fractions fixed to three zero-padded digits (00:00:00,000). The fractional separator used is the comma, since the program was written in France."
Because of WebVTT is derived from the srt-format see also the standard here: https://www.w3.org/TR/webvtt1/#file-structure point "A WebVTT timestamp consists of the.... Three ASCII digits, representing the thousandths of a second seconds-frac as a base ten integer."

2. Use on the internet
Nowhere on the internet I saw an example where for the milliseconds only 1 or 2 digits are used. See for example here: https://blog.hubspot.com/marketing/srt-file
The only exception is here in this discussion.

3. Interpretation
Cyberlink is not alone on the world, the srt-file is used in other software. The ultimate success depends on how a bad formatted string (1 or 2 digits) is interpreted. For example: 03:18,80 (originally it was 03:18 + 4 frames at 50fps ==> thus 080 milliseconds)

YouTube. YouTube add a zero ; so the time becomes: 03:18,800. This creates sometimes an overlapping with a next subtitle. When there is an overlap then YT joins the 2 subtitles in 1 long subtitle, on 2 lines. Not good.

Dailymotion. Dailymotion reads the time indication also as 03:18,800, but checks for overlapping. When this is the case, the srt-file is refused. Not good.
JL_JL [Avatar]
Senior Contributor Location: Arizona, USA Joined: Oct 01, 2006 20:01 Messages: 6091 Offline
[Post New]
If you need the padded 0's for another code compliance, I've used Subtitle Edit for that if it helps your situation at all.

Jeff
optodata
Senior Contributor Location: California, USA Joined: Sep 16, 2011 16:04 Messages: 8630 Offline
[Post New]
You may want to file a formal tech support request from this page.

Briefly explain the situation and provide the URL of this forum thread so they can see all of the helpful info here. When you submit the report, please post the ticket number back here (it will start with CS).

YouTube/optodata


DS365 | Win11 Pro | Ryzen 9 3950X | RTX 4070 Ti | 32GB RAM | 10TB SSDs | 5K+4K HDR monitors

Canon Vixia GX10 (4K 60p) | HF G30 (HD 60p) | Yi Action+ 4K | 360Fly 4K 360°
Powered by JForum 2.1.8 © JForum Team