Wednesday, April 17, 2024

Resync Video Subtitles

Datatalk / Subtitles.

I bought the original set of Farscape DVDs, only to find out they have no Dutch subtitles. Bummer.

Online I found several Dutch subtitles as .srt files, but the timing was wrong. Here's how to fix subtitle synchronization issues...


Step by step


1. Rip the DVDs

Yep. I ripped the DVDs to my hard drive. I think that's not allowed (it's removing a failed DRM) and allowed at the same time (it is legal in the Netherlands to make a copy for your own personal use).

Call me confused 🤔

But... as I own the originals -- and you can watch Farscape for free on Plex -- I feel not that guilty. Unfortunately, you can't watch Farscape with Dutch subtitles on Plex 😒


2. Download the subtitles

I found the Dutch subtitles for all seasons of Farscape here:


I suspect they were made for 25 fps, with a slightly different intro, as a simple frame rate change wouldn't do it. Second bummer. But that can be fixed.


3. Download and install your media player

... which you probably already have done ages ago...

You have three options:

  • use 'quartz' - I have no idea what that means 😏
  • use VLC - which may confuse the buttons when using 'Visual Sync' (it will still work, but you may have to click on the video panel itself to start / stop when things don't work as expected)
  • use 'mpv.io' - which is open source and free, and works better inside Subtitle Edit


I opted for mpv.io, which made life a little easier than using VLC. I still suggest to use VLC for the final playback test! It's a great player anyway 😁 For Subtitle Edit though I strongly suggest to use mpv.io, which solves all sorts of problems and odd behavior.

Note: you don't have to download and install mpv.io, Subtitle Edit will take care of that for you! (That is to say: it will download and use the proper lib file, but that's good enough.)


4. Download and install Subtitle Edit 4.0.5 Next Beta 30

I assume older versions work just as well.

1. Install

2. Start Subtitle Edit

3. Settings / Video player / mpv

This will cause Subtitle Edit to download and install an mpv.io lib so it can decode video.

4. Exit and restart Subtitle Edit (just to be sure)


5. Prepare the files

Make sure the video file (.AVI or .MKV) and the subtitle file (.SRT) reside in the same folder, and have the same name, like this:

farscape - s01e01.mkv

farscape - s01e01.srt


The names must be identical, except for the file extension!


6. Drag the .SRT file into Subtitle Edit

Test-play the file to make sure the subtitles are the right ones but the timing is off.


7. Remove odd subtitle entries

See the image below:


(Click on image to enlarge)


.SRT files may contain a line near the end with a line number of 9999 and a time code of 00:00:00:000 or something similar. These lines may confuse Subtitle Edit, so remove them.

To remove a line select it, then hit Del.

I would also remove any fancy color formatting, strange symbols, and anything else that is irrelevant.


8. Synchronize

My source files had the wrong framerate, but they also had a different starting moment (probably due to a minor difference in the intro). I couldn't simply recalculate the playback rate, so I had to align the written words with the spoken text.

Subtitle Edit has a very nice option to do exactly that!

1. Synchronization / Visual Sync

2. Use the drop down menu on the left to select the first line of recognizable text

3. Look for the right spot in the video where that line is spoken

You may have to repeat steps 2 and 3 above and select another line if that one is more recognizable or better subtitled.

4. Use the drop down menu on the right to select the last line of recognizable text

5. Look for the right spot in the video where that line is spoken

Again, you may have to repeat steps 4 and 5 if another line works better.

6. Hit the 'Sync' button

Subtitle Edit will now resync your .SRT file by changing all timecodes inside that file. Pay attention to any errors.

7. Ok


9. Save

Save the new .SRT file, check your results with VLC, and you're done!


Links

  • Videohelp - explanation of Subtitle Edit, and download links
  • SubTalk - more on Subtitle Edit
  • Nikse - even more, and download links
  • mpv - video play library for Subtitle Edit
  • VLC - universal video player
  • MPlayer - another universal video player
  • SMPlayer - graphical frontend for both MPlayer and mpv

No comments:

Post a Comment