Is it possible to burn a filename watermark in the corner of a concatenated image slideshow and have it change for each image?

Solution 1:

The concat demuxer allows setting per-file metadata entry, but this has to be done manually.

You would change your script to

for i in *.jpg; do echo "file '$i'" >> files.txt; echo "file_packet_metadata url=$i" >> files.txt; done

ffmpeg -r 1/3 -f concat -safe 0 -i files.txt -vf
"drawtext=text='%{metadata\:url}': fontcolor=0x808080:
fontsize=14: x=w-tw- 10:y=h-th-10" -r 12 -c:v libx264 filename.mp4