[FFmpeg-user] Drawtext with PTS and creation time

Nathan Beach nathan at nathanbeach.com
Sat Dec 12 00:44:28 CET 2015


Hi Tanglor,

I am wanting to do this exact same thing - display the input file creation
time for a few seconds at the beginning of a mov file.  I have been messing
with it for several hours now and cannot get anything to show from
metadata.

I can find no documentation on what metadata keys are actually valid, or
any examples of a working drawtext metadata command.  At this point, I'm
guessing that maybe this is "frame" metadata, not "file" metadata, so
creation_time may just not be valid in this context.

I've had more luck using the textfile parameter, so you don't have to try
to escape characters.  For example:

./ffmpeg -i mov0.mov -vf
'drawtext=:fontfile=/Library/Fonts/Microsoft/Arial.ttf:fontcolor=white:fontsize=64:textfile=format.txt:x=main_w-(text_w+64):y=main_h-(text_h*2)'
-acodec copy -y output.mov

where format.txt contains simply:
%{metadata:creation_time}

This renders nothing in the output file, though.

I would really love some help here understanding what "metadata" actually
means in the context of the drawtext filter.

NBB


More information about the ffmpeg-user mailing list