Software to analyse the timings of 2 subtitles?

For developers and developing site - suggestions, coding problems, API questions, new applications...
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.

Software to analyse the timings of 2 subtitles?

Postby Kurosawa » Mon Aug 27, 2012 11:06 pm

Hi,
I'll begin by describing my situation. I have the english subtitles synchronized for a movie. I have the french subtitles that aren't totally in sync with that same movie. The 2 subtitles match at the beginning (let's say the first hour), but I see there's a slight delay by the end of the movie meaning the french subtitles were probably made for another version of the movie that contained less scenes (director cut vs theatrical cut for example). Most of the time these different cuts only add one or two scenes. In the situation I'm facing, the english subtitles just end 37 seconds or so later than the french ones.

What I would like to do is figure out at which moment the delay between the 2 subs occur without having to read each lines of the subtitles (thus getting spoiled).
What I thought would be a solution is a program analyzing the delay between 2 lines of the same subtitle and comparing them to the other subtitles. If the difference between the delays is bigger than (let's say) 2 seconds, I would like the software to highlight the corresponding line.


I thought giving a simplified example might help:

Subtitle A could look like this:


1
00:00:24,591 --> 00:00:30,359
A SHOCHIKU FILM

2
00:00:32,365 --> 00:00:36,199
A SHOCHIKU-IMAMURA
COPRODUCTION

3
00:00:37,337 --> 00:00:41,171
JANUARY 4, 1964

4
00:01:10,770 --> 00:01:14,638
Let us go

5
00:01:16,376 --> 00:01:19,709
Let us go

6
00:01:38,588 --> 00:01:31,250
To the Temple

7
00:01:42,525 --> 00:01:40,660
The Temple of Paradise


Subtitle B could look like this:
1
00:00:24,591 --> 00:00:30,359
UN FILM SHOCHIKU

2
00:00:32,365 --> 00:00:36,199
UNE COPRODUCTION SHOCHIKU-IMAMURA

3
00:00:37,337 --> 00:00:41,171
LE 4 JANVIER 1964

4
00:01:10,770 --> 00:01:14,638
Laissez-nous aller

5
00:01:16,376 --> 00:01:19,709
Laissez-nous aller

6
00:01:28,588 --> 00:01:31,250
Vers le Temple

7
00:01:32,525 --> 00:01:40,660
Le Temple du Paradis

    
The delay between the line 5 and 6 is not the same on the 2 subs (8 seconds versus 18 seconds), but it is the same between line 6 and 7 (4 seconds in both cases). I would like to have a software able to analyse these timings and tell me at which line the delays differ
Now, we know subtitles from different languages can vary while still match as some translations need 2 lines in one language, one line in an other. So the little differences (delays under 1 or 2 seconds) should be ignored by the program in order to underline only the important differences.

Yes, I've asked if it already exists on an other forum and it doesn't seem to be the case. I've made some searches, tried different softwares (subtitle workshop, subtitle edit, subtitle tool, subtitle creator), but didn't find exactly what I want. Some of them offer subtitle comparison, but it doesn't do exactly what I'm asking for. It doesn't highlight the delays that don't match.

Why am I asking this? Cause it's a problem that I've encountered frequently. The french subtitles are often made for releases not as good as the english ones. I'd prefer to watch a criterion release rather than a... non-criterion release.

I know I can convert the fps, adjust the subs from 2 different points, but these solutions don't work when you have subtitles for 2 different cuts of the same movie. I also realize the result could be missing subs for the additional scenes, but it doesn't bother me.

Is this possible? Did I miss something? :mrgreen:
Kurosawa
 
Posts: 3
Joined: Mon Aug 27, 2012 10:38 pm

Re: Software to analyse the timings of 2 subtitles?

Postby jcdr » Thu Aug 30, 2012 9:51 am

To my knowledge, there is no sub software doing this specific task.

But you can do your own "soft" with MS Excel, this could even be automatic with an Excel VB macro if you are familiar and have to do this very often (although it took me only five minutes by hand for your example).

1. Transform the two .srt files to .ssa (so that each time stamp is on one line).
2. Select and copy the content of the two files in separate columns or sheets of an Excel file. Dialog will start at line 14.
3. For each line, start time stamp will be MID(CELL;20;10), end time stamp MID(CELL;31;10).
4. Substract time stamps in a separate column, format to Hour 00:00.0 to have the exact delay for starts and ends for each line.
5. You can have a last column to highlight delays superior to (say) 2 seconds. If by macro, this can even be highlighted with a nice flashy yellow color...

Indeed your example is an easy one as the lines correspond each other. In Director vs Theatrical cut, there are less lines so you would have to seek translation correspondence and copy/paste blocks of dialogs around to make lines correspond.

If you wish to re-create a .ssa file with e.g. the time stamps of the English file and the dialogs of the French one, then for each line, the new dialog line will be:
LEFT(English_line;76)&RIGHT(French_line;LEN(French_line)-76). You then copy/paste all lines from Excel to your .txt editor. Et voila!
User avatar
jcdr
Moderator
 
Posts: 365
Joined: Sun Apr 08, 2012 9:49 am

Re: Software to analyse the timings of 2 subtitles?

Postby jcdr » Thu Aug 30, 2012 9:58 am

Comparator.jpg
A picture is worth a thousand words
Comparator.jpg (386.5 KiB) Viewed 2563 times
User avatar
jcdr
Moderator
 
Posts: 365
Joined: Sun Apr 08, 2012 9:49 am

Re: Software to analyse the timings of 2 subtitles?

Postby Kurosawa » Thu Aug 30, 2012 2:45 pm

As you recommended I'm working on an excel sheet, but I think I misjudged the problem coming from the translations differences. In the subtitles I'm working on, I know the 2 versions are 'in sync' for the first hour. The problem is they're not done in the exact same number of lines. The english subtitles have 200 more lines and it doesn't come from the director cut. The additional scenes from the director cut are silent so it's just the translations that differ. I have the beginning time stamps of the english subs in the column A, the french ones in column B.
I tried B1-A1 in column C and (B2-B1)-(A2-A1) in column D. In both columns C and D, I get numbers superior to 2 seconds very often.


I don't see how to bypass this problem. I'm beginning to think it's impossible.
Kurosawa
 
Posts: 3
Joined: Mon Aug 27, 2012 10:38 pm

Re: Software to analyse the timings of 2 subtitles?

Postby jcdr » Thu Aug 30, 2012 3:53 pm

Then I think there is no other solution than using Subtitle Edit or Workshop, and re-sync blocks of lines manually.
User avatar
jcdr
Moderator
 
Posts: 365
Joined: Sun Apr 08, 2012 9:49 am

Re: Software to analyse the timings of 2 subtitles?

Postby jcdr » Fri Aug 31, 2012 1:44 pm

Could you please post the OS links to these two subtitles, and explain what resulting sub you want? I will have a look.
User avatar
jcdr
Moderator
 
Posts: 365
Joined: Sun Apr 08, 2012 9:49 am

Re: Software to analyse the timings of 2 subtitles?

Postby Kurosawa » Fri Aug 31, 2012 2:02 pm

jcdr wrote:Could you please post the OS links to these two subtitles, and explain what resulting sub you want? I will have a look.

Thanks for your help jcdr, I've synchronized the subs manually. I did use Subtitle Edit to have both subtitles side by side. I need to check with the movie now, probably this week-end.
I guess what I was asking for is not possible, or else, some developer would have already done it.
Kurosawa
 
Posts: 3
Joined: Mon Aug 27, 2012 10:38 pm


Return to Developing

Who is online

Users browsing this forum: Bing [Bot] and 0 guests