[HOWTO] subtitle delay

well, i have one little problem. I have a programme that works with subtitle files. And i'd like to know how do i make a subtitle delay? -I found out i could do it with the Sleep(value) function, but how do i apply it to the subtitles?
Hi there,

If you are actually writing a program that handles subtitle files, what you will need to do is delay the timing of every line in the file.

For example:

wikipedia wrote:
00:00:20,000 --> 00:00:24,400
Altocumulus clouds occur between six thousand

00:00:24,600 --> 00:00:27,800
and twenty thousand feet above ground level.

You'll need to parse those times and increment them by the amount you want to delay the subtitle.
This is not as easy as it sounds, you will have to take into account that when you delay something, there might be carry into the next minute or hour even:

00:00:59,800 --> 00:01:02,400

Delay by 400 milliseconds:

00:01:00,200 --> 00:01:02,800

There are programs already out there that will do this for you, if you're in a hurry.
Hope that helps.

All the best,
Topic archived. No new replies allowed.