Try SubSync, open source movie subtitle synchronization app. Build in feature like this in VLC would be awesome.
Discussion on HN (4 months ago): https://news.ycombinator.com/item?id=29794153
Discussion on HN (4 months ago): https://news.ycombinator.com/item?id=29794153
Given our capabilities, it's really a straightforward thing to do. YouTube does it automatically (you drop in your script with the video, it auto-syncs everything).
It could even be done for when the language doesn't match, given an auto-translation pass and some heuristics.