Monday, July 19, 2010

capture images from avi using ffmpeg

this script would use ffmpeg to split a video into series of images on the second provided.

#!/bin/bash

for i in `seq -w 1 1 100`
do
   ffmpeg -itsoffset -00:02:03.$i -i video.avi -vcodec png -vframes 1 -an -f rawvideo pix-$i.png
done