Ubuntu Edgy and DV Cameras

I use Kino to capture DV from Alan’s DV camera when I’ve used it to record the talks given at our LUG. It worked pretty well under Dapper. However, when trying to capture DV using Ubuntu Edgy, Kino returned an error saying

WARNING: raw1394 kernel module not loaded or failure to read/write /dev/raw1394!

Actually the module was already loaded and the permissions on the device node were just fine. It had read-write access to the “video” group, and I was in that group. The diagnostic program testlibraw reported it could talk to the devices OK, so I began to suspect that Kino was actually at fault. After doing some poking around using strace it turns out that after accessing /dev/raw1394, there’s a different device node Kino is trying to access:

open("/dev/ieee1394/dv/host0/PAL/in", O_RDWR|O_LARGEFILE) = -1 ENOENT (No such file or directory)

The device node above didn’t exist on my system. Some googling turned up these French Ubuntu forums and related mkdir and mknod commands to rectify the problem:

mkdir -p /dev/ieee1394/dv/host0/NTSC
mknod -m 666 /dev/ieee1394/dv/host0/NTSC/in c 171 32
mknod -m 666 /dev/ieee1394/dv/host0/NTSC/out c 171 33
mkdir -p /dev/ieee1394/dv/host0/PAL
mknod -m 666 /dev/ieee1394/dv/host0/PAL/in c 171 34
mknod -m 666 /dev/ieee1394/dv/host0/PAL/out c 171 35

I only created the PAL related nodes and Kino then worked fine. As Ubuntu uses udev, these device nodes will not survive a reboot, so frequent users of such equipment might want to add these lines (or similar ones with slightly more secure permissions) to /etc/rc.local. The actual cause of the problem isn’t so clear, whether it’s a udev issue or upstart or what, I don’t know. Using a Dapper kernel didn’t resolve the issue though.

Be Sociable, Share!
    Pin It

    10 Responses to Ubuntu Edgy and DV Cameras

    1. Treenaks says:

      Or you could just modprobe dv1394.. then udev WILL create them automagically, in /dev/dv1394 (tell kino to use dv1394 as a driver)

    2. mrben says:

      Aha! I know about this 😉

      The problem is a dispute over access to the /dev/raw1394 devices, and whether or they require superuser access to them. You’ll find that the /dev/raw1394, while having root:video user:group, has permissions of 600, thus not allowing the group to do anything. Running Kino as root (sudo kino) will almost definitely work (unless you have another issue….)

      The problem is the wide variety of things that can be plugged into firewire, including both digital video cameras and external harddrives, which have vastly different security implications. At the moment, the root-only way is the current implementation. I found a good article about it online at one point, but cannot find it at the moment. If I do, I’ll pass it on.

    3. Tony says:

      Treenaks: I thought I’d checked dv1394 was loaded, but I could be wrong and will check again.

      mrben: /dev/raw1394 had permissions 660 and root:video ownership, as I’d configured udev to use these settings under Dapper. And yes, I double checked the permissions were correct. 🙂 As an experiment I did try running kino as root and experienced the same problem outlined above. Creating the device nodes mentioned, without touching permissions or ownerships on /dev/raw1394, did resolve the problem though. 🙂

    4. Craig says:

      Thanks so much for this tip. It helped me quite a bit.

      My firewire port is circa 2000 so I’ve had some real difficulties getting the Kino working appropriately. I created this bash script which I run after booting (requires root password) to reload all the modules, create and create the appropriate /dev nodes. Hope it helps someone:

      #Prompt user
      echo -n “Turn on camera and plug it in. Press enter when ready.”
      read dummyval

      #Create the IEEE1394 device nodes used by Kino
      mkdir -p /dev/ieee1394/dv/host0/NTSC
      mknod -m 666 /dev/ieee1394/dv/host0/NTSC/in c 171 32
      mknod -m 666 /dev/ieee1394/dv/host0/NTSC/out c 171 33
      mkdir -p /dev/ieee1394/dv/host0/PAL
      mknod -m 666 /dev/ieee1394/dv/host0/PAL/in c 171 34
      mknod -m 666 /dev/ieee1394/dv/host0/PAL/out c 171 35

      #Reload the IEEE1394 subsystem — assumes camera is on and plugged in
      sudo modprobe -r sbp2
      sudo modprobe -r raw1394
      sudo modprobe -r dv1394
      sudo modprobe -r ohci1394
      sudo modprobe -r ieee1394
      sudo modprobe ieee1394
      sleep 3s
      sudo modprobe ohci1394
      sleep 3s
      sudo modprobe raw1394
      sleep 3s
      sudo modprobe dv1394
      #Not strictly needed but load anyway.
      sudo modprobe sbp2

      Also the permission for raw1394 in /etc/udev/rules.d/40-permissions.rules needed a little love. 🙂

    5. Tony says:

      Just as a follow-up, configuring Kino to use /dev/dv1394/0 as the device worked, without having to create the ieee1394 device nodes. Thanks Treenaks!

    6. Jay says:

      I just hooked up my DV Camcorder and the only problem was that Kino was trying to use /dev/dv1394/0 which did not exist and when I changed that to /dev/dv1394-0 which existed everything seemed to work.

    7. Tony says:

      Having just done a fresh Edgy install, Kino defaulted to using /dev/dv1394/0 for a video device, but wouldn’t work without the group on /dev/raw1394 being changed (to a group of which I was a member). It’s annoying that this doesn’t Just Work and users shouldn’t have to edit udev config files to get stuff working. I hope the dispute is resolved for Feisty.

    8. regeya says:

      I found that using /dev/dv1394/0 as the device, adding raw1394 and video1394 (not sure the latter is necessary, but apparently it’s in the works and will be lower latency than raw1394) to /etc/modules, and adding myself to the disk group did the trick.

      less wankery than previous ubuntu releases, but still wankery…on the type of software and application that Joe Average expects to Just Work(TM). eh, it’s getting there, though. 🙂

    9. cranreuch says:

      I don’t have a 1394 port – only USB on my Thinkpad T60P laptop. Does any of the above apply to USB (‘cos I am getting the same raw1394 error as described)

    10. AKC says:

      I’m using Kino with Hardy Heron to copy video from my Samsung 371 Camcorder. I could overcome the ‘raw1394 kernel module not loaded’ issue by modifying the permissions of raw1394 as root each session. Otherwise by launching Kino using Sudo. The best solution however was to change the permission of raw1394 to video as per http://www.kinodv.org/article/view/155/1/13/. I then added modules raw1394, dv1394 and video 1394 to etc/modules to ensure they started automatically on boot up. I don’t use any other firewire devices (yet)