Subconv v0.2.2
--------------
(w)by
Pawel Stolowski <yogin@linux.bydg.org>
Julien Lerouge <julien.lerouge@free.fr>

This software is distributed under terms of GNU General Public License.

1. Introduction
---------------

Subconv converts divx subtitles from one format to another (currently only from
srt/tmplayer/mdvd/sub2 to tmplayer/srt). It can also adjust subtitles
delay and split subtitles.

2. Requirements
---------------

This little tool requires nothing but Python. No additional
libraries/programs are required. It was tested with Python 2.2.1.
Most modern distributions ship with Python. Go to www.python.org if
necessary.

3. Installation
---------------
Just copy 'subconv' somwhere in your PATH (/usr/local/bin is a good
candidate) and that's it.

4. Usage
--------

subconv -h shows available options:

 subconv v0.2.2 -- DivX subtitles converter
 (w)by Pawel Stolowski <yogin@linux.bydg.org>
       Julien Lerouge  <julien.lerouge@free.fr>

 Usage: subconv [-i fmt|-o fmt|-a sec|-s sec|-S h:m:s[,h:m:s,...]] input [output1, output2, ...]
	
     -i fmt        input format (one of: srt, tmp, mdvd, sub2, auto; auto by default)
     -o fmt        output format (one of: tmp, srt; srt by default)
     -f fps        adjust fps rate for microdvd input subtitles (auto by default)
     -a sec        adjust subtitle delay in seconds (add)
     -s sec        adjust subtitle delay in seconds (sub)
     -S h:m:s,...  split subtitles in selected position(s); additional output file names must be specified
     -h            this help

There is one mandatory parameter: input file name. The format of the subtitles
will be auto-detected (if possible). The output format will be srt by default;
if no output file names are given, the resulting subtitles will be written
to stdout. Remaining optional parameters allow you to:

* shift subtitles in time: use -a x to add x seconds; use -s x to
  subtract x seconds
* split subtitles: use -S together with time position(s) in h:m:s
  format and additional output filename(s). Please note, that splitting
  is performed *after* optional time-shifting (so, h:m:s refers to *new*
  timings)
* specify subtitles frame-rate: it makes sense for microdvd only; this
  is necessary for converting frames to seconds correctly. It may be
  a float number.
  
Examples:

# subconv matrix.txt -o tmp matrix_new.txt
Auto-detects subtitles format and converst them to tmplayer.

# subconv -i srt matrix.txt matrix_new.txt
Forces srt-subtitles input and converts it to tmp-subtitles.

# subconv -i srt -o tmp -a 1 matrix.txt matrix_new.txt
Same as above, adds 1 second delay to new subtitles.

# subconv -i srt -S 01:30:03 matrix.txt matrix_cd1.txt matrix_cd2.txt
Converts and splits srt-subtitles "matrix.txt" to two tmplayer-format
subtitles. Split position is 01:30:03. 

5. Known issues
---------------

* Input subtitle format is not validated; make sure you supply the right
  one with -i fmt option. Choosing the wrong one may give messy output
  file or even crash the program.

6. TO DO
--------

* More input/output formats

7. THANKS
---------
Thanks for Julien Lerouge for all the changes that made the 0.2.2 version from
0.2.1!  Julien is now co-author of subconv, due to the great amount of work he
put in to it.  It is enough to say that subconv has grown from 5535 bytes
(version 0.2.1) to 10k+ (0.2.2)!  Thanks again pal!	 

8. Changelog
------------

* 2003-05-18 (version 0.2.2):
  - input format autodetection
  - sub2 input format
  - srt output format
  - fps for mdvd guessing (if not specified)
  - some minor fixes

* 2003-04-06 (version 0.2.1):

  - micro-dvd input format and -f option for specifing microdvd fps rate added

* 2002-11-11 (version 0.2.0):
  
  - changed version-numbering scheme
  - subtitles splitting option added (-S)

* 2002-11-02 (version 0.1): Initial release

