View Source

{pop-away:metadata | comments | children | labels}

In this section you will find specific solutions for specific needs.

# [Epiphan VGA2USB Module Installation|#vga2usb]
# [Hauppauge Cards Configuration|#hauppauge]
# [UDEV rules|#udev]
# [Galicaster Autostart|#autostart]

{anchor:vga2usb}

h4. Epiphan VGA2USB Module Installation

To download the driver see [http://www.epiphan.com/downloads/linux/]




For example, for a Ubuntu 10.10 you should download this [driver|http://www.epiphan.com/downloads/linux/vga2usb-3.26.0.15-ubuntu-2.6.35-28-generic_x86_64.tbz].

You should choose the driver according with some characteristics of your computer and operative system. Run the following comands on a shell to know some of them:

{code:none}
Kernel release: uname -r
Machine: uname -m
{code}

You can follow the instructions in the README file to complete the driver installation.

Run the following commands on a shell (*requires being root* \- _sudo won't work_) to use the driver like a {{modprobe}}.

{code:none} 
install -m 0644 vga2usb.ko /lib/modules/$(uname -r)/kernel/drivers/video/
echo options vga2usb v4l_num_buffers=2 v4l_err_on_nosignal=0 > /etc/modprobe.d/vga2usb.conf
echo softdep vga2usb pre: videodev usbvideo post: >> /etc/modprobe.d/vga2usb.conf
depmod -a
{code}

If you dont' have the file _vga2usb.ko_ run _make_ and repeat the commands.

Restart the computer to load the driver.

{anchor:hauppauge}

h4. Hauppauge Cards Configuration

The Hauppauge cards can be easily configured using the utility "v4l2-ctl" in the package "v4l-utils".

h6. Finding the right virtual device

Most Hauppauge cards create several virtual devices (i.e. several entries under the /dev directory).
Even though they correspond to the same physical device, each one has a different function (typically one for raw video and other for MPEG-encoded video), so you must make sure which is the right virtual device before proceeding. You can do this with the following command:

{code:none} 
$ udevadm info --attribute-walk --name /dev/<device_file>
{code}
The first paragraph usually contains an attribute labeled "ATTR\{name\}" indicating the device function, e.g. "ivtv0 encoder MPG". Use it to know which specific device you want to connect to, or configure.

h6. Setting the video standard

You can get the card's current video standard with

{code:none} 
$ v4l2-ctl -S -d /dev/<device_file>
{code}&nbsp;
If you want to change it (e.g. you get NTSC but you want PAL), you can get a list of the supported video standards with:

{code:none} 
$ v4l2-ctl --list-standards -d /dev/<device_file>
{code}

Find your preferred standard in the list and remember its index number. Then set the card to using that standard with:

{code:none} 
$ v4l2-ctl -s <index> -d /dev/<device_file>
{code}

h6. Setting the input type

Most Hauppauge cards have composite video and supervideo inputs, but they can only fed from one of them at a time. To see the active input use:

{code:none} 
$ v4l2-ctl -I -d /dev/<device_file>
{code}

You can get a list of available inputs with:

{code:none} 
$ v4l2-ctl --list-inputs -d /dev/<device_file>
{code}

To set one of those inputs as active, you need the index number of the input (provided by the previous command):

{code:none} 
$ v4l2-ctl -i <index> -d /dev/<device_file>
{code}

Note: Sometimes you may get several inputs for the same connector (e.g. "Composite1", "Composite2" and "Composite3"), but just one of them is fully operational. You have to guess the right one by trial and error.


h6. Additional tweaking

You may apply additional settings to your card with the v4l2-ctl tool. Just type "v4l2-ctl" in your shell and you will get a comprehensive list of available commands.


h6. Making settings permanent

The settings applied with this tool will disappear between reboots. You can, however, write a script file with the appropriate commands and set it to run when the system starts.


{anchor:udev}

h4. UDEV rules


Create the file {{/etc/udev/rules.d/galicaster.rules}} where the udev rules to be applied to the devices will be added.

These are some configuration examples:

{code:none} 
KERNEL=="video[0-9]*", ATTR{name}=="Epiphan VGA2USB #V2U19350", GROUP="video", SYMLINK+="screen"
KERNEL=="video[0-9]*", ATTR{name}=="ivtv0 encoder MPG", GROUP="video", SYMLINK+="camera"
KERNEL=="video[0-9]*", ATTR{name}=="UVC Camera (046d:0821)", GROUP="video", SYMLINK+="webcam"
KERNEL=="video[0-9]*", ATTR{name}=="ivtv0 encoder MPG", GROUP="video", SYMLINK+="haucamera"
KERNEL=="video[0-9]*", ATTR{name}=="ivtv0 encoder YUV", GROUP="video", SYMLINK+="hauprevideo"
KERNEL=="video[0-9]*", ATTR{name}=="ivtv0 encoder PCM", GROUP="audio", SYMLINK+="haupreaudio"
{code}

Use the following command to find out the value of {{ATTR\{name\}}}:

{code:none} 
$ udevadm info --attribute-walk --name=${device}
{code}

substituting {{"$\{device\}"}} for the device's mount point (e.g. {{/dev/video0}})


{anchor:autostart}

h4. Galicster Autostart

Once installed, add the file galicaster.desktop to the folder {{\~/.config/autostart/}}

{code:none} 
[Desktop Entry]
Name=Galicaster Class
Version=1.0
Type=Application
Terminal=false
Exec=python "/home/galicaster/src/galicaster/classexec.py"
{code}

Warning: Some paths may need to be adjusted to the current environment.