User Tools

Site Tools


howto:subtitles

Subtitles

Auto Synchronisation

The following python tool can be used to let it analyse the audio and subtitle and synchronise the subs to generate a new synced file. It works for offsets at the beginning, not for sync issues later in the file.

https://github.com/smacke/ffsubsync

Install on Linux Mint 22+:

pipx install git+https://github.com/smacke/ffsubsync@latest

Usage:

ffs video_file.mkv -i orig_sub.srt -o new_synced_sub.srt

Alternatives

Yatse kodi offset

JSON-RPC
Method: Input.ExecuteAction
Parameter: {“action”:“subtitledelayminus”}
or
Parameter: {“action”:“subtitledelayplus”}

Extract subtitles

Extract subtitle with specific metadata title:

for f in *.mkv; do ffmpeg -hide_banner -i "$f" -c copy -map 0:s:m:title:"English [ForcedNarrative]" "${f%.*}.en.forced.srt"; done
for f in *.mkv; do ffmpeg -hide_banner -i "$f" -c copy -map 0:s:m:title:"angličtina" "${f%.*}.en.srt"; done

#extract 2 at once
for f in *.mkv; do ffmpeg -hide_banner -i "$f" -c copy -map 0:s:m:title:"English [ForcedNarrative]" "${f%.*}.en.forced.srt" -c copy -map 0:s:m:title:"angličtina" "${f%.*}.en.srt"; done
howto/subtitles.txt · Last modified: by Wulf Rajek