Hello everybody
I'm creating a small software for editing subtitles.
I managed to load and shift the time from a srt file but I'm having troubles for what regards .sub files (the text one).
For example:
A srt file looks like this :
So it's easy understandable what you need to change when adjusting the time.Code:1 00:01:13,020 --> 00:01:17,810 3 billion human lives ended on August 29th, 1 997. 2 00:01:18,260 --> 00:01:23,015 The survivors of the nuclear fire called the war Judgment Day. 3 00:01:23,460 --> 00:01:26,372 They lived only to face a new nightmare, 4 00:01:26,660 --> 00:01:28,730 the war against the machines.
But a .sub file looks like this:
What does the numbers at the beginning of the sentence stand for? How could I translate them in normal time format?Code:{1895}{2008}Three billion human lives ended|on August 29, 1997. {2039}{2098}The survivors of the nuclear fire... {2099}{2168}called the war '"Judgment Day. '" {2169}{2248}They lived only to face|a new nightmare-- {2249}{2300}the war against the machines.
Thanks
+ Reply to Thread
Results 1 to 6 of 6
-
-
Hi there.
MicroDVD .sub files are based on framecounting and framerate.
BTW, the very first line of a good .sub file does say what is the intended playback framerate. -
The problem is: You cannot calculate the framerate. As Midzuki already mentioned, this info is usually in the header line of a sub file. If you don't know the framerate, you have to guess. For a 'european' movie it is very likely 25 fps (PAL standard). For US material (NTSC) it is more complicated. It can be 29.97 or 23.976 fps. In addition there is the complexity of drop frame/non drop frame timecodes (I don't know which one is used by .srt files). For unknown material there is no other possibility than to test (calculate a few timecodes from the end of the movie and check if the position fits to the video/audio).
Once you know the framerate the timecodes can be easily calculated.
Example:
{1895}{2008}Three billion human lives ended|on August 29, 1997.
Assuming 25 fps the timecode is:
1895/25=75.8 seconds=1 minute, 15 seconds and 800 msec
or: 00:01:15,800
2008/25=80,32 seconds=1 minute, 20 seconds and 320 msec
or: 00:00:20,320
As you see, the results are near your .srt example, but not exact:
1
00:01:13,020 --> 00:01:17,810
3 billion human lives
ended on August 29th, 1 997.GUI for dvdauthor:
https://www.videohelp.com/~gfd/ -
Originally Posted by borax
Your reply was very usefull -
Your welcome! I've just seen that I made some typing mistakes (00:00:20,320 instead of 00:01:20,320), but I think you got the idea nevertheless
GUI for dvdauthor:
https://www.videohelp.com/~gfd/
Similar Threads
-
vsRip will not reset timing
By kenryuakuma in forum SubtitleReplies: 3Last Post: 26th Sep 2011, 17:45 -
subtitles timing
By teamo1976 in forum SubtitleReplies: 3Last Post: 21st Dec 2009, 15:58 -
Initial subtitle timing
By Smithcraft in forum SubtitleReplies: 2Last Post: 31st May 2009, 01:25 -
Copying the in sync timing of language1 to out of sync timing of language2
By mago1978 in forum SubtitleReplies: 0Last Post: 19th Jan 2009, 15:05 -
How total data rate is calculated?
By Netozai in forum Newbie / General discussionsReplies: 1Last Post: 9th Oct 2007, 15:47