Gary Sieling

Add exif data to frames extracted from videos

Create a file that downloads the video, extracts frames, and does the processing:

youtube-dl https://www.youtube.com/watch?v=GHrw2tgAACI
ffmpeg -i video.webm images/thumb%04d.jpg -hide_banner
docker run -v $(pwd)/:/images --rm garysieling/exiv2 /bin/bash "/images/exif.sh"

Then in the exif.sh file:

PATH=$PATH:/exiv2/build/bin/

FILES=/images/images/*
for f in $FILES
do
  exiv2 -ea- /images/image.jpg | exiv2 -ia- $f
done
Exit mobile version