time lapse with ffmpeg

create single images every 25 pic:
ffmpeg -i $1 -r 1 -f image2 out/%05d.png

assemble back all together:
ffmpeg -i out/%05d.png -sameq $2

and as bash script

#create a dir named out by hand, now to lazy
rm out/*
#every 250 /300 one image (10 sec approx)
ffmpeg -i "$1" -r 0.1 -f image2 out/%05d.png
#compile all together with 30fps
ffmpeg -i out/%05d.png -qscale 0 -r 30 "$1.mov"

#this are some useful commands; concate mov's together
echo "mencoder.exe -oac copy -ovc copy -idx -o outall.mov o2.mov o3.mov"

# ffmpeg -i wetter_dortmund.mov -vcodec libx264 -crf 23 -preset medium -profile:v high -level 41 -pix_fmt yuv420p -maxrate 3020k -b 3020k -bufsize 1835k -y fenter_oktay_dortmund.mkv

echo "ls *.mov | while read line;do echo ./timelapse.sh $line;done > st.sh"

Comments are closed.