So, in a bit of an interesting situation here. I have two sets of subtitles, the originals, and one which I case converted, spell-checked and did auto-line break for in SubtitleEdit. Basically, I regret auto-line breaking, and want to revert those changes while keeping my spell check.
Is there a way to copy just how the lines are broken from one .srt to another? Or, alternatively, can I compare/replace each subtitle on a case by case basis using the two .srt files? Really trying to avoid having to spell-check/case convert again. Thanks!
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 5 of 5
Thread
-
-
Just do a spell check on the original srt,it will go faster cause subtitle edit remembers previous spell checks.
I think,therefore i am a hamster. -
Unfortunately we’re talking about around 150 episodes of a TV show here. Would really prefer to not have to re-check if possible
-
There's no simple way to redo the line breaks so you gotta redo all of them.
I think,therefore i am a hamster. -
Could be done more easily by comparing each pair of files with WinMerge. (I've searched if there was an option to reproduce line breaks from one file to another, couldn't find anything relevant.)
Perhaps it could be done even more quickly with an advanced text editor like TEDNotepad or Notepad++, using search and replace with “regular expression” syntax. I tested the following with TEDNotepad.
– Merge both files of each pair into a single text file. (Could be done with a batch script.)
– For the first half of the merged file, corresponding to the first (original) file, add a “-01” suffix to the subtitle number, and replace line breaks by a distinctive character sequence, anything that is not going to be present in any of those files, like “###”.
Search : ^(\d+)$\n^(.+ --> .+)$\n^(.+)$\n^(.+)$
Replace : \1-01\t\2\t\3###\4
– For the second half of the merged file, corresponding to the second (spell-checked) file, add a “-02” suffix and replace line breaks by spaces.
Search : ^(\d+)$\n^(.+ --> .+)$\n^(.+)$\n^(.+)$
Replace : \1-02\n\2\n\3 \4
– Sort lines by number (ascending order) ; with the suffix added to subtitles' numbers, the first line of each pair should correspond to the first file.
– Then use matching groups to reproduce the position of the line break placeholder in the first line into the second line.
Search : ^(\d+)-01\t(.+)###(.+)$\n^\1-02\t\2 \3
Replace : \1-01\t\2###\3\n\1-02\t\2###\3
– Then remove the first line of each pair and recreate the original structure.
Search : ^(\d+)-01\t(.+ --> .+)\t(.+)###(.+)$\n^\1-02\t\2\t\3###\4
Replace : \1\n\2\n\3\n\4\n
...BUT I realize just now that this will work only for lines which were not modified, lines which were modified would have to be checked manually, but with that many files it would still save quite a lot of time. Perhaps there's a clever trick that could make this work also with modified lines, can't think of anything else right now.
I have less experience with Notepad++ but it should process regular expressions in the same way, and has the ability to process multiple files at once.
Similar Threads
-
how to remove breaks in a video file not adverts 14 seconds breaks
By elm in forum EditingReplies: 3Last Post: 6th Mar 2020, 00:24 -
SRT, change vertical margin but keep 1-line subtitles vertically centered
By abolibibelot in forum SubtitleReplies: 15Last Post: 20th Aug 2019, 21:11 -
SRT blank line character
By macarthskey in forum Newbie / General discussionsReplies: 18Last Post: 31st Mar 2019, 07:20 -
dfxp to srt: line break / space problem
By Spiny Norman in forum SubtitleReplies: 16Last Post: 21st Jul 2018, 06:30 -
can't see first line of srt file
By flannob in forum Newbie / General discussionsReplies: 2Last Post: 23rd Mar 2016, 12:40