个人工具

“UbuntuHelp:Firewire”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(New page: {{From|https://help.ubuntu.com/community/Firewire}} {{Languages|php5}} || Previous: UbuntuHelp:Video || Up: UserDocumentation || I suggest this page be merged with HowToCaptureDigital...)
 
 
(未显示2个用户的13个中间版本)
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/Firewire}}
 
{{From|https://help.ubuntu.com/community/Firewire}}
{{Languages|php5}}
+
{{Languages|UbuntuHelp:Firewire}}
|| Previous: [[UbuntuHelp:Video]] || Up: UserDocumentation ||
+
'''There are three entries for '[[UbuntuHelp:FireWire|FireWire]]' '''
 
+
<ol><li>'''[[UbuntuHelp:Firewire|https://help.ubuntu.com/community/Firewire]] deals with 1394 video devices'''
I suggest this page be merged with HowToCaptureDigitalVideo. - DuncanLithgow
+
</li><li>'''[[UbuntuHelp:UbuntuStudioPreparation|UbuntuStudioPreparation]] in the section Firewire (ieee1394 / raw1394) sound cards and cameras'''
 
+
</li><li>'''[[UbuntuHelp:FireWire|FireWire]] ([[UbuntuHelp:FireWire|FireWire]] Audio in Ubuntu Studio)'''</li></ol>
 
+
  
 +
<<Include(Tag/ContentCleanup)>>
 +
'''There are two entries for 'Firewire/Wire'
 +
The second entry is here [[UbuntuHelp:FireWire|https://help.ubuntu.com/community/FireWire]] and deals with 1394 audio devices.'''
 
== Capturing video over Firewire ==
 
== Capturing video over Firewire ==
 
+
=== Introduction ===
 +
This page explains how to capture a [http://en.wikipedia.org/wiki/Dv Digital Video (DV)] stream over [http://en.wikipedia.org/wiki/IEEE1394 IEEE1394 (Firewire)] hardware with the [http://en.wikipedia.org/wiki/Kino_(software) Kino Video Editor].
 
=== Disclaimer ===
 
=== Disclaimer ===
 
+
This section on using IEEE1394 is not written by a hardware expert. It probably contains mistakes. If you know something is wrong or missing please help improve this page for the next person by correcting it. [[UbuntuHelp:DuncanLithgow|DuncanLithgow]]
This is being written as I try to understand the issues myself, there are probably some mistakes so I suggest you do your own research. If you know something is wrong or missing please help improve this page for the next person by correcting it. DuncanLithgow
+
=== Requirements ===
 
+
==== Hardware ====
=== Hardware ===
+
(The notes below were checked as valid on Ubuntu 9.10 Karmic.)
 
+
Many more recent motherboards have one or more Firewire ports built-in. In order that the ports will actually function, they sometimes have to be enabled in the BIOS setup - look for a BIOS menu similar to "Configure Devices". If your computer has no Firewire port you can buy a [http://en.wikipedia.org/wiki/PCI_Local_Bus PCI expansion card] or [http://en.wikipedia.org/wiki/PC_Card PC Card]. To check that the card is visible to the system, start a terminal and enter the '''lspci''' command; you should get output similar to:
Almost all modern digital camcorders have included an IEEE1394 port (commonly called Firewire) since 1995. Many computers intended for home or professional audio/video use have built-in Firewire ports. You can read more general notes about firewire in the Wikipedia entry: http://en.wikipedia.org/wiki/IEEE_1394 . Firewire is the common name for the standard known as IEEE1394.
+
<pre><nowiki>
 
+
joe@daedra:~$ lspci
You should note that if you plan on buying an expansion card (PCI) to support IEEE1394 you must be sure that your system BIOS supports it.
+
...
 
+
02:00.0 FireWire (IEEE 1394): Agere Systems FW322/323 (rev 70)
=== Software ===
+
02:02.0 FireWire (IEEE 1394): VIA Technologies, Inc. VT6306 Fire II IEEE 1394 OHCI Link Layer Controller (rev 46)
 
+
...
You'll need some software to capture from a Firewire port. This page looks at using version 0.8 or later of Kino, a popular home video editing suite. The current version can be found on the [http://www.kinodv.org/ Kino Website]. A stable version of Kino is available in the Ubuntu repositories . The Kino software package (more precisely dvgrab) uses a  device file supplied as part of Ubuntu (also called a node) to acts as an interface between Kino, Firewire and your camera. When you connect your camera and turn it on, the udev package should create one or more of the device files needed. If Ubuntu doesn't create a device node you will need to give it a kick with
+
</nowiki></pre>
 
+
(The above motherboard has both a built-in Firewire port and a plug-in PCI Firewire card, each based on a different brand of chipset.)
 +
The Linux kernel also has to recognize that the chipset used in the installed device is supported and load the relevant drivers - if all is well this should happen automatically at boot time. To check that this has happened, look for messages containing "firewire" or "1394" in the kernel log. For example, from the terminal command line:
 
<pre><nowiki>
 
<pre><nowiki>
sudo modprobe dv1394
+
joe@daedra:~$ grep 1394 /var/log/kern.log
</nowiki></code>
+
Mar 28 21:09:23 daedra kernel: [    3.472255] ohci1394 0000:02:00.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
 
+
Mar 28 21:09:23 daedra kernel: [    3.529223] ohci1394: fw-host0: OHCI-1394 1.0 (PCI): IRQ=[19]  MMIO=[d3100000-d31007ff]  Max Packet=[2048]  IR/IT contexts=[8/8]
Depending on which version of Ubuntu you are running the device node can be any one of:
+
Mar 28 21:09:23 daedra kernel: [    3.541342] ohci1394 0000:02:02.0: PCI INT A -> GSI 20 (level, low) -> IRQ 20
 
+
Mar 28 21:09:23 daedra kernel: [    3.596058] ohci1394: fw-host1: OHCI-1394 1.0 (PCI): IRQ=[20]  MMIO=[d3101000-d31017ff]  Max Packet=[2048]  IR/IT contexts=[4/8]
* /dev/dv1394-0 (misnamed, same functionality as /dev/dv1394/0 )
+
Mar 28 21:09:23 daedra kernel: [    4.808048] ieee1394: Host added: ID:BUS[0-00:1023]  GUID[00902700022b5854]
 +
Mar 28 21:09:23 daedra kernel: [    4.861202] ieee1394: Host added: ID:BUS[1-00:1023]  GUID[00110600000061ab]
 +
Mar 28 21:09:23 daedra kernel: [    9.113163] ieee1394: raw1394: /dev/raw1394 device initialized
 +
</nowiki></pre>
 +
Messages similar to the above show that the Firewire interface has initialized and is ready for use.
 +
==== Software ====
 +
Several Linux distributions, including Ubuntu, do not support video capture via ![[UbuntuHelp:FireWire|FireWire]] by default, so you will need some extra software.
 +
The dvgrab package uses a device file (also known as a node) to act as an interface between your camera and video editor (in this case Kino) over the Firewire port. When you connect your camera and turn it on, the ''udev'' package should create one or more of the device files/nodes needed. The device file will be one of the following:
 
* /dev/dv1394/0 (gives access to Firewire for video capture but not to the camera's controls)
 
* /dev/dv1394/0 (gives access to Firewire for video capture but not to the camera's controls)
* /dev/raw1394 (gives raw access to Firewire and allows access to your cameras controls, but poses a security risk)
+
* /dev/raw1394 (gives raw access to Firewire and allows access to your cameras controls, but possesses a security risk)
 
+
== Capturing DV over Firewire ==
This guide assumes you want to use dv1394/0 as this is the preferred method. A discussion of why 'dv1394/0' is prefered can be seen in Launchpad Bug#
+
Once Kino is ready to use capture should work as follows:
 
+
1.#1 Connect your DV camera via Firewire, turn the camera on and press 'play'.
Start Kino and open the 'Capture' tab. Kino will attempt to connect to your firewire port and detect any device there. Kino tries /dev/raw1394 by default, which will fail. You will see the error:
+
1.#1 [http://en.wikipedia.org/wiki/Udev udev] detects the change and creates the required device nodes for communication with your camera.
 
+
1.#1 Start Kino and switch to the 'Capture' tab. Kino sees the device nodes are created and that you have permission to use them.
|| WARNING: raw1394 kernel module not loaded or failure to read/write /dev/raw1394! ||
+
Once Kino has seen the camera you can rewind your camera to the beginning of the tape again.
 
+
=== Troubleshooting ===
... and that's the way it's meant to be. In [https://lists.ubuntu.com/archives/ubuntu-devel/2006-March/016593.html an email] from Scott James Remnant the reason is given as this:
+
In order to use a Firewire device successfully under Kino (or other software), all of the following have to happen:
 
+
<ol><li>A Firewire interface must be correctly installed and enabled,
"The problem is that the raw IEEE1394 device is literally just that; raw
+
</li><li>the kernel must recognize it as supported and load the appropriate modules to initialise it, and
access to the IEEE1394 stack!  This means that anyone with write access
+
</li><li>the initialization must succeed.
to that device can access any device connected to the Firewire port, and
+
</li><li>When a Firewire camcorder or camera is plugged in and powered up, the resulting hotplug event must be seen by the kernel and the device be identified as supported, and
because of the nature of Firewire, they may execute arbitrary code on
+
</li><li>the software must be running with the appropriate privileges to be granted the necessary device permissions.</li></ol>
the host system as root!"
+
 
+
As there is not one single solution to this I have made the list below. I hope you find a method that helps.
+
 
+
==== dv1394-0 ====
+
 
+
Once there's a device file for IEEE1384 as outlines above, in Kino go to 'Edit > Preferences' and select the 'IEEE 1394' tab. There are two values you can set. Any detected cameras should be listed under 'AV/C Device', but it may still work if your camera is not seen at first.
+
 
+
''Specific to Ubuntu 5.10 with kino 0.8:''
+
Under 'dv1394 Device' change the value to '/dev/dv1394/0'.
+
 
+
''Specific to Ubuntu 6.06 with Kino 0.9:''
+
Kino 0.9 can only be installed from source. Under 'dv1394 Device' change the value to '/dev/dv1394-0'.
+
 
+
''Specific to Ubuntu 6.10 and Kino 0.9:''
+
Under 'dv1394 Device' change the value to '/dev/dv1394/0'. (If you can't start Kino make sure you do not have kinoplus installed [https://launchpad.net/distros/ubuntu/+source/kinoplus/+bug/66537 bug 66537])
+
 
+
''Specific to Ubuntu 7.10 with Kino 0.9.2:''
+
This should work with the default settings, please file a [https://bugs.launchpad.net/ubuntu/+source/kino/+filebug bug in launchpad against Kino] if capturing fails.
+
 
+
Now go back to the 'Capture' tab and press Play on your camera just before clicking the 'Capture' button. The cameras controls are not accessable via dv1394 but if the DV tape is rewound before starting, that won't be a problem.
+
 
+
==== raw1396 ====
+
 
+
This section needs revision:
+
 
+
(Kino 0.9 installed from source will not access raw1394)
+
 
+
One way around the read/write permissions of raw1394 is to give the user read and write permission on the raw1394 device file - this is a security risk. (See [FilePermissions File Permissions] for help) Anyone with physical access to the firewire port (and enough cunning) can use it to control the computer. The currently prefered way to minimise this risk is to add raw1394 to a new group - 'firewire' and make the user a member with read/write permission. To do this select 'System > Adinistration > Users and Groups'. In the 'groups' tab select 'add group' and call the new group 'firewire'. Add your users group to the new 'firewire' group. Now open nautilus as root and navigate to the /dev/raw1394 device file with:
+
  
 +
For steps 1 - 3, see the above Hardware section notes.
 +
If the hotplug step succeeds, you should see messages ending in success in kern.log, similar to:
 +
<pre><nowiki>
 +
Mar 28 15:03:10 daedra kernel: [  942.303168] ieee1394: The root node is not cycle master capable; selecting a new root node and resetting...
 +
Mar 28 15:03:11 daedra kernel: [  943.231135] ieee1394: Error parsing configrom for node 1-00:1023
 +
Mar 28 15:03:12 daedra kernel: [  943.901133] ieee1394: Error parsing configrom for node 1-01:1023
 +
Mar 28 15:03:14 daedra kernel: [  946.232094] ieee1394: Node added: ID:BUS[1-00:1023]  GUID[00008500014c65d3]
 +
Mar 28 15:03:14 daedra kernel: [  946.232319] ieee1394: Node changed: 1-00:1023 -> 1-01:1023
 +
</nowiki></pre>
 +
If no messages appear on hotplug or camcorder switch-on, check the following points:
 +
* Is the camcorder set to VCR or playback mode?
 +
* Is the camcorder's Firewire port (might be labeled IEEE1394, iLink or DV) enabled? Check the camcorder manual carefully and look for a relevant Enable option in the camcorder's settings menu.
 +
* Is your Firewire lead in good order and firmly plugged in at both ends?
 +
* Is the firewire port damaged? This is unfortunately not hard to do, this writer has burned out ports both on his camcorder and two different hard disk drives by injudicious hotplugging. Managing to get the 6-way connector even partly inserted the wrong way round is likely to spell immediate death for the port on the other end, as 12V is applied to signal lines. It is highly advisable to attach the cable when the device and PC are both powered down, and power up the camcorder only when you are ready to start capturing.
 +
If Ubuntu doesn't automatically create a device node you can force the creation by typing the following in a Terminal:
 
<pre><nowiki>
 
<pre><nowiki>
gksudo nautilus
+
gksudo modprobe raw1394
</nowiki></code>
+
gksudo modprobe dv1394
 
+
</nowiki></pre>
In the context menu under 'permissions' change the file permissions to allow read and write access to members of the 'firewire' group (which includes your user). Now you should be able to capture.
+
However, these drivers should already be loaded automatically when the camcorder was plugged in/ switched on.  If they were not auto-loaded, and the above tips do not identify the problem, then there is a lower-level problem and it may be time to seek help at the [http://ieee1394.wiki.kernel.org/index.php/Contact linux1394-user mailing list].
 
+
For device/ software permissions issues, read on.
==== Method 3 ====
+
==== Before Ubuntu 7.10 (Gutsy) ====
 
+
/dev/dv1394/0 has been the preferred method in Ubuntu as discussed in [https://edge.launchpad.net/ubuntu/+source/kino/+bug/6290 Launchpad Bug# 6290].  Some versions of Kino from before Ubuntu 7.10 (Gutsy) may try /dev/raw1394 by default though, which will fail for a normal user. You will see the error:
Apparently the dv1394 device, and video1394, are set up to allow users in the video group to read and write to them. So try and add yourself to the video group.
+
{|border="1" cellspacing="0"
 
+
| WARNING: raw1394 kernel module not loaded or failure to read/write /dev/raw1394!
==== Method 4 ====
+
|}
 
+
This is not a bug, but a security measure which you can read about in an [https://lists.ubuntu.com/archives/ubuntu-devel/2006-March/016593.html email about firewire security from Scott James Remnant]. This email paints an incomplete picture though. The actual risks of user access to raw1394 are:
If the methods above haven't helped, try also running kino as root, that might get around a few things.
+
* It allows direct control of ![[UbuntuHelp:FireWire|FireWire]]-attached devices.  (However, in order to do something really dangerous like overwriting device firmware or reading/modifying data from a ![[UbuntuHelp:FireWire|FireWire]] storage device, the user would need non-trivial purpose-made software.)
 +
* It may allow read/write access to memory of other PCs which are plugged into the ![[UbuntuHelp:FireWire|FireWire]] bus together with this PC which runs raw1394.  Whether such access is possible and to which extent depends on the remote PC's operating system and hardware platform.
 +
* It may allow read/write access to memory of this PC if you have more than one ![[UbuntuHelp:FireWire|FireWire]] controller and plug them together to a single bus.  This depends on settings of the ohci1394 kernel driver and on the hardware platform of this PC.
 +
An easy way around this for a user who is also the administrator of the computer is to run Kino from the command line as root:
 +
<pre><nowiki>
 +
gksudo kino
 +
</nowiki></pre>
 +
However, running complex application software as root has its own dangers and should be avoided. Therefore, read further below for the steps necessary to allow normal users access to /dev/raw1394.
 +
Another note on ![[UbuntuHelp:FireWire|FireWire]] security:  If you are afraid that ''others'' access your computer by plugging something (another PC) into your PC's ![[UbuntuHelp:FireWire|FireWire]] port and running forensic tools, then you need to unload the ''ohci1394'' driver, at least while you leave your PC unsupervised.
 +
![[UbuntuHelp:FireWire|FireWire]] security will be addressed in future releases by means of new improved kernel drivers:  https://blueprints.launchpad.net/ubuntu/+spec/firewire-core
 +
==== Ubuntu 7.10 (Gutsy Gibbon) ====
 +
This version of Ubuntu and Kino only works for /dev/raw1394 - only available to root users.
 +
Connect and start your camera, start Kino as root and switch to the 'Capture' tab.
 +
==== Ubuntu 8.04 (Hardy Heron) ====
 +
For this release Kino has changed their setup so that use of /dev/dv1394/0 is not enabled by default. Instead /dev/raw1394 is prefered.
 +
Because of this change Kino has been compiled incorrectly for use in Ubuntu, and only works for /dev/raw1394 - only available to root users.
 +
A correctly compiled version is available here: [ftp://ftp.akl.lt/Linux/Baltix/Baltix-Ubuntu-packages/hardy/kino-video-editor/kino_1.3.0-2ubuntu0_i386.deb kino_1.3.0-2ubuntu0_i386.deb]. This version will not install on Ubuntu 8.10.
 +
==== Ubuntu 8.10 (Intrepid Ibix) ====
 +
This version of Ubuntu and Kino has been compiled incorrectly, and only works for /dev/raw1394 - only available to root users.
 +
Connect and start your camera, start Kino as root and switch to the 'Capture' tab.
 +
=== Other methods ===
 +
==== Method 1. 'raw1394' ====
 +
This method makes a new group called ''firewire'' with control of the raw1394 device file, and your user a member of that group.  The camcoder must be plugged in and turned on at boot time for this to work because udev will only create /dev/raw1394 if the camcoder is present and /dev/raw1394 must be created before bootmisc.sh is run.
 +
<ol><li>Open 'System > Administration > Users and Groups'. Add a new group and call it ''firewire''
 +
</li><li>Open the ''firewire'' group and add your user name to this group.
 +
</li><li>Open a terminal and type<pre><nowiki>
 +
sudo gedit /etc/init.d/bootmisc.sh
 +
</nowiki></pre>
 +
</li><li>At the end of the file type <pre><nowiki>
 +
chgrp firewire /dev/raw1394
 +
</nowiki></pre>
 +
</li><li>Reboot, or to apply changes now type directly in a terminal<pre><nowiki>
 +
sudo chgrp firewire /dev/raw1394
 +
</nowiki></pre>
 +
</li><li>Insure camcorder is connected and turned on before the system is booted.</li></ol>
  
 +
==== Method 2. 'Desktop Launcher' ====
 +
Create a Desktop launcher named "EnableCamcorderConnection". Set the launcher type to "Application In terminal" and the launcher command to "sudo chmod 666 /dev/raw1394".
 +
Execute the launcher after plugging in the camcorder.
 +
==== Method 3. 'udev rule' ====
 +
As the most straight-forward method, simply add the raw1394 specific udev rule which was left out by Ubuntu's udev maintainers. Type this in a terminal:
 +
<pre><nowiki>
 +
echo 'KERNEL=="raw1394", GROUP="video", MODE="0664"' > /tmp/raw1394.rules
 +
sudo cp /tmp/raw1394.rules /etc/udev/rules.d/
 +
rm /tmp/raw1394.rules
 +
</nowiki></pre>
 +
Then unload and reload raw1394,
 
<pre><nowiki>
 
<pre><nowiki>
sudo kino
+
modprobe -r raw1394 && modprobe raw1394
</nowiki></code>
+
</nowiki></pre>
 
+
and type in a terminal:
 +
<pre><nowiki>
 +
sudo /etc/init.d/udev restart
 +
</nowiki></pre>
 +
=== In Ubuntu 10.04 ===
 +
Paste this in your terminal:
 +
<pre><nowiki>
 +
echo 'KERNEL=="raw1394", GROUP="video", MODE="0664"' |
 +
sudo tee /etc/udev/rules.d/50-raw1394.rules
 +
&& sudo restart udev
 +
</nowiki></pre>
 +
If the tips in this guide do not work please [https://bugs.launchpad.net/ubuntu/+source/kino/+filebug file a bug in launchpad against Kino].
 
== See Also ==
 
== See Also ==
 
+
* [[UbuntuHelp:BootFromFirewireHardDisk|BootFromFirewireHardDisk]]
* BootFromFirewireHardDisk
+
* [[UbuntuHelp:EthernetOverFirewire|EthernetOverFirewire]]
* EthernetOverFirewire
+
Page janitor: [[UbuntuHelp:DuncanLithgow|DuncanLithgow]]
 
+
|| Previous: [[UbuntuHelp:Video]] || Up: UserDocumentation ||
+
 
----
 
----
CategoryHardware CategoryCleanup
+
[[category:CategoryHardware]]
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2010年5月19日 (三) 22:22的最新版本


There are three entries for 'FireWire'

  1. https://help.ubuntu.com/community/Firewire deals with 1394 video devices
  2. UbuntuStudioPreparation in the section Firewire (ieee1394 / raw1394) sound cards and cameras
  3. FireWire (FireWire Audio in Ubuntu Studio)

<<Include(Tag/ContentCleanup)>> There are two entries for 'Firewire/Wire' The second entry is here https://help.ubuntu.com/community/FireWire and deals with 1394 audio devices.

Capturing video over Firewire

Introduction

This page explains how to capture a Digital Video (DV) stream over IEEE1394 (Firewire) hardware with the Kino Video Editor.

Disclaimer

This section on using IEEE1394 is not written by a hardware expert. It probably contains mistakes. If you know something is wrong or missing please help improve this page for the next person by correcting it. DuncanLithgow

Requirements

Hardware

(The notes below were checked as valid on Ubuntu 9.10 Karmic.) Many more recent motherboards have one or more Firewire ports built-in. In order that the ports will actually function, they sometimes have to be enabled in the BIOS setup - look for a BIOS menu similar to "Configure Devices". If your computer has no Firewire port you can buy a PCI expansion card or PC Card. To check that the card is visible to the system, start a terminal and enter the lspci command; you should get output similar to:

joe@daedra:~$ lspci
...
02:00.0 FireWire (IEEE 1394): Agere Systems FW322/323 (rev 70)
02:02.0 FireWire (IEEE 1394): VIA Technologies, Inc. VT6306 Fire II IEEE 1394 OHCI Link Layer Controller (rev 46)
...

(The above motherboard has both a built-in Firewire port and a plug-in PCI Firewire card, each based on a different brand of chipset.) The Linux kernel also has to recognize that the chipset used in the installed device is supported and load the relevant drivers - if all is well this should happen automatically at boot time. To check that this has happened, look for messages containing "firewire" or "1394" in the kernel log. For example, from the terminal command line:

joe@daedra:~$ grep 1394 /var/log/kern.log
Mar 28 21:09:23 daedra kernel: [    3.472255] ohci1394 0000:02:00.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
Mar 28 21:09:23 daedra kernel: [    3.529223] ohci1394: fw-host0: OHCI-1394 1.0 (PCI): IRQ=[19]  MMIO=[d3100000-d31007ff]  Max Packet=[2048]  IR/IT contexts=[8/8]
Mar 28 21:09:23 daedra kernel: [    3.541342] ohci1394 0000:02:02.0: PCI INT A -> GSI 20 (level, low) -> IRQ 20
Mar 28 21:09:23 daedra kernel: [    3.596058] ohci1394: fw-host1: OHCI-1394 1.0 (PCI): IRQ=[20]  MMIO=[d3101000-d31017ff]  Max Packet=[2048]  IR/IT contexts=[4/8]
Mar 28 21:09:23 daedra kernel: [    4.808048] ieee1394: Host added: ID:BUS[0-00:1023]  GUID[00902700022b5854]
Mar 28 21:09:23 daedra kernel: [    4.861202] ieee1394: Host added: ID:BUS[1-00:1023]  GUID[00110600000061ab]
Mar 28 21:09:23 daedra kernel: [    9.113163] ieee1394: raw1394: /dev/raw1394 device initialized

Messages similar to the above show that the Firewire interface has initialized and is ready for use.

Software

Several Linux distributions, including Ubuntu, do not support video capture via !FireWire by default, so you will need some extra software. The dvgrab package uses a device file (also known as a node) to act as an interface between your camera and video editor (in this case Kino) over the Firewire port. When you connect your camera and turn it on, the udev package should create one or more of the device files/nodes needed. The device file will be one of the following:

  • /dev/dv1394/0 (gives access to Firewire for video capture but not to the camera's controls)
  • /dev/raw1394 (gives raw access to Firewire and allows access to your cameras controls, but possesses a security risk)

Capturing DV over Firewire

Once Kino is ready to use capture should work as follows: 1.#1 Connect your DV camera via Firewire, turn the camera on and press 'play'. 1.#1 udev detects the change and creates the required device nodes for communication with your camera. 1.#1 Start Kino and switch to the 'Capture' tab. Kino sees the device nodes are created and that you have permission to use them. Once Kino has seen the camera you can rewind your camera to the beginning of the tape again.

Troubleshooting

In order to use a Firewire device successfully under Kino (or other software), all of the following have to happen:

  1. A Firewire interface must be correctly installed and enabled,
  2. the kernel must recognize it as supported and load the appropriate modules to initialise it, and
  3. the initialization must succeed.
  4. When a Firewire camcorder or camera is plugged in and powered up, the resulting hotplug event must be seen by the kernel and the device be identified as supported, and
  5. the software must be running with the appropriate privileges to be granted the necessary device permissions.

For steps 1 - 3, see the above Hardware section notes. If the hotplug step succeeds, you should see messages ending in success in kern.log, similar to:

Mar 28 15:03:10 daedra kernel: [  942.303168] ieee1394: The root node is not cycle master capable; selecting a new root node and resetting...
Mar 28 15:03:11 daedra kernel: [  943.231135] ieee1394: Error parsing configrom for node 1-00:1023
Mar 28 15:03:12 daedra kernel: [  943.901133] ieee1394: Error parsing configrom for node 1-01:1023
Mar 28 15:03:14 daedra kernel: [  946.232094] ieee1394: Node added: ID:BUS[1-00:1023]  GUID[00008500014c65d3]
Mar 28 15:03:14 daedra kernel: [  946.232319] ieee1394: Node changed: 1-00:1023 -> 1-01:1023

If no messages appear on hotplug or camcorder switch-on, check the following points:

  • Is the camcorder set to VCR or playback mode?
  • Is the camcorder's Firewire port (might be labeled IEEE1394, iLink or DV) enabled? Check the camcorder manual carefully and look for a relevant Enable option in the camcorder's settings menu.
  • Is your Firewire lead in good order and firmly plugged in at both ends?
  • Is the firewire port damaged? This is unfortunately not hard to do, this writer has burned out ports both on his camcorder and two different hard disk drives by injudicious hotplugging. Managing to get the 6-way connector even partly inserted the wrong way round is likely to spell immediate death for the port on the other end, as 12V is applied to signal lines. It is highly advisable to attach the cable when the device and PC are both powered down, and power up the camcorder only when you are ready to start capturing.

If Ubuntu doesn't automatically create a device node you can force the creation by typing the following in a Terminal:

gksudo modprobe raw1394
gksudo modprobe dv1394

However, these drivers should already be loaded automatically when the camcorder was plugged in/ switched on. If they were not auto-loaded, and the above tips do not identify the problem, then there is a lower-level problem and it may be time to seek help at the linux1394-user mailing list. For device/ software permissions issues, read on.

Before Ubuntu 7.10 (Gutsy)

/dev/dv1394/0 has been the preferred method in Ubuntu as discussed in Launchpad Bug# 6290. Some versions of Kino from before Ubuntu 7.10 (Gutsy) may try /dev/raw1394 by default though, which will fail for a normal user. You will see the error:

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

This is not a bug, but a security measure which you can read about in an email about firewire security from Scott James Remnant. This email paints an incomplete picture though. The actual risks of user access to raw1394 are:

  • It allows direct control of !FireWire-attached devices. (However, in order to do something really dangerous like overwriting device firmware or reading/modifying data from a !FireWire storage device, the user would need non-trivial purpose-made software.)
  • It may allow read/write access to memory of other PCs which are plugged into the !FireWire bus together with this PC which runs raw1394. Whether such access is possible and to which extent depends on the remote PC's operating system and hardware platform.
  • It may allow read/write access to memory of this PC if you have more than one !FireWire controller and plug them together to a single bus. This depends on settings of the ohci1394 kernel driver and on the hardware platform of this PC.

An easy way around this for a user who is also the administrator of the computer is to run Kino from the command line as root:

gksudo kino

However, running complex application software as root has its own dangers and should be avoided. Therefore, read further below for the steps necessary to allow normal users access to /dev/raw1394. Another note on !FireWire security: If you are afraid that others access your computer by plugging something (another PC) into your PC's !FireWire port and running forensic tools, then you need to unload the ohci1394 driver, at least while you leave your PC unsupervised. !FireWire security will be addressed in future releases by means of new improved kernel drivers: https://blueprints.launchpad.net/ubuntu/+spec/firewire-core

Ubuntu 7.10 (Gutsy Gibbon)

This version of Ubuntu and Kino only works for /dev/raw1394 - only available to root users. Connect and start your camera, start Kino as root and switch to the 'Capture' tab.

Ubuntu 8.04 (Hardy Heron)

For this release Kino has changed their setup so that use of /dev/dv1394/0 is not enabled by default. Instead /dev/raw1394 is prefered. Because of this change Kino has been compiled incorrectly for use in Ubuntu, and only works for /dev/raw1394 - only available to root users. A correctly compiled version is available here: kino_1.3.0-2ubuntu0_i386.deb. This version will not install on Ubuntu 8.10.

Ubuntu 8.10 (Intrepid Ibix)

This version of Ubuntu and Kino has been compiled incorrectly, and only works for /dev/raw1394 - only available to root users. Connect and start your camera, start Kino as root and switch to the 'Capture' tab.

Other methods

Method 1. 'raw1394'

This method makes a new group called firewire with control of the raw1394 device file, and your user a member of that group. The camcoder must be plugged in and turned on at boot time for this to work because udev will only create /dev/raw1394 if the camcoder is present and /dev/raw1394 must be created before bootmisc.sh is run.

  1. Open 'System > Administration > Users and Groups'. Add a new group and call it firewire
  2. Open the firewire group and add your user name to this group.
  3. Open a terminal and type
    sudo gedit /etc/init.d/bootmisc.sh
    
  4. At the end of the file type
    chgrp firewire /dev/raw1394
    
  5. Reboot, or to apply changes now type directly in a terminal
    sudo chgrp firewire /dev/raw1394
    
  6. Insure camcorder is connected and turned on before the system is booted.

Method 2. 'Desktop Launcher'

Create a Desktop launcher named "EnableCamcorderConnection". Set the launcher type to "Application In terminal" and the launcher command to "sudo chmod 666 /dev/raw1394". Execute the launcher after plugging in the camcorder.

Method 3. 'udev rule'

As the most straight-forward method, simply add the raw1394 specific udev rule which was left out by Ubuntu's udev maintainers. Type this in a terminal:

echo 'KERNEL=="raw1394", GROUP="video", MODE="0664"' > /tmp/raw1394.rules
sudo cp /tmp/raw1394.rules /etc/udev/rules.d/
rm /tmp/raw1394.rules

Then unload and reload raw1394,

 modprobe -r raw1394 && modprobe raw1394

and type in a terminal:

sudo /etc/init.d/udev restart

In Ubuntu 10.04

Paste this in your terminal:

echo 'KERNEL=="raw1394", GROUP="video", MODE="0664"' |
sudo tee /etc/udev/rules.d/50-raw1394.rules
&& sudo restart udev

If the tips in this guide do not work please file a bug in launchpad against Kino.

See Also

Page janitor: DuncanLithgow