View Full Version : srt format requrements ? - empy lines etc.
marsoupilami
9th February 2012, 13:55
Hi there!
I'm currently playing around with a subtitle tool.
Anyone knows something about the required format in srt files?
e.g.
.) How can I insert empty lines?
I tried "<i></i>", which works on vlc player - but will this be accepted by common tools/players? Or is there an "official" way?
.) What is the minimum gap between two consecutive subtitles?
.) Is there a minimum duration?
.) Is utf-8 the choice for different character sets?
Any documentation on the web?
Thanks and kind regards!
:)
Ghitulescu
9th February 2012, 14:13
A search in google revealed several pages concerning details of SRT.
http://matroska.org/technical/specs/subtitles/srt.html
http://en.wikipedia.org/wiki/SubRip
Extremely few software pay attention to all possibilities of SRT. It's a matter of trial-and-error.
EDIT: and http://forum.doom9.org/showthread.php?t=106731
Nikse555
9th February 2012, 16:41
SubRip subtitles support in players is also interesting: http://ale5000.altervista.org/subtitles.htm
>How can I insert empty lines?
Does empty lines not work?
>Is utf-8 the choice for different character sets?
I would say utf-8 is the right format to choose.
(WinXP is not born with unicode fonts however, so in two years time when XP reaches end-of-life everybody should be able to read utf-8 - and in my opinion ANSI is a hack)
>What is the minimum gap between two consecutive subtitles?
Normally none, but some conversions to frame based subtitles works best if you have the equivalent of one frame in time between subtitles.
>Is there a minimum duration?
No, but I would say about 600-700ms - and also at least 25 chars per second
marsoupilami
10th February 2012, 01:24
Thanks a lot!
I was asking because I'm really tired of downloading a couple of tools which i do not really need - only for trying...
Btw. e.g. SubtitleCreator doesn't accept empty lines or "space only"
kind regards :)
Midzuki
10th February 2012, 07:01
...
WinXP is not born with unicode fonts
Probably "Unicode fonts" means something weird in your dictionary :) TrueType fonts with Unicode codepoints exist since the days of the goode and olde Windows 95 at least ;)
the_weirdo
10th February 2012, 07:17
Probably "Unicode fonts" means something weird in your dictionary :) TrueType fonts with Unicode codepoints exist since the days of the goode and olde Windows 95 at least ;)
Maybe he meant that Windows XP is not shipped with Unicode fonts.
@marsoupilami:
You can try Subtitle Edit (http://www.nikse.dk/SubtitleEdit) (yes, Nikse555 is the author of it). I think it accept empty lines. BTW, why would you need empty lines? After all, you cannot see them, can you?
Midzuki
10th February 2012, 07:33
Maybe he meant that
Windows XP is not shipped with Unicode fonts.
Which is blatantly incorrect of course. ;)
@marsoupilami:
BTW, why would you need empty lines? After all, you cannot see them, can you?
Probably it's a matter of formatting/styling. Sometimes
Line 1
Line 2
might be preferable to
Line 1
Line 2
Also, and this means the author of Txt2Sup,
it's a big mistake to assume "nobody" wants/needs more than two lines per subtitle entry.
Chetwood
10th February 2012, 07:42
How can I insert empty lines?
Have you tried a no-break space? Set numlock to ON and press ALT+0160 on the numeric keypad.
Ghitulescu
10th February 2012, 09:14
Btw. e.g. SubtitleCreator doesn't accept empty lines or "space only"
I used SC and it did almost everything I wanted to. So I don't understand then what you mean by empty lines or spaces
marsoupilami
10th February 2012, 15:25
...BTW, why would you need empty lines? After all, you cannot see them, can you?
Ok! I'll try to explain a little more precisely what I want to do ....
I'm currently working on a crazy tool which will able to merge or "overlay" 2 subtitle files (2 different languages). To keep each "language stream" in position (and due to different display & hide times) the resulting output would need to have a layout like this:
line 1 languageA
<empty>
line 1 language B
line 2 language B
:confused: Finally I want to convert the resulting *.srt into a *.sup for muxing it into e.g. a DVD.
:confused: ... anyone else would need this crazy thing?
Nikse555
10th February 2012, 16:17
Can't you use " " (space) or perhaps some unicode spaces for the blank lines?
http://www.cs.tut.fi/~jkorpela/chars/spaces.html
>Is there a minimum duration?
No, but I would say about 600-700ms - and also at least 25 chars per second
Should have said "no more than 25 chars per sec" ;)
Probably "Unicode fonts" means something weird in your dictionary :) TrueType fonts with Unicode codepoints exist since the days of the goode and olde Windows 95 at least ;)
He, yes. Some support for Unicode characters is available in WinXP if you use Times New Roman - and perhaps a few other fonts?
I think that in both Vista and Windows 7 all fonts have a very nice Unicode support.
Ghitulescu
10th February 2012, 16:24
There is a way to add JP and DE subtitles to anime, I assume this is the ultimate goal, but it requires a lot of manual work (yes, even with ready-to-use SRTs) and it's not 100% compatible. I mean it will not work on all standalones.
Midzuki
10th February 2012, 17:20
He, yes. Some support for Unicode characters is available in WinXP if you use Times New Roman - and perhaps a few other fonts?
Verdana, Arial, the HUGE Arial Unicode MS, Georgia, Tahoma, Lucida, Andale Mono, Courier New, MS Gothic, MS Mincho, PMIngLiu, Batang, and last but not least, the remainder of the "MultiLanguage Support Pack" that is included in EVERY XP installation CD. :rolleyes:
I think that in both Vista and Windows 7 all fonts have a very nice Unicode support.
What do you mean by that, exactly, ???
When I had a personal web site, ages ago :) , I composed several multilingual pages in "ISO-10646", which displayed nicely and correctly in both IE4 and Netscape 4.xx.
In 1999, there were no such things as Windows Vista or Windows 7. :p
UTF-8 SAMPLER @
http://www.columbia.edu/~fdc/utf8/
This, however, is a Web page, which started out as a kind of stress test for UTF-8 support in Web browsers, which was spotty when this page was first created but which has become standard in all modern browsers. The problem now is mainly the fonts and the browser's (or font's) support for the nonzero Unicode planes (as in, e.g., the Braille and Gothic examples below). And to some extent the rendition of combining sequences, right-to-left rendition (Arabic, Hebrew), and so on.
marsoupilami
11th February 2012, 10:23
There is a way to add JP and DE subtitles to anime, I assume this is the ultimate goal, but it requires a lot of manual work (yes, even with ready-to-use SRTs) and it's not 100% compatible. I mean it will not work on all standalones.
Yes! I like to combine GR & DE or ES & DE or whatever without a lot of manual work.
Why shouldn't work 5-line subs on standalones?
UTF-8 SAMPLER @
http://www.columbia.edu/~fdc/utf8/
:D That's great!
(But I don't like to touch the text itself)
Midzuki
11th February 2012, 16:09
Why shouldn't work 5-line subs on standalones?
If the subtitles are text files, then maybe it's because of an artificial limitation in the firmware. But if the subtitles are images, then there should be no problems.
Yes! I like to combine GR & DE or ES & DE or whatever without a lot of manual work.
Not possible. :p
Besides, SSA (or ASS) [ w/ UTF-16 ] is the recommmended way to create multilanguage subtitles. When you need to use more than one font, the SRT format becomes pretty useless...
Suggested toolchain:
.SSA --> (MaestroSBT) --> .SON --> (Son2VobSub) --> .SUB --> (Sub2Sup) --> .SUP
marsoupilami
11th February 2012, 17:31
Not possible.
Ok - It'll be a lot of work for me now, but I hope only once!
When you need to use more than one font, the SRT format becomes pretty useless...
:confused:I thought utf8 is supported by *.srt - why should it be useless?
Midzuki
11th February 2012, 18:25
...
:confused: I thought utf8 is supported by *.srt - why should it be useless?
Suppose you want to display Hebrew characters and Cyrillic characters at the same time, AND your "favorite" font does contain Cyrillic characters, BUT does not contain Hebrew characters...
And AFAIK, there is no, let's say, "SRT interpreter", designed to be as smart as a decent Web browser...
Ghitulescu
11th February 2012, 18:27
See, exactly this is the reason why the subtitles on DVDs are graphics and not text :)
When the engineers are allowed by lawyers to do their job, they'll do it :)
marsoupilami
12th February 2012, 12:02
Well - the fact that your "most beloved font" doesn't contain both character sets doesn't make the whole thing senseless. (You might be satisfied with another one.)
The question is: ARE there smart SRT interpreters/converters?
And: I guess, there is not even one "interchangeable" and common graphics format for subtitles on this planet... Or is it?
Ghitulescu
12th February 2012, 14:03
BMP for graphics and XML for formatted texts
Midzuki
13th February 2012, 01:27
...
The question is: ARE there smart SRT interpreters/converters?
Nope ^_^
Besides:
In most cases, the subtitles use only one language and/or "or character set", and all you have to do is configure the font and the general text-positioning in the SRT filter.
But again, whenever you happen to need "absolute-positioning", various colors, and "etc" :) , then even the smartest SRT filter will still remain unable to read your mind. :D
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.