Skip to content

Instantly share code, notes, and snippets.

@stupidpupil
Created December 22, 2018 11:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stupidpupil/7a9a008bece28a8a13b9b25d93bd5498 to your computer and use it in GitHub Desktop.
Save stupidpupil/7a9a008bece28a8a13b9b25d93bd5498 to your computer and use it in GitHub Desktop.
Recolouring a film using ffmpeg and magick
ffmpeg -i original.mp4 "original_frames/$filename%04d.png"
for infile in original_frames/*.png; do
convert "$infile" -color-matrix '0.6 -0.2 0.1 -0.4 0.4 0.4 -0.4 0.5 0.4' -modulate 180% "new_frames/$(basename "$infile")"
done
ffmpeg -y -i new_frames/%04d.png -r 25 -pix_fmt yuv420p out.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment