#tdc2034

#tdc2034 Today be on the lookout for your one tree!

Prerequisites, you need ffmpeg installed. I did that with Homebrew .

In Photos app. search from Tree, this works pretty well.

Export all the photos to a folder.

You need to rename all the photos to be sequential, 0001.jpg, 0002.jpg etc.

So open the terminal and cd to the folder of images. Write the following to a file, rename.sh and run with ./rename.sh

a=1
for i in *.jpg; do
  new=$(printf "%04d.jpg" "$a") #04 pad to length of 4
  mv -i -- "$i" "$new"
  let a=a+1
done

This give you a nice sequence of images. I made an extra image with the music credits too.


then:

ffmpeg -f image2 -i %04d.jpg -c:v libx264 -pix_fmt yuv420p trees-1.mp4

slow it down a bit

ffmpeg -i trees-1.mp4 -filter:v "setpts=4.0*PTS" trees-2.mp4

and add some music from an mp3 file in the same folder.

ffmpeg -i trees-2.mp4 -i Faster_Does_It.mp3 -map 0 -map 1 -codec copy -codec:a aac -strict experimental -b:a 192k -shortest tree-audio.mp4

Upload to YouTube:

5 minute job.

Leave a Reply