ffmpeg: Untertitel extrahieren
Unterstützte Untertitelformate anzeigen1
ffmpeg -codecs -hide_banner | grep subtitle
DES... ass ASS (Advanced SSA) subtitle (decoders: ssa ass ) (encoders: ssa ass ) DES... dvb_subtitle DVB subtitles (decoders: dvbsub ) (encoders: dvbsub ) DES... dvd_subtitle DVD subtitles (decoders: dvdsub ) (encoders: dvdsub ) D.S... hdmv_pgs_subtitle HDMV Presentation Graphic Stream subtitles (decoders: pgssub ) ..S... hdmv_text_subtitle HDMV Text subtitle D.S... jacosub JACOsub subtitle D.S... microdvd MicroDVD subtitle D.S... mpl2 MPL2 subtitle D.S... pjs PJS (Phoenix Japanimation Society) subtitle D.S... realtext RealText subtitle D.S... sami SAMI subtitle ..S... srt SubRip subtitle with embedded timing ..S... ssa SSA (SubStation Alpha) subtitle D.S... stl Spruce subtitle format DES... subrip SubRip subtitle (decoders: srt subrip ) (encoders: srt subrip ) D.S... subviewer SubViewer subtitle D.S... subviewer1 SubViewer v1 subtitle D.S... vplayer VPlayer subtitle DES... webvtt WebVTT subtitle
1) D = Decode, E = Encode
Ersten Untertitel extrahieren
ffmpeg -i Film.mkv -map 0:s:0 -hide_banner -y Film.0.subs.srt
Zweiten Untertitel extrahieren
ffmpeg -i Film.mkv -map 0:s:1 -hide_banner -y Film.1.subs.srt
Dritten Untertitel extrahieren
ffmpeg -i Film.mkv -map 0:s:2 -hide_banner -y Film.2.subs.srt
Burn-in
ffmpeg -i input.mkv -vf subtitles=input.mkv -acodec copy -sn output.mkv
oder
ffmpeg -i input.mkv -filter_complex "[0:v:0][0:2]overlay" -acodec copy -sn output.mkv