Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Are there any open source, command line, subtitle converters - preferably for Linux?

share|improve this question

Subtitles perl swiss army knife (scroll to the end of the page).

Here you can find more options.

Also, mplayer/mencoder has some dumpXXXsub options, which might work. I never tried this, but reading the man, it should work. Example:

-dumpmpsub (MPlayer only)
              Convert the given subtitle (specified with the -sub option) to MPlayer's subtitle format, MPsub.  Creates a dump.mpsub file in the current directory.
share|improve this answer
Indeed this is handy, sadly though only three different formats are supported; .srt, .sub, .smi. – Johnas Mar 9 '10 at 15:31
I checked the Mplayer and Mencoder out. Didnt get it working though. And it supports only SRT, SMI, SUB and JACO. A good suggestion though, thanks. – Johnas Mar 9 '10 at 16:27
Works nice, thanks! Here: is my converter based on this with framerate detection using mplayer – l0co Sep 4 '12 at 15:29

The open source program Subtitle Edit has a command line converter and is available for both Windows and Linux.

Syntax: SubtitleEdit /convert "pattern" "name-of-format-without-spaces"

Example 1: SubtitleEdit /convert sami
Result: Will convert to sub1.sub to SAMI format

Example 2: SubtitleEdit /convert *.srt adobeencore
Result: Will convert all .srt files to Adobe Encore format

For Linux the command line needs to be slightly longer…

Syntax: mono SubtitleEdit.exe /convert "pattern" "name-of-format-without-spaces"

…but could easily be wrapped in a script.

share|improve this answer
The GUI works, but I got an error when running from the command line.. .I needed to install libmono-winforms for the GUI to work (as stated in the README)... Maybe there is something extra which is needed for the CLI to work... I get an AttachConsole... error. using Ubuntu 10.04 ... – Peter.O Jan 6 '12 at 23:12
This seems to be fixed in version 3.2.3 - at least on Ubuntu – Johanz Jan 15 '12 at 10:29
@Johanz: Thanks. Version 3.2.3 works. It converted a .ass to SubRip (.srt) ... Just one thing I notieced: it produces \r\n (CRLF) line endings, even when the source line-ending is \n ... but that would rarely be a problem and is easily fixed with sed if need be. – Peter.O Jan 27 '12 at 17:09
+1 as this is a really good converter and an open source application. And it has a cmd line interface. – user10607 Sep 11 '15 at 19:57

You can try FFmpeg (great tool !) :

$ ffmpeg -i file.vtt
share|improve this answer

What is it you want to convert exactly? If it is between subtitle formats then it depends on which formats you are talking about. Those which are bitmap based will require OCR to convert to text format and generally always require user input for confirming the accuracy of the OCR

If it is all text formats then Jubler or Aegisub may be of use

share|improve this answer
Simple text subtitles. SRT, STL, SUB, PAC. Back and forth. – Johnas Mar 9 '10 at 15:24
@johnas - my answer updated with a couple of possibilities – Shevek Mar 9 '10 at 16:06
Thanks Shevek, but none of the above was command line operational. Though they would've been perfect if I could use the GUI. – Johnas Mar 9 '10 at 16:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .