Troubleshooting firewire capture

If you experience Firewire problems, please follow these steps:

Which firewire stack is installed ?

GNU/Linux recent kernels may be compiled with an old or a new firewire stack. To understand which firewire stack is installed, query the list of loaded modules

lsmod | egrep 'firewire|1394'

This is the old firewire stack:

ohci1394   37040  0
ieee1394   306104  2 sbp2,ohci1394

This is the new firewire stack:

firewire_sbp2          15152  0
scsi_mod              163832  5 firewire_sbp2,sg,sr_mod,sd_mod,libata
firewire_ohci          23140  0
firewire_core          39492  2 firewire_sbp2,firewire_ohci
crc_itu_t               2288  1 firewire_core

Old firewire stack

Make sure to load modules at boot time:

sudo gedit /etc/modules

Fix udev permissions

# ieee1394 devices
KERNEL=="dv1394*",      NAME="dv1394/%n"
KERNEL=="video1394*", NAME="video1394/%n"

If you still cannot capture from firewire, there may be a bug in udev permission.

Locate the udev configuration file responsible of firewire access.

KERNEL=="dv1394*",    MODE=”0666″,      NAME="dv1394/%n"
KERNEL=="video1394*", MODE=”0666″, NAME="video1394/%n"


New firewire stack

Write a custom udev script and store it in /etc/udev/rules.d/z95_firewire.rules:

# /etc/udev/rules.d/z95_firewire.rules

# Set GROUP="video" for some IEEE 1394 device types, driven by the new firewire stack.
# We cannot use the GROUP directive because the significant device type attributes
# live in child devices. So change the group after the fact with chgrp.

# IIDC devices: industrial cameras and some webcams
KERNEL=="dv1394*|video1394*|raw1394*|fw[0-9]*",    GROUP="video"

# libraw1394 older than v2.0.1 and some special-purpose applications also need
# access to the local node(s).  Alas there is no simple way to tell local nodes apart
# from remote ones; here is a simple hack.

SUBSYSTEM=="firewire", ATTR{vendor_name}=="Linux Firewire", GROUP="video"
# Or if your application needs access to all nodes, simply use:

SUBSYSTEM=="firewire", GROUP="video"


Debug and test using dvgrab

Your username should be part of the video group:

sudo adduser username-foo video

Reboot your system for rules to apply. After reboot, run dvgrab in interactive mode:

dvgrab -i

Type h for help. 

You should be able to rewind and play your camcorder.

If this is the case, enter "q" for quit dvgrab. Kdenlive should now be able to acquire video.