( go to 🇷🇺 Russian page )
Time intervals for shift
Simple template for creating time intervals for shift:
: : .
Subtitle file
- Maximum allowed file size: 1048576 bytes
- Supported formats: .SRT / .SSA / .ASS
- MicroDVD .MDV / .SUB will be converted to .SRT
(read below how to specify FPS for this format)
Time intervals for shift not specified. Invalid interval format or not enough spaces (read help below). Invalid interval format (second argument must be "=" or "~", read help below). Invalid interval time format (read help below). Subtitle file not selected for upload. Subtitle file exceeds the maximum allowed size. Selected file extension not .SRT or .SSA or .ASS - it's not a subtitle file or unsupported format.
Announcements and other news (December 2023) Floating shift implemented (read help below).
Thanks to anonymous for help!
MicroDVD .MDV / .SUB format supported now.
Suggestions for service improving accepted at forum >>>

See also article: Overview of subtitles formats.
Add to bookmarks and tell your friends!

Short usage manual

This service is designed to sync (shift by time) text subtitle files for the required video file release.

To use this service subtitle file and time for the shift must be provided.

The shift time is specified either in .SRT format (HH:MM:SS,TTT), or in .SSA / .ASS format (H:MM:SS.TT), or in short form (see below).

First, the current titre time is specified, then, after a space, the time that titre should be displayed.

Examples of using:

; shift by +1.5 seconds (forward)
00:00:02,000 00:00:03,500
; shift by -5 seconds (backward)
00:00:15,000 00:00:10,000

The example above means that all titres whose time in the original is greater than or equal to 00:02:00,000 will be shifted by +1.5 seconds, and those whose time is greater than or equal to 00:00:15,000 - by -5 seconds, respectively - i.e. on the difference between the first and second time on the line.

When shifted, the last time in precedence takes effect. In example above, all titres below 00:00:02,000 will not be affected at all, while titres older than or equal to 00:00:15,000 will only be affected by the last shift interval.

If you need to cancel the shift, then this is done by simply indicating the same time again:

00:20:00,000 00:20:00,000

Thus, all titres after 20 minutes will not be affected, because the difference between what is and what should be is 0 seconds.

If for example the original time is known only for the dialogue but the first titre to be shifted is the name of the series, then you can manually calculate the difference between the titres - this is done by using the extended form:

00:04:00,000 = 00:02:00,000 00:03:00,000

In this example, any titre older than or equal to 00:04:00,000 will be shifted by +60 seconds (difference between 2 and 3 time values).

When processing time for a shift, empty lines and lines starting with ";" (semicolon) are ignored (semicolon can be used to comment or disable currently unnecessary lines).

It is also possible to use an abbreviated form:

; all examples below are similar and shift by +1 second
00:00:00,000 00:00:01,000
; without thousandths of a second and with one digit for everything else
0:0:0 0:0:1
; without hours
0:0 0:1
; seconds only
0 1

In other words, the indication of seconds is mandatory, but zero hours, minutes, or thousandths of a second can be omitted.

General examples, for those who shift "by eye" (not recommended - use the exact time from existing subtitles):

; shift all titres by +5.750 seconds (forward)
0 = 0 5,750
; shift all titres by -1.234 seconds (backward)
0 = 1,234 0
; shift by +2 seconds (forward)
0 = 0 2
; shift by -3 seconds (backward)
0 = 3 0
; cancel any shift starting from 32 minutes and 17 seconds
32:17 = 0 0
; no shift, check only and clean up subtitle file
; - UCS-2LE and UCS-2BE encoded files will be converted to UTF-8
; - for .SRT format, all titres are re-numbered
; - for .SRT format, all unnecessary empty lines between titres will be removed
; - you may not save new file if you do not want any changes
; - note that everything listed above also true for any other shift intervals too
0 0

Common moments

- Supported formats: .SRT, .SSA, .ASS

- Subtitle file must be no larger than 1048576 bytes.

- Subtitles encoded in Unicode UCS-2LE and UCS-2BE will be automatically converted to UTF-8.

- When saving output file, select "all files", otherwise Internet Explorer 6, for example, will add the .TXT extension.

