firewire, dvgrab and carbon

Red Hat Enterprise Linux 6 is code-named “Carbon”, and probably the best RHEL for firewire devices yet. More below.

The only reason I’m sitting here writing about firewire is that the kids have recently developed an interest in shooting some video for YouTube with their friends — and the only way to get decent quality video off our 5+ year-old minicam is by capturing it over firewire.

This is the same Sony minicam with dv tape storage that was the subject of earlier firewire and dvgrab posts.

Basically everything I said those is now obsolete since Red Hat’s decision to leave firewire support turned on in its kernel and to provide the driver and utility libraries to exploit it. Red Hat’s new approach eliminates most of the bothersome stuff you needed to get things working. As a result the RHEL-clone, DOE supported Scientific Linux,workstations here at the house that have the requisite firewire interface cards can be used to capture video out of our minicam with very little additional effort.

In addition to the base ieee1394 driver libraries and utilities I’ve installed the command-line capture utility dvgrab, it’s cousin kino video editor and the avidemux video editor.

Here are my ieee1394 related drivers and libs:

libdc1394-2.1.2-3.4.el6.x86_64
libdc1394-devel-2.1.2-3.4.el6.x86_64
libraw1394-2.0.4-1.el6.x86_64
libavc1394-0.5.3-9.1.el6.x86_64
libiec61883-1.2.0-4.el6.x86_64

For the utilities:

dvgrab-3.4-3.1.el6.x86_64
kino-1.3.4-1.el6.rf.x86_64
avidemux-2.5.6-30.1.el6.x86_64.rpm
libiec61883-utils-1.2.0-4.el6.x86_64

Some additional utils and libs to support video viewing:

mjpegtools-1.9.0-1.el6.rf.x86_64
ffmpeg-0.6.5-1.el6.rf.x86_64
gstreamer-0.10.29-1.el6.x86_64
gstreamer-ffmpeg-0.10.11-1.el6.rf.x86_64
gstreamer-plugins-base-0.10.29-1.el6.x86_64
gstreamer-plugins-good-0.10.23-1.el6.x86_64
gstreamer-plugins-bad-0.10.19-3.el6.rf.x86_64
gstreamer-plugins-bad-free-0.10.19-2.el6.x86_64
gstreamer-plugins-ugly-0.10.16-2.el6.rf.x86_64
gstreamer-python-0.10.16-1.1.el6.x86_64
phonon-backend-gstreamer-4.6.2-24.el6.x86_64
PackageKit-gstreamer-plugin-0.5.8-20.el6.x86_64
gstreamer-tools-0.10.29-1.el6.x86_64

Two “gotchas” that haven’t changed over time: (1) /etc/udev/rules.d/kino.rules needs to be renamed so it won’t be loaded (e.g. to kino.rules.off); and (2) a udev rule needs to be creates so members of a non-root group can initiate captures. For example:

# 50-firewire rules to set group ownership of fw* devices
KERNEL=="fw*",GROUP="video",MODE="0664"

The block device for firewire will be /dev/fw0, /dev/fw1, etc. With my card /dev/fw1 was what dvgrab found the camera on.

For straightforward dumps of dv tape content onto disk, I use dvgrab with the following syntax:

[me@mine ~] dvgrab -i -f avi -a tape1_

This tells dvgrab to go into interactive mode, output files in avi format and autosplit using the given file name prefix.

The nice thing about working in interactive mode is that you should be able to control the camera somewhat: particulary to start capture/play and pause the tape.

Here’s the remote control “menu” provided by the online help:

q=quit, p=play, c=capture, Esc=stop, h=reverse, j=backward scan, k=pause        
l=forward scan, a=rewind, z=fast forward, 0-9=trickplay, =play/pause