Firewire camera

From LinuxMCE
Revision as of 10:29, 11 May 2006 by Wikiadmin (Talk | contribs)

(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search
This page was written by Pluto and imported with their permission when LinuxMCE branched off in February, 2007. In general any information should apply to LinuxMCE. However, this page should be edited to reflect changes to LinuxMCE and remove old references to Pluto.
Current firewire camera addition procedure:

0. Go to the device tree 1. Select the computer that the camera is connected to in the device tree 2. Click "Create Child Device" to create a child device under the computer. 3. "Pick Device Template" 4.1. Select the Interfaces/Specialized (0000097) device category 5.1. Select the "Firewire Camera to V4L Pipe" device template and click "Add Device"

Repeat steps 1 through 3 4.2. Select the Interfaces/Surveillance Video Interfaces (0000111) 5.2. Select the "Motion Wrapper" and "Add Device"

At this point the "Motion Wrapper" is selected in the device tree. If it's not, select it.

6. "Create Child Device" under the "Motion Wrapper" 7. Pick Device Template "Generic Analog Camera" 8. Type "31" in the "0000001 Device" Device Data field. 9. Reboot the machine with the firewire camera for it to install the software. 10. Regen the Orbiter so it shows the "Generic Analog Camera" 11. Push the button. I know you want to :) At this point you should see pictures from the camera.

Where did that 31 come from... and what other fields have to be changed and how when adding a second camera.

Firewire cameras are not V4L-capable so a translation needs to take place. We do it by means of vloopback which prives V4L pipes and a program that reads from the firewire camera and feeds pictures into one end of a V4L pipe. We started device numbers from 30 in the case of vloopback.

Interesting DeviceData entries for the "Firewire Camera to V4L Pipe":

  • Device (0000001): the number X at the end of /dev/video1394-X where the camera provides its video data. First camera is 0, second camera is 1, and so on.
  • Port/Channel Number (0000012): The vloopback pipe associated with this camera. Usually you'd write the same number you wrote in the "Device" field above to reduce the chances of double allocation of the same pipe
  • Width (0000148) and Height (0000149): If your camera displays weird images, but which seem to have a base in the real picture, the capturing resolution may not match the camera and you have to specify the correct capture resolution here. This resolution is camera-dependent.

Interesting DeviceData entries for the "Generic Analog Camera":

  • Device (0000001): The output end of a vloopback pipe where V4L video data is to be taken from. Since pipes come in pairs (one input/feed end, one output end) and their numbers start with 30, the first camera reads its pictures from /dev/video31 (pipe 0, /dev/video30 is the pipe feeding end), the second from /dev/video33 (pipe 1), the third from /dev/video35 (pipe 2) and so on. (Formula: 30 + 2 * pipe_number + 1 [that is: 2 * pipe_number + 31], where pipe_number is the pipe number you typed in the associated "Firewire Camera to V4L Pipe"'s "Port/Channel Number (0000012)" field).

This procedure is not settled yet, and it's prone to change without notice, but it works like that for now.