DV video capture in Ubuntu

by levien on zo 09 december 2007 // Posted in misc // under

Update (2014):

In Ubuntu, DV video-capture over Firewire has basically been broken for normal users for the last 7 years or so. I've been unable to get Kino to work on Ubuntu 10.04 and onward, so I switched to dvgrab. If you run it with root-privileges (sudo dvgrab), it will at least allow you to capture DV streams without much hassle.


As of Ubuntu 7.10 (a.k.a. Gutsy Gibbon), the Kino DV editor unfortunately defaults to settings that do not work out of the box. In order to allow you to control your camcorder from within Kino, it tries to access the raw IEE1394 (or Firewire/iLink/whatever you want to call it) device, /dev/raw1394. Normal users, including administrators, don't have access to raw devices unless the permissions of the device are modified or they are added to the appropriate group (in Gutsy this is the "disk" group, which also gives you raw disk access). So, if you want to capture DV video in Ubuntu Gutsy using Kino, you can do:

sudo adduser youruser disk

(of course replacing youruser by your username) Then you should log out, log back in, start Kino and it should work. This is somewhat of a hack, and should be used at your own risk. It allows your user access to all raw disk devices, so in theory you can delete your harddisk contents by writing data to the wrong device. A more secure solution is to create a separate group for the raw1394 device, add your user to this group, and set the GUID of the device to the new group. Something like this might work:

sudo addgroup firewire
sudo adduser youruser firewire
sudo chgrp firewire /dev/raw1394

Update (2009-05-10):

I've just installed Kino in Ubuntu 9.04 (Jaunty), and this problem still exists. Moreover, the raw1394 device is no longer owned by the "disk"-group. To get it working now you'll have to add a udev rule file, e.g. gksu gedit /etc/udev/rules.d/50-firewire.rules and then add:

# Firewire device permissions
# Temporary workaround for bug #6290
# See: https://bugs.launchpad.net/ubuntu/+source/kino/+bug/6290

KERNEL=="dv1394*",              SYMLINK+="dv1394/%n"    
KERNEL=="video1394*",           NAME="video1394/%n"  
KERNEL=="dv1394*|video1394*|raw1394*",  GROUP="video"

And then add your user to the "video" group. Note that this can be a security risk in some cases, but for private desktops it should usually be OK...

References

https://bugs.launchpad.net/ubuntu/+source/kino/+bug/6290
https://bugs.launchpad.net/ubuntu/+source/udev/+bug/20567