Loading sub-menu...

Cookbook

Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current  |   View Page History

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

  1. Epiphan VGA2USB Module Installation
  2. Hauppauge Cards Configuration
  3. UDEV rules
  4. Galicaster Autostart

Hauppauge Cards Configuration

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

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:

 
$ udevadm info --attribute-walk --name /dev/<device_file>

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.

Setting the video standard

You can get the card's current video standard with

 
$ v4l2-ctl -S -d /dev/<device_file>

 
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:

 
$ v4l2-ctl --list-standards -d /dev/<device_file>

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

 
$ v4l2-ctl -s <index> -d /dev/<device_file>
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:

 
$ v4l2-ctl -I -d /dev/<device_file>

You can get a list of available inputs with:

 
$ v4l2-ctl --list-inputs -d /dev/<device_file>

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

 
$ v4l2-ctl -i <index> -d /dev/<device_file>

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.

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.

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.

Paused disabled

Despite the possibility of pausing a recording is available on Galicaster 1.1 and further, the Hauppauge plugin won't allow it.

UDEV rules

Create the file /etc/udev/rules.d/galicaster.rules, which will contain the udev rules that will be applied to the devices.

These are some configuration examples:

 
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"

Use the following command to find out the value of ATTR{name} for a specific device:

 
   $ udevadm info --attribute-walk --name=${device}

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

Galicaster Autostart

Once installed, create the file galicaster.desktop in the folder ~/.config/autostart/, with the following contents:

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

Warning: Some paths may need to be adjusted to your actual environment.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.