Skip to content

Instantly share code, notes, and snippets.

@danpaluska
Created August 3, 2011 16:23
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danpaluska/1123061 to your computer and use it in GitHub Desktop.
Save danpaluska/1123061 to your computer and use it in GitHub Desktop.
perform an IIR blur filter on a stack of frames from a movie using imagemagick and ffmpeg
#!/bin/bash
# ffmpeg -i movie.mov -r 1 fooframes/frames%05d.jpg
# extract 1 frame for every second of the movie...
mkdir IIRframes;
let "frames=4243/2"
echo $frames
cp WSPC0001.JPG IIRframes/new.jpg
cd IIRframes
cp new.jpg middle.jpg
cp new.jpg last.jpg
counter=100000
c2=100000
for f in ../WSPC*.JPG; do
let "counter+=1"
let "c2+=1"
composite -blend 15 $f last.jpg -matte blend.jpg
cp blend.jpg outframe${counter:1}.jpg
cp blend.jpg last.jpg
# montage -geometry 480x360 ${DA}/$A$foo.jpg ${DA}/$A${foo2}.jpg ${DA}/$A${foo3}.jpg ${DA}/$A${foo4}.jpg ${WDIR}/4panel${counter:1}.jpg
echo $counter
done
pwd
ffmpeg -i outframe%5d.jpg -qscale 6 IIRfarm.mp4
@AtomicNess123
Copy link

What does this do exactly? Is this good for aligning several photos to make a time lapse?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment