A
A
artanets12016-05-14 14:51:26
Video processing
artanets1, 2016-05-14 14:51:26

How to overlay text on a video in ffmeg taken from metadata (author, title, etc)?

How to overlay text on video in ffmeg from metadata.

ffmpeg -i video.mkv -filter_complex "drawtext=fontfile=/usr/share/fonts/truetype/arial.ttf: text='%{pts \:flt}': x=100 : y=50 : box=1" -c:a copy out.mkv

I found this code for overlay, but I don’t know how the metadata of the video file is indicated, which must be substituted for
text='%{pts \:flt}'

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
artanets1, 2016-05-16
@artanets1

I will answer myself.
Take metadata from a file with the command
Apply to the file with the command

ffmpeg -i test.mp4 -filter_complex "drawtext=fontfile=/home/arial.ttf: textfile=test.txt: y=25: x=25: fontcolor=red" -c:a copy testout.mp4

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question