Some online video players give you the option to add or subtract delay e.g. by ±0.5s to subtitles to manually sync them to the video currently playing. However I become functionally dyslexic when it comes to actually figuring out how much delay has to be added. I end up randomly adding or subtracting delay and make it work through trial and error.

Is there some rule of thumb I could follow instead to systematically sync subtitles?

    • Lumidaub@feddit.org
      link
      fedilink
      arrow-up
      8
      ·
      7 hours ago

      Oh so you don’t actually have access to the files themselves. That’s unfortunate. Then I fear you’re at the mercy of whoever wrote that browser plugin.

      • enchantedgoldapple@sopuli.xyzOP
        link
        fedilink
        arrow-up
        2
        ·
        7 hours ago

        I must restate that the option of syncing subtitles by hand is still available in the interface, as mentioned in the post. It is only the question of how to deterministically set the subtitle delay without resorting to tinkering with the controls randomly.

        • scrion@lemmy.world
          link
          fedilink
          arrow-up
          3
          ·
          edit-2
          5 hours ago

          If the subtitles are actual subtitles and not dubs, you can extract timestamps from the audio with a model such as whisper + timestamp support. You could then optimize the overlap of timestamps in the subtitle format (e. g. SRT) with the timestamps provided by the model. That would give you a best fit delay, potentially even shifting over time.

          Given that you’re in a browser and don’t even have access to the subtitle data, that’s a purely theoretical exercise. While it might be possible to retrieve the subtitles from the site / API the browser is using and then set the delay in the browser component as well, that’d be far too much effort vs. switching to a better playback method.

          You could, however, compute the best match and set that manually, if that’s all you’re after, i. e. skip the automation part. You’d still need to access the source audio and subtitles.

          If the audio is in a different language, all bets are off, there is nothing to sync against. Translations also won’t help, since there are multiple ways to translate any given source material, and the origin and length don’t match up between languages, naturally.

        • Lumidaub@feddit.org
          link
          fedilink
          arrow-up
          5
          ·
          6 hours ago

          I get that but I wouldn’t know any such way. There are dedicated subtitle tools that can sync audio and text but those need the files. Failing that you can only do it by ear.

          If the subtitle file was downloaded from opensubtitles automatically, there’s also the very real possibility that it’s the wrong file. It might be the correct movie but the subtitles might be synced to a different framerate and there’d be no way for you to know.