

My 3 hour weekend project: Fix My Movie Subtitles - superasn
http://www.fixmysubs.com/

======
superasn
Being a non-native english speaker I often like to use subtitles for watching
movies. While there are some very good sites like podnapisi, subtitlesource,
etc unfortunately it is sometimes still hard to find matching subtitles and
the sync is usually out.

So to fix this problem I wrote a Perl script for my weekend project and it was
surprisingly easy to port to the web thanks to Twitter's bootstrap CSS. So
here is the site. Even the domain name is merely 1-hour old!

Your questions / comments are welcome. I hope this is useful to people like me
who have had trouble finding movie subtitles and also people who are hearing-
impaired.

~~~
johnwatson11218
I have used dvds with foreign subtitles to learn languages. One thing I don't
like is that the spoken translation is usually different than the subtitled
one. I think it would be a nice learning aide if the two translations could be
made to match. Or to at least have the option to put in alternate subtitled
translations.

~~~
divtxt
Translated words and phrases often have to be very different than the literal
translation. For example: "sack" in english can also mean firing a worker, or
plundering a city. The word for "a large bag" in most languages will not have
these same extra meanings.

Also, you may even need 3 subtitles:

\- transcription of the spoken language: _les jeux sont faits_

\- literal translation: _the games are made/done_

\- correct/useful translation: _the chips are down_

~~~
georgemcbay
I'm not 100% sure since I'm not the guy you responded to, but I think his
situation is that he's listening to the audio in the same language as the
subtitles, and they are different.

I've seen this happen when English subtitles were enabled for an English
language movie I've been watching. Sometimes what is transcribed in the
subtitles is different than what people are actually saying (though the gist
is the same) even though both are in English.

In any case, this is clearly not something easily fixable by a website script.

~~~
divtxt
Good catch. That looks right now you've pointed it out. I was thrown off by
the word "translation".

------
reduxredacted
While I'm sure this would probably violate all sorts of copyright, I'd love a
site that could provide alternate dubbed languages (specifically Spanish,
German and Portuguese) for movies.

The dubbing is never quite right or simply not included (for the media I'm
looking at purchasing, I always ensure that at least Spanish is covered). I'm
using television shows and movies that I have nearly memorized the script to
help with "immersion" between more traditional study (I took many years of
Spanish and gave up ... this hack wasn't mine, it was mentioned by a coworker
and it turned out to be a very clever one). In the US, it's easy to find
DVD/BD versions that include Spanish (to a lesser extent, French, which I'm
not interested in), but rarely include anything else in the US (and most of
the stuff I want to watch includes neither).

This service is intriguing to me. I don't routinely download movies, and I'm
unfamiliar with .srt and .sub formats, but I'm wondering if this could help
assist reading in another language the same way it has helped in
listening/comprehension and it certainly seems like your site is solving a
problem I've seen when transcoding DVDs ... it used to be audio mismatch
(largely a problem of the past with modern container formats), now it sounds
like the same pain point exists with subtitles.

Well done.

~~~
forgingahead
<http://www.yabla.com> might be what you are looking for -- it's great for
learning via subtitled foreign clips. The content isn't dubbed however, rather
it's from those countries that speak the language natively.

------
apu
Nice idea -- more automation would be awesome.

I wrote a simple script at one point for dealing with constant offsets by
doing simple analysis on the audio track of a movie and the subtitle file to
match up peaks. It worked...okay, although I was using very simple features.

It would be great to make it more robust, although I don't know if there's an
easy way to upload some audio from a movie to a website (that wouldn't be a
lot of work for the user).

------
malkia
I'm also missing captions (Netflix for TV, for other devices certain movies
have them).

Me & my wife used to (and still do) learn quite a lot new words from there,
and also how to pronounce certain words, and understand.

Lately it was very useful for us, as we can turn down the volume, and not
disturb our son while he's sleeping. Just a notch up & down for music/sounds,
and reading the rest of the movie.

------
ckuijjer
Nice weekend project!

My current workflow to sync subtitles is to find one sentence in the beginning
of the movie and one near the end, and search the subtitle text for these
sentences. The four timestamps are then ran through the perl program subs (see
<http://search.cpan.org/~karasik/Subtitles-1.03/subs>).

Perhaps using a search based interface, instead of letting the user pick from
all lines, would be a nice extension.

------
joelhaasnoot
Hmm, good solution for the times when you can't find subtitles that match.
Often VLC's subtitle sync works though (lets you adjust in hundreds of ms each
way).

~~~
superasn
Thank you :) Yes, there is an option in KMPlayer too (for subtitle fps
conversion and time shifting) but sometimes trial and error just doesn't seem
to work for me. So, I wrote this script instead (it was good fun).

As of now I've tried many different movies and deliberately downloaded the
wrong FPS and time shifted it using the subtitle tool but so far it is working
as it should be :)

------
jakubw
It's been a while since I last used third-party subtitles for a movie but as I
recall, it rarely happens that all captions are off by a constant offset.
Usually the desynchronization itself stems from a movie version having longer
gaps between scenes, for instance. In that case, this won't be much helpful
but otherwise, good job.

~~~
johndoeee
That's a framerate issue, e.g. 23.976 frame/s vs. 25 frame/s. Easily
correctable, not sure if this service can handle that though.

~~~
superasn
Yes, it can automatically handle all frame-rate issues with time-shifting.
What it can't handle is if there is an irregular break in between (say extra
subtitles in between, extended versions, etc).

------
altrego99
I had the same need and found this a couple of years ago:

code.google.com/p/subeditor/downloads/list

Have been using this since then. It seems to take first two times to calculate
the difference in speed, while third onward it just adjusts the starting point
maintaining the same speed.

------
brador
Question: How did you know a "well" css class exists in Twitter Bootstrap. I
cannot find it in the documentation, but it's in your code and it's in the
Bootstrap file!

~~~
xorglorb
I found it in one of their demo applications. They hide a lot of stuff in
there.

~~~
brador
Got a link to their demo apps? I just have the 3 html examples linked in from
the main doc sheet.

------
non123
There are sites that do this. I don't remember which but one of the sites
where you can download subtitles already has a little javascript app that does
the same.

------
alx
could you add some screenshots to explain the process?

I'll test it on my next subtitle issue :)

~~~
superasn
Yes, I am hoping to add a 30 second video to explain the whole process.
Basically you upload a srt file in the first screen and then match any 3
subtitle text to the correct time (as determined from watching the video).

Based on that information the script calculates the discrepancy in the frame
rate or time shift by comparing it with the original file and then fixes that
for you (also gives you two different versions if more than one solution fits)

~~~
langsamer
Are you going to have subtitles for your 30 second tutorial video? ;-)

------
drivebyacct2
I had the reverse idea. A plugin for VLC that takes the MD5SUM of whatever
file you're watching and looks for the matching/appropriate subtitle file and
autoloads it.

~~~
gsa
SMPlayer [1] searches opensubtitles.org with a simple hash [2].

[1] <http://smplayer.sourceforge.net/>

[2]
[http://trac.opensubtitles.org/projects/opensubtitles/wiki/Ha...](http://trac.opensubtitles.org/projects/opensubtitles/wiki/HashSourceCodes)

~~~
drivebyacct2
Fantastic. Thanks for this!

------
jQueryIsAwesome
My movie player should have this integrated. Nice idea.

------
ellie42
Copyright 2012? Really?

