How to add filename to drawtext in video with ffmpeg?

Viewed 247

I want to display the file name in the video with drawtext . For example, I have a file list : C:\Users\ffmpeg code\1.mp4 C:\Users\ffmpeg code\2.mp4 ...

I want 1.mp4 add text "1" into video, 2.mp4 add text "2" into video, similar to other videos.

I tried : ffmpeg -i "{input}.*" -vf drawtext="fontfile=C\:/Windows/Fonts/arial.ttf:fontsize=20: fontcolor=red:x=10:y=10:text=?filename?" -preset ultrafast "{output}.mp4" .

It's hard to name each file into the drawtext section

0 Answers
Related