Lurker News

Comments (124) 31 threads

Earlier comments
kozikow1 reply#
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.
smacke1 reply#
Totally agreed. I'm not sure how to do the alignment scoring step in this case, perhaps some kind of DTW / FFT hybrid... definitely worth further consideration.
rcthompson#
This sounds very similar to the problem of whole-genome alignment in bioinformatics. You have, say, the human and chimp genome sequences, and you want to align them to find out which portions of each genome correspond to which portions in the other, allowing for the possibility of insertions or deletions of DNA sequences in each one.

Unfortunately, I'm not too familiar with the current state of the art for whole-genome alignment, so I don't know for sure which algorithms are considered, but MUMmer4[1] seems like a good place to start. These algorithms are designed to handle sequences up to billions of letters long (e.g. the human genome, which is about 3 billion letters).
[1]: https://journals.plos.org/ploscompbiol/article?id=10.1371/jo...

smacke#
Cool! It looks to me like most of those approaches are a lot more sophisticated and work even when the text doesn't have any time annotations. At a first glance, it looks like the major downside is that these approaches are geared toward particular target languages. Subsync's advantage is its simplicity: by limiting the acoustic analysis part to simple voice detection, it can perform alignment between subtitles and audio/video in different languages, which is great for when you want to watch a TV episode in another language, but your video includes the previous episode's recap and your subtitles do not (or vice-versa). I'll definitely be taking a deeper look at these to see if there's any ideas / functionality that can be further incorporated.
psychometry2 replies#
You should look into DNA and RNA sequence alignment algos for possible improvements on your FFT. It's a huge and very well-explored space.
zimpenfish1 reply#
Since I already had it open (for unrelated reasons), this might be relevant.

https://en.wikipedia.org/wiki/Smith%E2%80%93Waterman_algorit...
> The Smith–Waterman algorithm performs local sequence alignment; that is, for determining similar regions between two strings of nucleic acid sequences or protein sequences.

amelius1 reply#
But also:

> The Smith–Waterman algorithm is fairly demanding of time: To align two sequences of lengths m and n, O(mn) time is required.

zimpenfish#
Thankfully I'm only working with short sequences but yeah, I guess that might be a problem.
smacke#
Agreed -- definitely worth thoroughly investigating this space to see whether there are any ideas that can be borrowed.
lainga1 reply#
Really neat! Because it doesn't rely on the video image data this would work for podcasts with subtitles (if they exist), right?
smacke#
Yes! it should work for this too, as long as ffmpeg recognizes the audio format :)

Load more comments