Forum rules
Under no circumstances is spamming or advertising of any kind allowed. Do not post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate others security. Profanity or any kind of insolent behavior to other members (regardless of rank) will not be tolerated. Remember, what you don’t find offensive can be offensive to other members. Please treat each other with the kind of reverence you’d expect from other members.
Failure to comply with any of the above will result in users being banned without notice. If any further details are needed, contact: “The team” using the link at the bottom of the forum page. Thank you.
paolocasalis
Posts: 2
Joined: Fri Nov 18, 2016 1:35 pm

SRT universal formatting

Fri Nov 18, 2016 1:40 pm

Hi Guys
I am a filmaker from Italy and I have a question that may sound simple or basic for most of you, I think, but it's making me crazy!
I upload my documentaries on a streaming platform called Reelhouse, where users are allowed to upload an external SRT file.
Now... sometimes the subtitles work (are visible) sometimes not...
I've known from the website administrators that it's mainly a question of "how" the SRT is formatted, and that the UTF-8 formatting is the best.
I've done it, but it's not enough, the problem continues...
So, how do you format your SRT files? Which program? Notepad ++, Subtitle edit or others?
thanks so much for any help
Paolo

User avatar
SmallBrother
Site Admin
Posts: 3724
Joined: Sun Mar 04, 2012 12:59 pm
Location: Somewhere on this globe

Re: SRT universal formatting

Fri Nov 18, 2016 3:31 pm

I have heard that UTF-8 encoding could make trouble.
Ironically, because technically (for displaying characters) I think it's the best (universal) method.

Sometimes there are mistakes in the syntax, for example a line number missing, a line number repeated, first line is not 1, a mistake in the time code, etc. Recently I came across a subtitle where the tag for italics used a capital i instead of a lowercase, causing the subtitle to fail. Or having a time code going beyond the actual length of the video (could easily happen with extended credits).
All these things could lead to complete failure. "Could" ;-) And it could work in one environment, and fail in another.

For making subtitles you should always use subtitling software, I recommend Subtitle Edit. This will avoid the very obvious and crucial syntax mistakes. Using a plain text editor is asking for trouble.

But this is all speculative. You should have a look at a subtitle which is working, another which is not working, and see what's the difference. Sometimes loading the bad subtitle into Subtitle Edit will already throw an error.
Nowadays a VPN is a must for everyone. A VPN allows you safe surfing and protects you against spying governments and companies.
I advise AirVPN - from € 2,75 per month. Click the below banner for more info.


Image

paolocasalis
Posts: 2
Joined: Fri Nov 18, 2016 1:35 pm

Re: SRT universal formatting

Fri Nov 18, 2016 4:28 pm

Tx for the reply, SmallBrother
no, my srt worlks perfactly. I mean, if I put it in VLC or others, everything is ok
The problem is with the interface.... and this is why I'm focused on the formatting, rather than on other types of mistakes like the ones you've put in evidence.
tx

kazekira
Posts: 6
Joined: Thu Jul 28, 2016 7:48 am

Re: SRT universal formatting

Fri Nov 18, 2016 6:53 pm

Hey, paolo!

There's three things that, in my experience, could cause subtitles to be shown in a faulty manner, mainly on websites, since most or all players such as VLC are able to ignore little irritations:

1.) As SmallBrother has already mentioned: the encoding. Personally, I haven't had any issues so far with UTF-8 and I always recommend it, due to it being the most compatible and best universal one. Alternatively, you could try encoding it in ASCII, which is basically the 'standard' in the US and is being used quite often in Australia as well. ASCII can't handle special characters all that well, though, so if your error happens not to be due to encoding, I'd recommend you to stick with UTF-8; it's more or less a safe bet.

2.) The numbers. I've had quite a lot of annoyances with this one already. If you're on Microsoft using a subtitle editor, you'll be most certainly just fine. But when on macOS, most tools start the numbering at 0, rather than 1, for whatever reason. This could cause some sort of syntax error on web-based players, rendering the subtitle useless. You can check whether or not this might be the issue by simply opening the .srt file with a text editor of your choice and check whether the very first number is a 0 or a 1. If it's a 0 and you're on macOS, the easiest way to fix this is to open the file with OS FlixTools, drag the respective file to the 'Synchronize subtitles' tab, set the proper input and output encoding and simply save it. This way, the numbering will be edited in order to start with 1 and you should be just fine. I specifically recommend FlixTools here, not only because it's a tool of our own, but after trying this workaround with 6 different sub editors on macOS, I found it to be the only one that automatically corrects the numbering to start with 1.
If you're on Windows, though, I can't really help you out on that one. You might want to try out a couple of subtitle editors and check if they either have a tool to renumber the subtitles, or just re-export them, hoping that the numbering will be fixed automatically.

3.) The line format. This one really sucks and it's a pain in the ass to fix it, since it's a classic compatibility issue.
If you've exported your .srt file on Windows using any tool, Windows applies its standard way of formatting lines to it, called CRLF. This is a combination of CR and LF.
If you've exported your .srt file on a legacy version of Linux or a macOS version older than 9, the line format will be CR.
If you've exported your .srt file on a current version of macOS or Linus, the line format will be LF, which I consider to be the universal standard to go with nowadays, since Microsoft's CRLF approach is wholly unnecessary.
Now, what does all this mean? Since most people use Windows, I assume that this web-based player and subtitle plug-in are primarily aimed to please Windows users, having no issue whatsoever displaying CRLF-formatted subtitles.
But, if not on Windows, it might be that the player only shows either the very first line of your .srt file, or no line at all, due to it having issues reading the line formatting on a code basis.
I can't really help you out with this one, since I simply kept avoiding websites that require me to change the line formatting (I'm on macOS).
But your best bet would be to just google for ways to 'convert LF to CRLF' or something like that. If I remember correctly, there's a couple different ways of achieving this, one consisting of compiling a version of Perl and building a script that handles the task.

I hope I could shed some light on your issue and, if you're able to resolve it, please let me know what you did to achieve this- for further reference. :)

Cheers,
kaze

Return to “Developing”

Who is online

Users browsing this forum: No registered users and 29 guests