🎥

media processing in the cli

using ffmpeg, imagemagick and so on

convert RW2 format to jpg with imagemagick. while maintaining quality.

for f in *.RW2; do
  magick "$f" -quality 85 "GooglePhotosBackup/${f%.*}.jpg"
  exiftool -tagsFromFile "$f" -all:all "GooglePhotosBackup/${f%.*}.jpg" -overwrite_original
done

convert mp4 into good quality video.

for f in *.{MP4}; do
  ffmpeg -i "$f" -map_metadata 0 -vcodec libx265 -crf 22 -tag:v hvc1 -movflags +faststart "GooglePhotosBackup/${f%.*}.mp4"
done
a quote i like

The things that matter most can’t be copied: you can copy goals, you can’t copy discipline. You can copy ideas, you can’t copy execution. You can copy answers, you can’t copy understanding. You can copy thinking, you can’t copy thinking for yourself. ― Shane Parrish