Login Register
Scroll Scroll

ClipFlair Forums. Create discussion topics and get answers

Feedback on ClipFlair Studio application empty lines at end of SRT are parsed as caption rows  Viewed 47748 time(s), 5 post(s), 5/9/2013 1:04:34 AM - by Admin

Admin
2550 Reputation 349 Total posts
5/9/2013 1:04:49 AM

empty lines at end of SRT file are parsed as empty caption rows at time 0, they shouldn't be parsed as such since they're not time marked in the SRT (should just add them as empty rows to the previous caption)







try importing attachment

This content has not been rated yet. 
1
Admin
2550 Reputation 349 Total posts
5/11/2013 2:16:00 AM

seems SRT format was designed with blank line for separator (at least according to Wikipedia - http://en.wikipedia.org/wiki/SubRip)



however for files edited by hand with multiple empty rows at the end of the file sometimes, this can be an issue



so maybe should make the parser more clever and try to detect a blank line (treated as separator) before the end of the file or just before a line with the next number. All blank lines before it will be considered part of the previous caption



of course such files (with one or more blank rows at the end of a caption entry) may not be imported correctly by other software (need some testing with 3d party s/w), so maybe when saving to SRT should trim any empty rows at end of each caption

This content has not been rated yet. 
2
George
3425 Reputation 460 Total posts
3/19/2014 7:32:32 PM

the issue is not only with blank lines at the end of the file, but in between caption blocks too, that is


1

00:00:11,086 --> 00:00:13,078

"Good morning, Columbus."




2

00:00:15,049 --> 00:00:18,805

My mother's eternal words, reminding

me America was already discovered,


will result in two extra rows at time 0:0 (since it found no time entry) that end up at the top of the captions grid


obviously need to make the SRT parsing code I had written back in the time of LeViS project (http://LvS.codeplex.com) a bit more clever with the extra empty lines (when saving I remove such lines, but other software don't remove empty rows at the end of a captions entry, so I need to address this at loading too)

This content has not been rated yet. 
3
George
3425 Reputation 460 Total posts
3/22/2014 12:55:17 PM

this should be fixed now, SRT import ignores extra empty rows at the end of the SRT file or in between caption blocks in the file

also made sure we never output mixed CR/CRLF line terminators (that is both Unix and DOS/Windows style), only CRLF, cause it might confuse some third party programs at import

NOTE that when one has empty lines in a caption, they are output as a single space char (not totally empty) because the SRT format didn't support that case well. I think some other software output a "." or similar character in such case instead of an empty line. This is mostly important when you have say 3 rows in a caption with a blank one in between

So in case you have SRT from other software that happens to have empty rows in the middle of a caption block, can add a space char or some other char (say .) to make those lines non-empty and let the SRT get imported correctly

This content has not been rated yet. 
4
George
3425 Reputation 460 Total posts
3/22/2014 12:58:07 PM

attaching some test cases

This content has not been rated yet. 
5