SRT Subtitles - issue with line breaks

2

1

I've manually created an SRT file through textEdit. I used all the right formatting and it played well on VLC.

20
00:04:23,020 --> 00:04:24,230
- Nah, I'm not hungry.

21
00:04:24,230 --> 00:04:26,230
- How was the meeting?

22
00:04:26,230 --> 00:04:29,050
- Yeh, fine.

All is cool so far. Now I noticed some lines should be split into two lines, and would require a line break. Based on the formatting and parsing of SRT files, I should just be able to press enter. But VLC seems to just skip those lines, as if they didn't exist.

17
00:04:13,070 --> 00:04:14,150
Hi.

18
00:04:18,220 --> 00:04:21,040
Hey.
-Hey dad.

19
00:04:21,220 --> 00:04:23,020
Have you eaten yet?

Line 18 won't show as long as there is a line break there.

As I said, I'm working on textEdit.

Can anyone shed a light on this?

toms

Posted 2014-07-28T06:56:09.783

Reputation: 58

Answers

1

A couple of things to note:

First, the number of lines displayed depends upon the application; there is no standard for the actual number of lines displayed.  You can get the specification details here: SRT Specifications

Second, parsing the line break depends on the application. Some applications want CRLF (DOS style, Carriage Return + Line Feed) and some only LF (Unix style, Line Feed only). You need to see what VLC needs. Try changing the line break to CRLF and LF and see if that fixes your issue. I'm not sure whether TextEdit supports both styles of line break; VIM or GVIM does.

rboy

Posted 2014-07-28T06:56:09.783

Reputation: 310