- At the beginning of the output file name, if you do not disable this option, the character "_" (underscore) will be added to prevent accidental overwriting of the original subtitles (in order not to rename the subtitles every time to check in the video player - temporarily rename the video file itself so that it's name was also start from underscore).

- Each line of shift format should contain only one interval in simply form:

time_old SPACE time_new

or extended form:

shift_time SPACE = SPACE time_old SPACE time_new

If there are not enough spaces or there are extra ones, then error 3 will be generated.

- Time to shift must be specified either in .SRT format (01:23:45,670) or in .SSA / .ASS format (1:23:45.67) or in short form (see below).

- If error 4 generates, then most likely the form of the interval time for the shift is incorrect. Here is how the short form will be unfolded:

1 - unfolds to 0:00:01.00

1:2 - unfolds to 0:01:02.00

1:2:3 - unfolds to 1:02:03.00

- If you get error 6 and the subtitle file format is .SSA / .ASS - most likely the first section is missing - add the line "[Script Info]" without quotes to the beginning of the file.

- Even if the shift time is negative (for example -5.464 seconds), the titre time will not be less than 0.

- For .SRT format, all titres are re-numbered starting from 1, i.e. if earlier the numbers went like 1, 2, 15, 78, now they will be 1, 2, 3, 4.

- For .SRT format, all unnecessary empty lines between titres will be removed.

- MicroDVD .MDV / .SUB format (frame based: {123}{456}text|to|show) will be automatically converted to .SRT and all command sequences will be removed (not supported). By default assuming 25 frames per seconds (25.000). If you need any other frequency, for example 23.976, then add the following line at the top of the subtitle file (use dot as decimal separator):


Floating shift (experimental feature)

When the difference of titres in time is not fixed +/- N seconds, but changes over time, then such a shift is called floating because the time is not fixed, but changes all the time ("floats"). It is very simple to determine this: even after a fixed shift, after a while, the titres begin to gradually lag behind or, conversely, go forward and display ahead of time. Do not confuse this situation with another where titres jumps in time, if, say, in the middle of the video there was a advertisement block that was cut out.

A special format used to work with floating shift:

start ~ old_first old_last new_first new_last

Where the following legend are used:

start - from what time start to shift titres (0 - all titres)

old_first - old time of the beginning of the first titre of dialogs (the beginning of the episode, after opening)

old_last - old time of the beginning of the last titre of dialogs (the end of the episode, before the credits)

new_first - new time of the beginning of the first titre of dialogs (the beginning of the episode, after opening)

new_last - new time of the beginning of the last titre of dialogs (the end of the episode, before the credits)

In other words, two intervals of first-last form must be set to calculate coefficient for a time change. Example:

; float shift for all titres
0 ~ 0:01:29.66 0:21:35.66 0:01:33.66 0:22:29.70

As a rule, the problem of floating shift occurs when the subtitles were made for VHS, but are used for CD/DVD/BD remaster or vice versa. Therefore, it is recommended to use the time of the first and last titre of episode dialogs, because, usually, each episode is divided into the following parts: opening, main part, credits and announcement. In the remaster, it can turn out that the delays between these parts changed (reduced or increased). So when using the time from the dialogs, at least the titres of the main part will fall into place, and titres for other parts (opening, credits and announcement) will not increase the proximity error due to the altered gaps between the parts (they may need to be adjusted separately, but with fixed shift, which is much easier).

Obtaining required time

Of course, you can specify the time for the shift by selecting it "by eye", but this most likely will cause many troubles.

To extract the time, in the simplest case, it is enough to unpack subtitles from .MKV using MKVToolNix and take the time from there. An example for the command line, where 3 is the number of the stream to extract (subtitles in different releases may be under different numbers):

mkvextract.exe tracks "Video File 01.mkv" 3:subtitle.txt

If the file is in .AVI format with a hardsub, then you can should load it into VirtualDubMod and using PageUp, PageDown, Left and Right keyboard keys find the start time of the titre to copy.

However, if subtitles in .SUB/.IDX format or in the H264 codec which VirualDubMod does not support in .MKV container, then unfortunately you will be forced to shift "by eye".

Keep in mind that the display time of many titres is calculated so that with a change of scene the titre also disappears from screen. So an incorrectly chosen time will either remove the titre from the screen too early, or vice versa, keep it longer than necessary.

© SubShift v1.18 2007-2024
In the memory of the Tokyo 3 Jupiter [30.08.2006 - 30.08.2019] anime server.