ffsubsync
ffsubsync copied to clipboard
Maybe add a command to check synchronization?
Hey! Thanks for the amazing work!
What I think would be very useful would be a command to check if the subtitles are already synced with the media. This could help tremendously with large libraries instead of manually checking or blindly running the sync command.
Hi,
Great suggestion. It turns out that checking for whether the subs are already synced is just as expensive computationally as going ahead and doing the synchronization, but I think there is definitely some room for improvement from a usage standpoint. Maybe add a "--is-already-synced" flag that causes the script to have retcode 0 if synced already and 1 otherwise.
Please feel free to comment if you have some ideas of how this kind of thing might best be consumed downstream.
Actually, i use your script to chose best candidate of subtitles between several with a basic bash script :
#!/bin/bash
score=$(subsync "$1" -i "$2" 2>&1 | grep "offset seconds" | cut -d" " -f3)
echo ${score#-}k
But i need to read video file each time, that's why a check of several subtitles will be very useful !