The drawtext filter supports editing the timeline (see the output of ffmpeg -filters ). This can evaluate expression and allows you to specify the time (s) when the filter should be enabled.
In this example, the filter will be from 12 seconds to 3 minutes:
ffmpeg -i input.mp4 -vf "drawtext=enable='between(t,12,3*60)':fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='Test Text'" -acodec copy output.mp4
In this example, the audio was stream copy .
If you do not have support for editing the timeline, you will need to get a newer version. You can simply download the Linux ffmpeg assembly or follow the walkthrough to compile ffmpeg .
Also see the FFmpeg and x264 Encoding Guide .
source share