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:

mkfifo /tmp/dvpipe

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.



~ by kylemallory on January 28, 2008.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: