http://cpan.uwinnipeg.ca/dist/Subtitles http://cpan.uwinnipeg.ca/htdocs/Subtitles/README.html http://cpan.uwinnipeg.ca/htdocs/Subtitles/Subtitles.html
http://search.cpan.org/~karasik/Subtitles-0.08/ http://www.karasik.eu.org/software/Subtitles.tar.gz http://cpan.uwinnipeg.ca/cpan/authors/id/K/KA/KARASIK/Subtitles-0.09.tar.gz
Movie files can be viewed with subtitles, which are currently very popular as text files. The command line tool 'subs' and its perl backend Subtitles.pm provide means for simple loading, re-timing, converting, and storing these subtitle files. Supported formats are .srt, .sub, .smi, and .idx. It can easily be extended.
Version 0.07 Released 27 Jan 2005 Version 0.08 Released 17 Oct 2005 Version 0.09 Released 9 Mar 2007
Warning: -i is a great feature, but use it with certain caution.
If subtitles are shown too early ( 5 seconds):
subs -i -b 5 file.sub
If subtitles are for a movie in 25 fps, need to be for 24 ( actual for frame-based formats only ).
subs -i -a 24/25 file.sub
If subtitles start 1 second too early, but in 1 hour are late in 7 seconds:
subs -i -p 0 -1 -p 1:00:00 +7 file.sub
Join two parts with 15-second gap
subs -o joined.sub -j 15 part1.sub part2.sub
Split in two after 50 minutes and half a second ( makes basename.1.sub and basename.2.sub ).
subs -o basename.sub -s 50:00.5 toobig.sub
Remove closed caption-specific comments such as '[Sneezing]' or '[Music playing]'
subs -e 's/[\s-]*\[.*\]\s*\n*//gs' sub.sub