- To extract more subtitles at once you have to duplicate the -map parameters for each file. Also include -c copy so that it just extracts the file without trying to process it: ffmpeg -i Movie.mkv -c copy -map 0:s:0 subs.01.srt -c copy -map 0:s:1 subs.02.srt. Anyway it will take long time because ffmpeg must read whole video file to find all.
- Sep 01, 2015 ffmpeg -i video.avi -vf 'ass=subtitle.ass' out.avi If your subtitle is in SubRip, MicroDVD or any other supported text subtitles, you have to convert it to ASS before using this filter: ffmpeg -i subtitle.srt subtitle.ass Windows users will have to setup font paths to get libass to work.
Opened 9 years ago
Closed 8 years ago
Last modified 7 years ago
#862closeddefect (fixed)
I also extract the subtitle track to a text file with a.ass extension, like so: ffmpeg -i tt.mkv -scodec copy script.ass. Ffmpeg is smart enough to know that you can’t put video or audio into a.ass file so it drops those and we’re left with just the script. After that, I made my changes to the script and needed to mash it all back into. 3rd video stream, all audio streams, no subtitles. This example uses negative mapping to exclude the subtitles. Ffmpeg -i input -map 0:v:2 -map 0:a -map -0:s -c copy output Choosing streams from multiple inputs. All video from input 0, all audio from input 1: ffmpeg -i input0 -i input1 -map 0:v -map 1:a -c copy output.
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Component: | ffmpeg |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Attachments (4)
- SRT-in-MKV-support.patch (1.7 KB) - added by 9 years ago.
- Add timecodes to srt subtitles exported from matroska.
- ffmpeg.verbose.log (2.5 KB) - added by 9 years ago.
- Output of 'ffmpeg -loglevel verbose -scodec srt -i source.mkv -y target.srt'
- target.srt (192 bytes) - added by 9 years ago.
- Expected output(subtitles with timecodes).
- source.mkv (266.1 KB) - added by 9 years ago.
- Sample source file. Contains video audio and srt subtitle track.
Download all attachments as: .zip
Change History (11)
by , 9 years ago
comment:1 by , 9 years ago
by , 9 years ago
by , 9 years ago
by , 9 years ago
comment:2 by , 9 years ago
follow-ups: 4 5comment:3 by , 9 years ago
Component: | avformat → FFmpeg |
---|---|
Keywords: | text subtitles added; srt matroska mkv removed |
Reproduced by developer: | set |
Status: | new → open |