srt2vobsub
srt2vobsub is a command-line tool for linux or other Unix-like systems that
generates a pair of .idx/.sub vobsub subtitle files from a textual subtitles file.
The resulting vobsub subtitles are not strictly
standards compliant, whether they will work as expected or not depends on the
player device, resp. the playback software.
Natively srt2vobsub supports .srt files as input. Other file formats will be converted
into temporary .srt files with ffmpeg (if supported).
srt2vobsub uses ideas originally developed by "Phantome" and released
as "2dsub" at code.google.com under the terms of the GNU GPL v.3.
Today this seems to be available only
here.
Software requirements
The program needs
Python3 ,
the
Python-Chardet
module for Python3 for detecting the input file encoding,
the Python3 version of
Wand
(a Python implementation of libmagickwand) to render subtitle images,
fc-list to detect the font file from a
given font name,
ffmpeg
to convert non-srt input files,
mediainfo
to query video file properties and
bdsup2sub
to generate the vobsub subtitle stream.
The program supports both bdsup2sub version 4 and 5 (which have a completely
different command line interface).
For best results it is recommended to use the latest available version of
bdsup2sub v. 5.
When using a Debian- or Ubuntu-based system, the required packages are:
python3,
python3-chardet,
python3-wand,
fontconfig,
ffmpeg,
mediainfo and
bdsup2sub.
The latter seems to be available as a pre-built debian package only from
deb-multimedia
fc-list, ffmpeg and mediainfo are not strictly necessary to run the program,
however without fc-list you will have to pass the complete path to the font
file of your choice (or stick with the default DejaVuSans that comes with
srt2vobsub), without ffmpeg you will not be able to use input files other than
.srt and without mediainfo the script will not be able to detect the video
properties from a video file.
3rd party software
srt2vobsub includes version 1.11.0 of the
Chris Down's srt module.
If you are working with srt subtitles files and use the Python programming
language, check out the complete srt package which includes API documentation
of the srt module and a number of rather cool command-line utilities!
Installation
Since srt2vobsub consists of a single Python script no installation is
required. You can simply type on the command line:
$ ./srt2vobsub.py subtitlesfile
If you want to install srt2vobsub system wide, use the install script:
# ./install
to copy the program files to /usr/local/share/srt2vobsub and create
a symbolic link to srt2vobsub.py at /usr/local/bin/srt2vobsub .
To remove a previous installation you can do:
# ./install --remove
Usage examples
Generate vobsub files foo.idx and foo.sub with default parameters:
$ srt2vobsub foo.srt
Retrieve video properties from movie and generate vobsub files with matching
name from an advanced substation alpha subtitles file:
$ srt2vobsub -m "Life of Brian.mp4" -n "Life of Brian" foo.ass
Create subtitles with 1080x720 px. resolution and save corrected subtitles file
to subs_proc.srt :
$ srt2vobsub -r 720p -S 1 subs.srt
For complete usage instructions please refer to the
man page.
License
srt2vobsub is licensed under the terms of the
GNU General Public License v.3.
Contact
srt2vobsub was written by:
Michael Lange <klappnase (at) users (dot) sf (dot) net>
Bugs
If you encounter a bug, please open a ticket at the sourceforge
bug tracker.
Download
Download the latest version from srt2vobsub's
sourceforge project page.
Hosted by: