Earlier quoted context omitted.
Great question. The main use case I can think of is when reference.srt and unsynchronized.srt are in different languages, and you want to eventually merge them into a single dual-language subtitle file. EDIT: Oh, I should also mention that you don't need a reference.srt -- it can look at the video directly and use that as a reference.
> when reference.srt and unsynchronized.srt are in different languages I just want to thank you for including this use-case, because it's exactly the thing I'm regularly running into. Subs in one language are bundled with the vid, all subs from OpenSubtitles are desynchronized.
Show HN: Automatically synchronize subtitles with video
121–129 of 129 posts
Re: Show HN: Automatically synchronize subtitles with video
#122> I have yet to find a case where the automatic synchronization has been off by more than ~1 second That's actually quite bad synchronization error for A-V; maybe it's less noticeable for subtitles. I wonder if there is a good way to reduce that error down to milliseconds.
100 ms A/V is already quite noticeable, with some training one might spot 50 ms too.
Re: Show HN: Automatically synchronize subtitles with video
#123Re: Show HN: Automatically synchronize subtitles with video
#124Earlier quoted context omitted.
ELI5: You can turn this problem into finding the best "convolution index", and fourier transforms make computing convolutions cheaper. ELIUndergrad: (note that \* means multiplication, there doesnt seem to be a way to escape an asterisk) Lets start by seeing how this is a convolution. We have the videoSpeech sequence, and the subtitle sequence - each is a vector, indexed by time, of 0's and 1's indicating whether the…
> ELI5: You can turn this problem into finding the best "convolution index", and fourier transforms make computing convolutions cheaper. I tried this sentence on my 5-year-old and got a blank stare. He then proceeded to tell me a story about how Darth Vader is so scary and cool and that he's actually Luke's father. YMMV.
ELI5 v2: you can look at the sequences a different way, like tilting your head to look at them from a different angle. and from that angle, we can more easily try every possible way of putting them together, so that we can choose the best way.
Re: Show HN: Automatically synchronize subtitles with video
#125Re: Show HN: Automatically synchronize subtitles with video
#126You should look into DNA and RNA sequence alignment algos for possible improvements on your FFT. It's a huge and very well-explored space.
Re: Show HN: Automatically synchronize subtitles with video
#127Earlier quoted context omitted.
This sounds amazing! Did you use a USB TV tuner or an online source? Is there chance you could open source the code?
I used an online stream source; A HLS stream that one of my local TV stations broadcasts online. My method will only work with streams that have SCTE35 packets embedded. This is normally used for local ad insertion on cable networks, so it may not always be available on OTA streams. There is not much code because it is mostly ffmpeg that does the work. I used nodejs to manage an ffmpeg child process, read its output…
Re: Show HN: Automatically synchronize subtitles with video
#128In this scenario I use Subtitle Workshop, which allows me to specify two (or more) pairs of times, and all subtitles are synchronized accordingly.
Optimally the two pairs of times would be near the beginning and the end, but to prevent big plot spoilers, I usually use the beginning and 2/3 of the length.
Re: Show HN: Automatically synchronize subtitles with video
#129This is an area I am actively looking into at the moment for my employer. It's an interesting project, and I am excited to see work in this domain. Note that this will not pass QC at any broadcaster/OTT. Our tolerance is typically within 1-12 frames (and a bunch of other requirements around shot changes, etc.)
> Our tolerance is typically within 1-12 frames (and a bunch of other requirements around shot changes, etc.) Tell me more!