Subcheck


Information Screenshot Samples Download



Information

Subcheck is a perl script which checks srt (SubRip) subtitle files for errors. Such as overlapping, negative duration, to short displaytime, rewrite subtitle lines with another character length (useful for Yamada, KISS and other hardware divxplayers), etc. It is highly configurable.


Screenshot

Screenshot


Samples

A few examples that shows how it works.

We have a sample srt file (sample.srt) containing:
10
00:00:34,134 --> 00:00:35,159
This is a very long line. Longer than normal lines.
It need a fix. This can be done by a rewrite with subcheck.

20
00:00:36,236 --> 00:00:39,296
Just a normal piece of text.
Note: The part that exceeds the length of 40 characters is red colored.


Sample 1:

In this sample the only options used are the options to give an input file (-i) and an output file (-o). So subcheck will rewrite all lines with a length bigger than 40 characters. The duration will be also rewritten. (60 ms per character)
# subcheck.pl -i sample.srt -o result.srt

Now we have a result srt file (result.srt) containing:
1
00:00:34,134 --> 00:00:35,572
This is a very long line. Longer than
normal lines. It need a fix. This can...

2
00:00:35,582 --> 00:00:36,226
be done by a rewrite with subcheck.

3
00:00:36,236 --> 00:00:37,916
Just a normal piece of text.

As you can see the first unit is separated in two units.
The numbering of the units are rewritten (10, 20 -> 1, 2, 3).
The duration is rewritten. The duration of each character is 60 ms by default.
You can set this by changing option -m .

You can see that the duration of the first two units is not 60 ms per character.
This is because it won't fit. So subcheck calculates what the maximal usable time
per character is and will use this duration instead of 60 ms.

If you don't give the option -o the file given with -i will be overwritten.



Sample 2:

In this sample only the units with a to short duration will be rewritten.

# subcheck.pl -i sample.srt -o result.srt -T

Now we have a result srt file (result.srt) containing:
1
00:00:34,134 --> 00:00:36,227
This is a very long line. Longer than normal lines.
It need a fix. This can be done by a rewrite with subcheck.

2
00:00:36,236 --> 00:00:39,296
Just a normal piece of text.
As you can see the duration of the first unit is rewritten because it was to short.
The duration of the second unit has not been rewritten because the duration is long enough.
The lines are longer than 40 characters in the first unit because the length has not been rewritten. (Use option -b do that.)

Download

You can download a copy at SourceForge.net
For installation instructions check the INSTALL documentation in the archive.


SourceForge.net Logo