Subtitle Sync
The Subtitle Sync flow element fixes subtitles that are out of sync with the audio. Each matching text subtitle track is aligned against the audio and replaced in the FFmpeg Builder model with the synchronized version.
It uses the Subtitle Sync task in FileFlows Forge, which detects when speech occurs in the audio and finds the timing shift that best lines the subtitle cues up with it.
This flow element requires FileFlows Forge to be configured and available.
How It Works
- Selects the text subtitle tracks to synchronize.
- For each subtitle, picks the audio track to synchronize against.
- Extracts that audio track as a small mono speech track and uploads it to Forge. Each audio track is only uploaded once, even if several subtitles use it.
- Extracts the subtitle and sends it to Forge to be synchronized. SRT and other plain text subtitles are sent as SRT. ASS/SSA subtitles are sent as ASS so their styling is kept, unless Convert to SRT is enabled.
- Replaces the original subtitle track with the synchronized subtitle, in the same position, keeping its title, language and default, forced and hearing impaired flags.
- Marks the FFmpeg Builder model for forced encoding so the synchronized subtitles are included in the output.
It corrects:
- Offsets, where every subtitle appears too early or too late by the same amount.
- Framerate mismatches, where subtitles timed for one framerate (for example 25 fps) drift further out of sync over the length of a video at another framerate (for example 23.976 fps).
It cannot fix subtitles that drift unevenly, such as subtitles made for a different cut of the video.
Subtitle Selection
- Image-based subtitles (PGS, VobSub) are skipped. Use the Image Subtitle Converter first to convert them to text.
- ASS/SSA subtitles are synchronized in their own format, so fonts, colours, positioning and other styling are kept. Enable Convert to SRT to convert them to SRT instead.
- Subtitles added earlier in the flow from an external
.srt,.assor.ssafile are synchronized too.
Audio Selection
For each subtitle, the audio track is chosen in this order:
- An audio track in the same language as the subtitle.
- The default audio track.
- The first audio track.
Commentary tracks are ignored unless they are the only audio available, as their speech does not follow the subtitles.
Configuration
Sync All
Determines if all text subtitle tracks should be synchronized, or only specific language tracks.
| Value | Description |
|---|---|
true | All text subtitle tracks will be synchronized |
false | Only text subtitle tracks matching the specified languages will be synchronized; others are left as-is |
Languages
Only shown when Sync All is false.
The languages of the subtitle tracks to synchronize.
You can specify languages by their ISO 639-2/T 3-letter code.
For example: eng for English, deu for German, fra for French, spa for Spanish.
Max Offset
The maximum number of seconds a subtitle may be shifted by. Default is 60.
Use 0 to use the Default Max Offset configured on the Forge task. Increase this if your subtitles are out by more than a minute.
Fix Framerate
When enabled, framerate mismatches are detected and corrected in addition to the offset. Default is true.
Convert to SRT
When enabled, ASS/SSA subtitles are converted to SRT when they are synchronized. This removes their styling, but SRT is supported by more players and containers. Default is false.
When disabled, ASS/SSA subtitles are synchronized in their own format and keep their styling.
SRT and other plain text subtitles are not affected by this setting.
Outputs
- One or more subtitle tracks were synchronized.
- No subtitle tracks were synchronized.