Subtract from %M and %S with ffmpeg

Viewed 76

I have an ffmpeg command such as:

ffmpeg -i "before FINAL.mp4" -c:v libx264 -vf drawtext="expansion=strftime: fontfile=calibrib.ttf:fontsize=38:enable='between(t,5,10)+between(t,15,20):'basetime=000000:text='%M\:%S':fontcolor='#414a4c':borderw=2:bordercolor='#414a4c':rate=25:x=334:y=129" -c:a aac -f mp4 "before output.mp4"

I am trying to create a timer with ffmpeg.

But I have the text as:

'basetime=000000:text='%M\:%S'

I want to subtract 0 minutes from the minute, and 5 seconds from %S. How would I do that, I tried:

'basetime=000000:text='%M-0\:%S-5'

But it didn't work and instead added it to the text.

How would I go about doing this?

By the way, I am using python to render this ffmpeg command, if it matters.

0 Answers
Related