
-----------
HELP / INFO
-----------

"srtshift" is a command-line tool used to adjust the subtitles of .srt file to a specific movie file by increasing or decreasing the time stamps of this file.
"srtrate" is the same kind of tool, but it adjusts the subtitles depending on a given frame rate.

It is usefull, for instance, when you've just downloaded a DivX and the only subtitles file you've found in your language doesn't match the video stream.
You just have to adjust the whole content of the file step by step using those tools until it matches exactly the movie.

Type the name of the binary without any parameter to get help.
Official web page : http://sourceforge.net/projects/subtools/



--------------
NOTES ON USAGE
--------------

Standard input and output support is included only for batching convenience ; it's not really usefull in command-line mode.
The advantage of using stdin and stdout is the ability to chain commands to make several operations on the same command line.
One could for instance call :	srtrate 25 23.976 "rw.srt" | srtshift -00:00:13,000 - > "Hotel Rwanda_en.srt"

It is NOT recommended to redirect the standard output to the source file (e.g. "adjustsrt a.srt > a.srt") : the result is undefined.
If you really want to alter the source file, use the same node for source and destination file (e.g. "adjustsrt matrix.srt matrix.srt").

srtshift
--------

Beware to keep every time stamp between the limits.
No time stamp will be decreased under "00:00:00,000" nor increased over "99:59:59,999".
If one or more time stamps have reached the limits, that means that they have been blocked by the program.
You cannot retrieve the old value, so keep the original file safe by never writing over it.
If you see that a time stamp has the minimum value, it may be, for instance, because the guy who extracted the subtitles inserted his name at the very beginning of the file; you'll have to correct this by hand.
If you see that a time stamp has the maximum value, it's likely that you gave a wrong "time stamp" parameter to the program (most movies are less than 99 hours long ;).

srtrate
-------

Use a lower destination frame rate if the subtitles are earlier and earlier during the movie, and a higher one if they're becoming late.
If you don't know the original frame rate of the subitles files (which is the usual case), you can test the following common frame rates : 23.976, 25.0, 29.976.



-----
FILES
-----

CHANGELOG.TXT : changes corresponding to major cvs commits
LICENSE.TXT   : what kind of license for this tool (a reminder is written on the top of main source file(s))
Makefile      : basic Makefile provided for unices (everybody can do that, but it's quicker to have it already written)
README.TXT    : this file
TODO.TXT      : reminder for developpers
subtools.c    : the only really needed file



---------------------
BUILDING / INSTALLING
---------------------

There's only one source file for both executables.
You have to flag the compilator with one of the following defines to make one or the other tool :
	SRTSHIFT
	SRTRATE
The Makefile already contains the right compilation commands.

Unices (should work for most of them)
-------------------------------------
Assuming unix users are more experienced than windows ones ;),
they'll have to convert themselves the files from the windows format to the unix one (CR/LF).
(this can be achieved by typing	something like:       tr -d "\r" < dosfile > unixfile)
Actually, many editors get rid of this insignificant matter.

The Makefile is here for a comprehension matter but is really not needed.
It contains the default targets : "all" "install" "clean" "distclean".
Just try "make install" ("install" implies "all").

For beginners :
Copy the files to a directory named "/usr/local/src/subtools".
Change to the subdir containing the file "Makefile" and type "make install clean".
Whenever you want to uninstall it, just type "make distclean" from the same place and then remove /usr/local/src/subtools.

Windows
-------
Depends on what compiler you use.

With Visual C++, just create a new "Win32 Console App" and add subtools.c as the only source file.
Or you can just type "cl subtools.c" in a DOS box (recommended), with the correct flags.

With djgcc & cygwin just do as for Unix (and you can read the manual).

Anyway, I will always try to give an .exe release.



---------
REPORTING
---------

Any comment is welcome to cbonar@users.sf.net, especially compilation problem and bugs.



----------------
SOME NICE QUOTES
----------------

"Never trust a software you don't have the source for."
"It was written on the box : requires Windows95, NT or better ; so I bought Linux."
from cvs book "hacking away like there's no tomorrow" , "to code as one possessed by spirits" ... LOL
