Debian Sid: HowTo: Firewire Access

I had a hell of a time last night trying to capture video in KDEnlive, the great video editor.

It's not KDEnlive's fault that the Firewire stack is such a mess on Linux. My Debian Sid system seems to be using a new Firewire (ieee1394) stack that isn't complete or something. With some work I was able to get the Firewire control and capture working for our Panasonic video camera.

First I plugged in the camera and at a command prompt, ran 'dmesg' to give the recent list of kernel activity:

lefty@bigboi:~$ dmesg

Oct 5 23:48:11 bigboi kernel: firewire_core: rediscovered device fw0

Oct 5 23:48:11 bigboi kernel: firewire_core: phy config: card 0, new root=ffc2, gap_count=7

Oct 5 23:48:11 bigboi kernel: firewire_core: giving up on config rom for node id ffc0

Oct 5 23:48:11 bigboi kernel: firewire_core: skipped bus generations, destroying all nodes

Oct 5 23:48:12 bigboi kernel: firewire_core: rediscovered device fw0

Oct 5 23:48:12 bigboi kernel: firewire_core: phy config: card 0, new root=ffc2, gap_count=7

Oct 5 23:48:12 bigboi kernel: firewire_core: giving up on config rom for node id ffc0

Oct 5 23:48:12 bigboi kernel: firewire_core: skipped bus generations, destroying all nodes

Oct 5 23:48:12 bigboi kernel: firewire_core: skipped bus generations, destroying all nodes

Oct 5 23:48:12 bigboi kernel: firewire_core: giving up on config rom for node id ffc2

Oct 5 23:48:12 bigboi kernel: firewire_core: giving up on config rom for node id ffc0

Oct 5 23:48:12 bigboi kernel: firewire_core: giving up on config rom for node id ffc0

While my computer recognized the camera, it didn't seem to like it much and I am not sure why exactly. To get Firewire working, first I unloaded the modules (drivers) and then reloaded them:

lefty@bigboi:~$ sudo lsmod |grep fire

firewire_sbp2 14920 0

firewire_net 13728 0

firewire_ohci 23232 0

firewire_core 47360 3 firewire_sbp2,firewire_net,firewire_ohci

crc_itu_t 1884 1 firewire_core

scsi_mod 148496 5 firewire_sbp2,sg,sr_mod,sd_mod,libata

lefty@bigboi:~$ modprobe -r firewire_net

lefty@bigboi:~$ modprobe -r firewire_sbp2

lefty@bigboi:~$ modprobe -r firewire_ohci

lefty@bigboi:~$ modprobe -r firewire-core

lefty@bigboi:~$ modprobe firewire-ohci

lefty@bigboi:~$ modprobe firewire-net

lefty@bigboi:~$ modprobe firewire-sbp2

lefty@bigboi:~$ modprobe firewire-core

Now 'dmesg' has better information:

lefty@bigboi:~$ dmesg

Oct 5 23:49:42 bigboi kernel: firewire_ohci 0000:02:03.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

Oct 5 23:49:42 bigboi kernel: firewire_ohci: Added fw-ohci device 0000:02:03.0, OHCI version 1.0

Oct 5 23:49:43 bigboi kernel: firewire_core: created device fw0: GUID 0011060000200a4a, S400

Oct 5 23:49:43 bigboi kernel: firewire_core: created device fw1: GUID 008045803173ad59, S100

I knew from the past that video capture in Kino and KDEnlive both use /dev/raw1394 rather than the device created above (/dev/fw0), and I also knew that I needed read access to that file /dev/whatever, so I addedmyself to the video group:

lefty@bigboi:~$ sudo adduser lefty video

The user `lefty' is already a member of `video'.

Had this been a new addition to that group, I would have had to log out and log back in for that change to take effect. Then, I changed the group for that file and gave group-read (and write, why not) permissions:

lefty@bigboi:~$ sudo chown :video /dev/fw0

lefty@bigboi:~$ sudo chmod g+rw /dev/fw0

Finally, I linked the new Firewire device to a location that I knew KDEnlive (which uses the dvgrab program, actually) would look for the video capture, /dev/raw1394 as I had stated:

lefty@bigboi:~$ sudo ln /dev/fw0 /dev/raw1394

Note that the above is *not* a symbolic link (not 'ln -s' ). This is a hard link which points to the exact device that I needed to access.

Now KDEnlive was able to capture fine, finally! Then I noticed that my battery was getting low from all of this work, so I had to unplug the camera to put in a new battery, causing all of the above work to fail. I had to redo it all but now that I knew what to do, it was much easier.

I hope this works for others and enjoy your video editing with KDEnlive!

=-=-=-=-=
Powered by Bilbo Blogger

0 comments:

Copyright © 2009 - System Admin Tools - is proudly powered by Blogger
Smashing Magazine - Design Disease - Blog and Web - Dilectio Blogger Template