个人工具

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

来自Ubuntu中文

跳转至: 导航, 搜索
第3行: 第3行:
 
== Capturing video over Firewire ==
 
== Capturing video over Firewire ==
 
=== Disclaimer ===
 
=== Disclaimer ===
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. [[UbuntuHelp:DuncanLithgow|DuncanLithgow]]
+
This section on using IEEE3945 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]]
 
=== Hardware ===
 
=== Hardware ===
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.
+
Firewire is the common name for the standard known as IEEE1394. Many digital camcorders and many computers have a built-in Firewire ports. You can read more general notes about Firewire and see what the ports and cables look like in the Wikipedia entry: http://en.wikipedia.org/wiki/IEEE_1394 .
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.
+
If your computer doesn't have a Firewire port you can add a PCI expansion card. You should note that if you plan on buying an expansion card you must be sure that your system BIOS will support it.
 
=== Software ===
 
=== Software ===
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
+
Most Linux distributions, including Ubuntu, do not support file transfer via Firewire by default so you'll need some extra software. This page looks at using the dvgrab application which is part of the Kino Video Editor. You can install a stable version of Kino in Ubuntu via 'Applications > Add/Remove...'. If none of the methods on this page work try installing the latest version from the [http://www.kinodv.org/ Kino Website].
 +
The dvgrab package uses a device file (also known as a node) in Ubuntu to acts as an interface from your camera to 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 needed. If Ubuntu doesn't create a device node you will need to give it a kick with
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo modprobe dv1394
 
sudo modprobe dv1394
第16行: 第17行:
 
