Using the enhanced vic svn code on Ubuntu
Before you start!
Binary packages are available in the UQVislab repository so that apt-get, Synaptic can be used for installation. These are usually quite up to date with the latest svn version, precluding the necessity to download and build from svn. To install a binary package,
- add the UQVislab repository to your
apt sources by running the following command in a shell:
sudo wget http://www.vislab.uq.edu.au/debuntu/sources.list.d/intrepid.list -O /etc/apt/sources.list.d/uqvislab.list
(replace intrepid with whatever Ubuntu version you're using - gutsy, hardy etc.)
- update your repository records by running the following command:
sudo apt-get update
- install vic by running the following command:
sudo apt-get install aghdvic
Building:sudo wget http://www.vislab.uq.edu.au/debuntu/sources.list.d/intrepid.list -O /etc/apt/sources.list.d/uqvislab.list
(replace intrepid with whatever Ubuntu version you're using - gutsy, hardy etc.)
- update your repository records by running the following command:
sudo apt-get update
- install vic by running the following command:
sudo apt-get install aghdvic
There are varying dependencies for the different Ubuntu releases. The easiest way to discover these is to use the listing in the debian/control file of the source package. Obtain the source package by adding the UQVislab repository to your list of package sources as described above. Now run:
sudo apt-get source aghdvic
This will download the source code including debian directory, inside which is the control file used to build the binary package. Ensure that all the build prerequisites listed there are installed before attempting to build any code. Now the svn code should be able to compile.
Access to the firewire device:
To capture from the firewire port, rw access to the /dev/raw1394 device node is required. Unfortunately the default Ubuntu feisty setttings only allow rw access to root (the device owner) and disk (the device group). This basically means that the ordinary user can't grab video from the device.
Some possible fixes
1. change permissions to allow all
users rw access
sudo chmod a+rw /dev/raw1394
2. add users (all or some, in this case fred) to the disk group
sudo adduser fred disk
3. change the device group to something more useful e.g video
sudo chgrp video /dev/raw1394
sudo chmod a+rw /dev/raw1394
2. add users (all or some, in this case fred) to the disk group
sudo adduser fred disk
3. change the device group to something more useful e.g video
sudo chgrp video /dev/raw1394
Any of these 3 methods will provide access to the firewire device. Methods 1 & 3 won't survive a reboot; the commands could be added to /etc/rc.local so they'd be executed automatically at each reboot.
All three methods have security implications. Method 3 appears to be the least worse. However, a more elegant way of setting the device group is to allow the udev mechanism to set it when the device node is first created. To do this, edit the /etc/udev/rules.d/40-permissions.rules file, by changing the line which reads:
"KERNEL"=="raw1394" GROUP="disk"
to
"KERNEL"=="raw1394" GROUP="video"
Then reboot the machine.
Kernel buffer limits:
Don't forget to increase the the maximum network memory buffer size. The easiest way to achieve this is to add the following lines to the /etc/sysctl.conf file:
net.core.rmem_max=17000000
net.core.wmem_max=17000000
net.core.wmem_max=17000000
The increased limits will take effect at the next reboot. To make them active immediately, run
sudo sysctl -p
