[FFmpeg-user] Mpg

Sven C. Dack sven.c.dack at sky.com
Mon Sep 12 21:23:56 EEST 2016

On 12/09/16 18:05, Juan O Batista wrote:
> I have .mpeg with close caption I need output .mpeg file but I need too do drawtext in output file, but preserving close caption

$ ffmpeg -i video.mpeg -i subs1.srt -vf subtitles=subs2.srt -c:a copy -y out.mkv

This takes "video.mpeg" as video input and "subs1.srt" as subtitles input.

It then takes "subs2.srt" as input for the subtitles filter, which draws the 
subtitles directly into the video.

The audio is copied the way it is with "-c:a copy".

Your video will contain the subtitles from subs2.srt directly drawn into the 
video (these cannot be turned off when watching the video!). The video also 
contains "subs1.srt" as additional subtitle stream, which can be turned on and off.


More information about the ffmpeg-user mailing list