First blog entry, ever.. No, really.
Okay, some people thought I should. I finally did. You wanna know what drove me to it?
I needed a place to remember this neat little thing I figured out to record time-lapse footage from my DV camera using ffmpeg.
First, make a named pipe:
Then, run this command:
ffmpeg -y -f rawvideo -pix_fmt yuv411p -s 720×480 -i /tmp/dvpipe -f mp4 -r 29.97 -b 512k -g 30 -vc mpeg4 -an Desktop/test.mp4
You can change anything after “-i /tmp/dvpipe” to whatever codec/format you want your finished video in. In this case, MPEG4, 29.97/fps, 512kb/s, no audio. Running this command will sit patiently waiting for something to do.
So, next, you run this command in another window/shell:
ffmpeg -y -f dv -i /dev/dv1394/0 -f rawvideo -pix_fmt yuv411p -r 0.2 /tmp/dvpipe
This command captures DV video frames directly from the firewire port, and ouputs them into the /tmp/dvpipe named pipe, at the rate of 0.2 fps (or every 5 seconds).
You can do this with webcams as well, just modify the -f and -i parameters for you specific device.