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

1 comment:

Video Snapshot said...

I implement it using microsoft directshow technology right now, but it's not stable, and depends on the decoder installed on the windows, maybe your solution is a good alternate choice, I'll deep into it, thanks.