Unfortunately this creates a video where the subtitle track is enabled by default. Here is the command I've worked out for ffmpeg:įfmpeg -i mytv_program_s00e00.ts -i mytv_program_s00e00.ssa -map 0:v -map 0:a:0 -map -0:a:1 -map -0:s -map 1:s -c:v libx264 -crf 22 -preset slow -x264-params "level=4.2:ref=5:direct=auto:8x8dct=0:subme=8:trellis=2:vbv-bufsize=62500:vbv-maxrate=50000:rc-lookahead=50" -c:a copy -c:s copy mytv_program_s00e00.mkv I make sure the 'forced' and 'burned in' checkboxes are not selected. I have to "Add External Subtitle Track" to pick up the. Since you probably do not want to re-encode the audio this example just stream. See the FFmpeg H.264 Encoding Guide for encoding suggestions. SSA file that was converted by ccextractor. This will 'burn' the subtitles into the video, but of course requires that the video be re-encoded: ffmpeg -i video.mkv -vf subtitlessubtitle.srt -codec:a copy output.mkv. I'm copying the first AC3 audio track (English 5.1) but not the second audio program (Spanish 2.0). When I encode the resulting video, I am converting the original video to x264 2300kbps (720p) CRF22 with a few x264-params to tweak quality. ffmpeg does not inherently understand these, so I use another tool called ccextractor to convert them to the SSA format (Substation Alpha). The MPEG transport stream has CEA-608 subtitles embedded in the video track. I have some recorded TV shows that were captured by my DVR in the MPEG TS format. This process works in Handbrake, but I can't figure out the disposition or map options to use in ffmpeg. In other words, someone who wants the subtitles must engage them manually in their preferred player.
FFMPEG ADD SUBTITLES TO VIDEO HOW TO
I have a question about how to use ffmpeg to ensure that a subtitle track is included but not enabled by default.