Live data from Hacker News

Show HN: Automatically synchronize subtitles with video

github.com

1–10 of 129 posts

Re: Show HN: Automatically synchronize subtitles with video

#3
This is cool.

I am constantly impressed by ffmpeg and it capabilities.

Last week I was able to make it act as a proxy for live streaming video that reduced the volume of ad-breaks by 50% automatically by listening for SCTE35 cue packets in the stream and adjusting a volume filter accordingly.

My housemate has a reality TV addiction, and the ads were getting on my nerves. I just intended to see if it was possible, but I had a POC running in about 1/2 an hour.

Re: Show HN: Automatically synchronize subtitles with video

#4
Awesome! According to the description of the internals this only works with offsets and doesn't adjust the subtitle's playback speed. I think playback speed variations are not that broad, it's usually caused by playing a subtitle written for a given FPS played back on a different FPS video. It might worth it to try common FPS ratios at once and keep the best match.

Re: Show HN: Automatically synchronize subtitles with video

#5
An even harder and cooler problem to solve would be finding extra scenes. Sometimes subtitle or movie have slightly different "cut" (e.g. directors cut) and there are some extra scenes added. A similar algorithmic approach could be used to solve this problem as well.

Re: Show HN: Automatically synchronize subtitles with video

#8
"Although it can usually work if all you have is the video file, it will be faster (and potentially more accurate) if you have a correctly synchronized "reference" srt file, in which case you can do the following:

subsync reference.srt -i unsynchronized.srt -o synchronized.srt"

I really don't understand what the reference.srt is supposed to be here.

Edit: If I have a "reference" which is synchronized why do I have to do anything at all? Why would I need to synchronize anything then?

Edit2: If the French titles are a translation of the English ones, how wouldn't copying the timestamps from one to another be enough? Or do you want to say that the program can match the subtitles which aren't based on the English ones and have different number of sentences etc? But how can it then know which part of translation belongs to what? What's short in one language isn't in another etc.

Re: Show HN: Automatically synchronize subtitles with video

#10
post #9

Sorry for the dumb question, but what exactly does this do? `subsync reference.srt -i unsynchronized.srt -o synchronized.srt` I mean, I already have a synchronized srt file, so what would I be syncing here?

I'm guessing `synchronized.srt` is just the name of the output file.
Post reply on HN