ffsubsync
2 likes
Language-agnostic automatic synchronization of subtitles with video, so that subtitles are aligned to the correct starting point within the video.
Cost / License
- Free
- Open Source (MIT)
Platforms
- Windows
- Mac
- Linux
- Python
Features
- Srt
- VLC
- Synchronization
Tags
- subtitle-sync
- vlc-media-player
- voice-activity-detection
- vad
- Sync Subtitles
- caption
- captions
- srt-subtitles
- string-alignment
- speech-detection
- ffmpeg
- fft
- video
- fast-fourier-transform
- synchronize-subtitles
- Subtitles
- alignment
- sync
- subtitle-synchronization
- audio
ffsubsync News & Activities
Highlights All activities
Recent activities
ffsubsync information
No comments or reviews, maybe you want to be first?
Post comment/reviewWhat is ffsubsync?
Language-agnostic automatic synchronization of subtitles with video, so that subtitles are aligned to the correct starting point within the video.
Usage: ffs video.mp4 -i unsynchronized.srt -o synchronized.srt
How It Works:
- Discretize both the video file's audio stream and the subtitles into 10ms windows.
- For each 10ms window, determine whether that window contains speech. This is trivial to do for subtitles (we just determine whether any subtitle is "on" during each time window); for the audio stream, use an off-the-shelf voice activity detector (VAD) like the one built into webrtc.
- Now we have two binary strings: one for the subtitles, and one for the video. Try to align these strings by matching 0's with 0's and 1's with 1's. We score these alignments as (# video 1's matched w/ subtitle 1's) - (# video 1's matched with subtitle 0's).


