[FFmpeg-user] How to drawtext hh:mm:ss:ff timecode (on an old version ffmpeg)

Media Mouth communque at gmail.com
Thu Aug 17 04:31:01 EEST 2023


>> Thanks Paul,
>> 
>> Yes indeed you do need to escape the colons.  They seem to be the
>> delimiter for 'drawtext'
>> Not sure why it didn't show in my prior post, but here is another test,
>> confirmed with escapes before :, and using a more recent version of FFmpeg
>> (v6)
>> but still getting the same error: "Both text and text file provided.
>> Please provide only one"
>> 
>> Here's the command:
>> 
>> ffmpeg -y -i ~/Downloads/TcTest.mxf -vf
>> 'drawtext=fontsize=15:fontfile=/Library/Fonts/DroidSansMono-webfont.ttf:timecode=01\:45\:20.13:rate=23.976:fontsize=24:fontcolor=white:x=860:y=960'
>> ~/Downloads/TcTest-Burns.mxf
> On Aug 16, 2023, at 12:49, Paul B Mahol <onemda at gmail.com> wrote:
> 
> Also need to escape \
> 
> So before each : in timecode put four \

Thanks again Paul,

A few more tests and got it working
You were right about the double backslashes.

At that point the period before the frame is not necessary.  Frames are fine, so "timecode=01\\:45\\:20\\:13 did the trick."

The final code that worked:

ffmpeg -i ~/Downloads/TcTest.mxf \
-vf 'drawtext=fontsize=15:fontfile=/Library/Fonts/DroidSansMono-webfont.ttf:timecode=01\\:45\\:20\\:13:rate=23.976:fontsize=24:fontcolor=white:x=860:y=960' \
~/Downloads/TcTest-Burns.mxf

Thanks for your help!!!

C.C.





More information about the ffmpeg-user mailing list