* /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 poses a security risk)
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#
+
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 [https://edge.launchpad.net/ubuntu/+source/kino/+bug/6290 Launchpad Bug# 6290]
 
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:
 
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:
 
{|border="1" cellspacing="0"
 
{|border="1" cellspacing="0"
 
| WARNING: raw1394 kernel module not loaded or failure to read/write /dev/raw1394!  
 
| WARNING: raw1394 kernel module not loaded or failure to read/write /dev/raw1394!  
 
|}
 
|}
... 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:
+
Which is not a bug, it's a security feature which you can read about this [https://lists.ubuntu.com/archives/ubuntu-devel/2006-March/016593.html email from Scott James Remnant].
"The problem is that the raw IEEE1394 device is literally just that; raw
+
access to the IEEE1394 stack!  This means that anyone with write access
+
to that device can access any device connected to the Firewire port, and
+
because of the nature of Firewire, they may execute arbitrary code on
+
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.
+
 
If these tips do not work please [https://bugs.launchpad.net/ubuntu/+source/kino/+filebug file a bug in launchpad against Kino].
 
If these tips do not work please [https://bugs.launchpad.net/ubuntu/+source/kino/+filebug file a bug in launchpad against Kino].
==== Ubuntu 6.06 (Dapper Drake) ====
+
==== Ubuntu 6.06 LTS (Dapper Drake) ====
Kino 0.9 can only be installed from source. Under 'Edit > Preferences > Capture > dv1394 Device' change the value to '/dev/dv1394-0'.
+
Kino 0.9 can be installed from source in Ubuntu 6.06. Under 'Edit > Preferences > Capture > dv1394 Device' change the value to '/dev/dv1394-0'.
 
==== Ubuntu 6.10 (Edgy Eft) ====
 
==== Ubuntu 6.10 (Edgy Eft) ====
''Specific to Ubuntu 6.10 and Kino 0.9:''
+
Kino 0.9 can be installed from the main repository. Make sure you install kinoplus, you can search for kinoplus in 'System > Administration > Synaptic Package Manager'. Once Kino starts under 'Edit > Preferences > Capture > dv1394 Device' change the value to '/dev/dv1394/0'.
Kino 0.9 can be installed from the main repository. Under 'Edit > Preferences > Capture > 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])
+
==== Ubuntu 7.04 (Feisty Fawn) ====
+
 
==== Ubuntu 7.10 (Gutsy Gibbon) ====
 
==== Ubuntu 7.10 (Gutsy Gibbon) ====
 
To access your video camera you will need to run Kino (version 1.1.0) as root, type the following into a terminal:
 
To access your video camera you will need to run Kino (version 1.1.0) as root, type the following into a terminal:
第40行: 第33行:
 
=== Other methods ===
 
=== Other methods ===
 
==== Method 1. 'dv1394-0' ====
 
==== Method 1. '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.
+
If you have a file called '/dev/dv1394-0' in Kino go to 'Edit > Preferences' and select the 'IEEE 1394' tab. Any detected cameras should be listed under 'AV/C Device', but it may still work if your camera is not seen at first.
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.
+
Make sure the tape is ready where you want to start capture. On the 'Capture' tab press play on your camera then 'Capture' button.
 
==== Method 2. 'raw1396' ====
 
==== Method 2. 'raw1396' ====
This section needs revision:
+
If you have physical control of your computer and there is no risk of the Firewire port being used to access your machine then this method may be suitable for you. But it is still a security risk.
(Kino 0.9 installed from source will not access raw1394)
+
This method makes a new group called ''firewire'' with control of the raw1394 device file, and your user a member of that group.
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:
+
<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>Start Nautilus as root by opening a terminal and typing</li></ol>
 +
 
 
<pre><nowiki>
 
<pre><nowiki>
 
gksudo nautilus
 
gksudo nautilus
 
</nowiki></pre>
 
</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.
+
<ol><li>Find the file '/dev/raw1396' and from the right click context menu select 'Properties'
 +
</li><li>Under the 'Permissions' tab make ''firewire'' the group of this file.</li></ol>
 +
 
 
==== Method 3. 'video1394' ====
 
==== Method 3. 'video1394' ====
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.
+
Some versions of Ubuntu have a ''video1394'' group. Use the approach in method 2 to add yourself to the ''video1394'' group.
=== Method 4. 'as root'===
+
==== Method 4. 'as root' ====
 
If the methods above haven't helped, try also running kino as root, that might get around a few things.
 
If the methods above haven't helped, try also running kino as root, that might get around a few things.
 
<pre><nowiki>
 
<pre><nowiki>
sudo kino
+
gksudo kino
 
</nowiki></pre>
 
</nowiki></pre>
 
==== Method 5. 'GROUP=video' ====
 
==== Method 5. 'GROUP=video' ====
第63行: 第61行:
 
KERNEL==”raw1394″, GROUP=”video”
 
KERNEL==”raw1394″, GROUP=”video”
 
Then just add "ieee1394" (without quotation marks) to "/etc/modules"
 
Then just add "ieee1394" (without quotation marks) to "/etc/modules"
**** Be aware that you can have problems in watching dv videos with compiz enabled ****
 
 
== See Also ==
 
== See Also ==
 
* [[UbuntuHelp:BootFromFirewireHardDisk|BootFromFirewireHardDisk]]
 
* [[UbuntuHelp:BootFromFirewireHardDisk|BootFromFirewireHardDisk]]
 
* [[UbuntuHelp:EthernetOverFirewire|EthernetOverFirewire]]
 
* [[UbuntuHelp:EthernetOverFirewire|EthernetOverFirewire]]
 +
Page janitor: [[UbuntuHelp:DuncanLithgow|DuncanLithgow]]
 
----
 
----
 
[[category:CategoryHardware]] [[category:CategoryCleanup]]
 
[[category:CategoryHardware]] [[category:CategoryCleanup]]
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2008年4月23日 (三) 10:43的版本


Capturing video over Firewire

Disclaimer

This section on using IEEE3945 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

Hardware

Firewire is the common name for the standard known as IEEE1394. Many digital camcorders and many computers have a built-in Firewire ports. You can read more general notes about Firewire and see what the ports and cables look like in the Wikipedia entry: http://en.wikipedia.org/wiki/IEEE_1394 . If your computer doesn't have a Firewire port you can add a PCI expansion card. You should note that if you plan on buying an expansion card you must be sure that your system BIOS will support it.

Software

Most Linux distributions, including Ubuntu, do not support file transfer via Firewire by default so you'll need some extra software. This page looks at using the dvgrab application which is part of the Kino Video Editor. You can install a stable version of Kino in Ubuntu via 'Applications > Add/Remove...'. If none of the methods on this page work try installing the latest version from the Kino Website. The dvgrab package uses a device file (also known as a node) in Ubuntu to acts as an interface from your camera to 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 needed. If Ubuntu doesn't create a device node you will need to give it a kick with

sudo modprobe dv1394

Depending on which version of Ubuntu you are running the device node can be any one of:

  • /dev/dv1394-0 (misnamed, same functionality as /dev/dv1394/0 )
  • /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)

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# 6290 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:

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

Which is not a bug, it's a security feature which you can read about this email from Scott James Remnant. If these tips do not work please file a bug in launchpad against Kino.

Ubuntu 6.06 LTS (Dapper Drake)

Kino 0.9 can be installed from source in Ubuntu 6.06. Under 'Edit > Preferences > Capture > dv1394 Device' change the value to '/dev/dv1394-0'.

Ubuntu 6.10 (Edgy Eft)

Kino 0.9 can be installed from the main repository. Make sure you install kinoplus, you can search for kinoplus in 'System > Administration > Synaptic Package Manager'. Once Kino starts under 'Edit > Preferences > Capture > dv1394 Device' change the value to '/dev/dv1394/0'.

Ubuntu 7.10 (Gutsy Gibbon)

To access your video camera you will need to run Kino (version 1.1.0) as root, type the following into a terminal: gksudo kino

Other methods

Method 1. 'dv1394-0'

If you have a file called '/dev/dv1394-0' in Kino go to 'Edit > Preferences' and select the 'IEEE 1394' tab. Any detected cameras should be listed under 'AV/C Device', but it may still work if your camera is not seen at first. Make sure the tape is ready where you want to start capture. On the 'Capture' tab press play on your camera then 'Capture' button.

Method 2. 'raw1396'

If you have physical control of your computer and there is no risk of the Firewire port being used to access your machine then this method may be suitable for you. But it is still a security risk. This method makes a new group called firewire with control of the raw1394 device file, and your user a member of that group.

  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. Start Nautilus as root by opening a terminal and typing
gksudo nautilus
  1. Find the file '/dev/raw1396' and from the right click context menu select 'Properties'
  2. Under the 'Permissions' tab make firewire the group of this file.

Method 3. 'video1394'

Some versions of Ubuntu have a video1394 group. Use the approach in method 2 to add yourself to the video1394 group.

Method 4. 'as root'

If the methods above haven't helped, try also running kino as root, that might get around a few things.

gksudo kino

Method 5. 'GROUP=video'

In order to enable dv capturing with Feisty you just have to modify the file "/etc/udev/rules.d/40-permissions.rules" and change KERNEL==”raw1394″, GROUP=”disk” to KERNEL==”raw1394″, GROUP=”video” Then just add "ieee1394" (without quotation marks) to "/etc/modules"

See Also

Page janitor: DuncanLithgow