Archive for the 'capture' Category

IEEE 1394/FireWire Video Capture

Thursday, January 4th, 2007

Most digital camcorders these days support IEEE 1394, AKA FireWire, for transferring video to the hard drive of your computer. Linux has good support for a variety of IEEE 1394 devices, and compatibility listings can be found at linux1394.org. We purchased the Pyro PCI 64 (API311) card from ADS Technologies, Inc. We chose that card mostly because it was available at the campus computer store and is supported under Linux.

There are capture facilities built into cinelerra and kino. At first blush, when configured for IEEE 1394 capture, cinelerra locks and spews errors when I hit record. More digging will be required to unravel the mysteries of cinelerra’s capture capabilities. Kino works great without any configuration and allows you to monitor and control your DV deck via the FireWire.
However, the dvgrab utility (available on the kino website) is perfect for my own purposes. Mostly, I’m working with capturing whole tapes. Final Cut’s logging and capturing facilities allow you to annotate time codes on each tape and later grab only the media that you need. With the speaker series, the subjects are giving an academic lecture and are covered by a single camera, so little editing is possible or required. As a result, we just capture one big file. To capture an hour of Mini-DV tape with dvgrab, the command is simple:

$ dvgrab –duration 1:00:00 /path/to/file

dvgrab automatically puts the DV deck into play mode, then stops it after one hour has elapsed. If you know your media is shorter, you can shorten the time. The appropriate filename extension will be automatically appended to the output filename you specify. You can change the output file type with the –format option (see the man page). dvgrab splits all its output so that the file size never exceeds 1GB, a limit that can be changed via the –size option. This splitting behavior causes dvgrab to number its output files so the above command would result in a new file named “file001.avi”.

Kino is quite happy to work with the video that dvgrab produces by default. When I imported the same file into cinelerra, it would not initially play back in real time. After some poking, I found that this was a reaction to degraded performance, not a functional problem with the video format. My current test machine is relatively slow, with only a half gigabyte of RAM and a small display. The default cinelerra preferences use a processor intensive scaling algorithm, and when I changed to the cheapest scaling algorithm I could get frame rates around 24 FPS; still lower than the 29.97 FPS frame rate of the video. To make this change, select ‘Preferences…’ from the Settings menu in the timeline window. Select Playback from the drop-down list in the upper left of the preferences window. Under the Video Out section, set the ‘Scaling equation’ option to ‘Nearest neighbor enlarge and reduce’.