Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Subtitles

Reply
 
Thread Tools Search this Thread Display Modes
Old 6th April 2004, 12:09   #1  |  Link
vax
Registered User
 
Join Date: Apr 2003
Location: Bulgaria
Posts: 24
.SRT [SubRip] file format specification needed

I'm looking for a comprehensive specification of
the .srt (SubRip) file format.

I found such a topic at:

http://forum.doom9.org/showthread.ph...ght=SRT+format

but the link given (to matroska) did not contain the HTML tags
specs. I need to know what these tags can control - e.g bold, italics, etc.

Thanks in advance,
vax
vax is offline   Reply With Quote
Old 7th April 2004, 01:28   #2  |  Link
McPoodle
Registered User
 
Join Date: Apr 2002
Location: Sacramento, CA
Posts: 182
I haven't seen this format fully documented, so I got it from the source code to the SubRip program:

The format has no header, and no footer. Each subtitle has four parts:

Line 1 is a sequential count of subtitles, starting with 1.

Line 2 is the start timecode, followed by the string " --> ", followed by the end timecode. Timecodes are in the format HH:MM:SS,MIL (hours, minutes, seconds, milliseconds). The end timecode can optionally be followed by display coordinates (example " X1:100 X2:600 Y1:050 Y2:100"). Without coordinates displayed, each line of the subtitle will be centered and the block will appear at the bottom of the screen.

Lines 3 onward are the text of the subtitle. New lines are indicated by new lines (i.e. there's no "\n" code). The only formatting accepted are the following:

<b>text</b>: put text in boldface
<i>text</i>: put text in italics
<u>text</u>: underline text
<font color="#00ff00">text</font>: apply green color formatting to the text (you can use the font tag only to change color)

Tags can be combined (and should be nested properly). Note that the SubRip code appears to prefer whole-line formatting (no underlining just one word in the middle of a line).

Finally, successive subtitles are separated from each other by blank lines.

Here is an example of an SRT file:

Code:
1
00:02:26,407 --> 00:02:31,356  X1:100 X2:100 Y1:100 Y2:100
<font color="#00ff00">Detta handlar om min storebrors</font> 
<b><i><u>kriminella beteende och foersvinnade.</u></i></b>

2
00:02:31,567 --> 00:02:37,164 
Vi talar inte laengre om Wade. Det aer 
som om han aldrig hade existerat.
McPoodle is offline   Reply With Quote
Old 7th April 2004, 13:46   #3  |  Link
vax
Registered User
 
Join Date: Apr 2003
Location: Bulgaria
Posts: 24
Thanks, that was quite good.

I have an only (possible)remark.
As I have looked at a lot of srt files, the line terminator was always "\r\n" (CR/LF). You mentioned above just an "\r" (CR) terminator. Is it a mistake of yours or this just doesn't matter for the whole bunch of divx players out there.

thanks,
vax.
vax is offline   Reply With Quote
Old 9th April 2004, 01:38   #4  |  Link
McPoodle
Registered User
 
Join Date: Apr 2002
Location: Sacramento, CA
Posts: 182
It's a text format, so I imagine all variations are possible, but since SubRip and so many of the programs that output SubRip format are written for the PC, lines will probably be split be CRLF more often than the alternatives.
McPoodle is offline   Reply With Quote
Old 13th April 2004, 10:27   #5  |  Link
ChristianHJW
Matroska Team
 
ChristianHJW's Avatar
 
Join Date: Nov 2002
Location: Bavaria - Germany
Posts: 1,341
http://matroska.org/technical/specs/...les/index.html
ChristianHJW is offline   Reply With Quote
Old 4th April 2010, 20:54   #6  |  Link
zarathus
Registered User
 
Join Date: Mar 2010
Posts: 1

Just for an update at the discussion, you might be interested in take a look at this: SubRip (.SRT) subtitles support in players and here in the VLC Forum.
zarathus is offline   Reply With Quote
Old 8th April 2010, 15:45   #7  |  Link
Ch3vr0n
Registered User
 
Join Date: Jan 2009
Posts: 1,157
LOL talk about your thread necromancy. You're 6 years too late LMAO
Ch3vr0n is offline   Reply With Quote
Old 4th August 2010, 08:59   #8  |  Link
Mystiqq
Registered User
 
Join Date: Apr 2003
Posts: 69
Quote:
Originally Posted by zarathus View Post

Just for an update at the discussion, you might be interested in take a look at this: SubRip (.SRT) subtitles support in players and here in the VLC Forum.
Thanks for posting this.
Mystiqq is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:09.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.