Loading sub-menu...

1.1 Cookbook

compared with
Current by developer
on ago 21, 2012 20:00.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (39)

View Page History
{pop-away:metadata | comments | children | labels}

In this section you will find specific solutions for specific needs.
Galicaster is dependant on the hardware installed on the units so we provide some guides to install and configure of the most commom cards used along this software. We also include some instructions to help you fix the access to those cards and the application on the operative system.

# [Epiphan VGA2USB Module Installation|#vga2usb]
# [Hauppauge Cards Configuration|#hauppauge]
# [UDEV rules|#udev]
# [Autostart|#autostart]
h4. Drivers installation and configuration:

{anchor:vga2usb}
* *[Epiphan Modules Installation|Epiphan cards]*
* *[Hauppauge Cards Configuration|Hauppauge cards]*
* *[Blackmagic Cards Configuration|Galicaster:Blackmagic cards]*
* *[NCast Cards Configuration|Galicaster:NCast cards]*
* *[Firewire Cards Configuration|Galicaster:Firewire cards]* (Not available yet)

h5. Epiphan VGA2USB Module Installation
h4. Instructions
* [UDEV rules|#udev]
* [Galicaster Autostart|#autostart]

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


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].
Create the file {{/etc/udev/rules.d/galicaster.rules}}, which will contain the udev rules that will be applied to the devices.

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:
Use the following command to find out the value of *{{ATTR\{name\}}}* for a specific device:

{code:none}
Kernel release: uname -r
Machine: uname -m
$ udevadm info --attribute-walk --name=${device}
{code}

You can follow the instructions in the README file to complete the driver installation.
substituting {{"$\{device\}"}} for the device's mount point, for example:

Run the following commands on a shell (*requires being root* \- _sudo won't work_) to use the driver like a {{modprobe}}.
{code:none}
{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
$ udevadm info --attribute-walk --name=/dev/video0
$ udevadm info --attribute-walk --name=/dev/video1 | grep name
{code}

(e.g. {{/dev/video0}})

{anchor:hauppauge}

h5. 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}

h5. 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}

Use the following command to find out the value of {{ATTR\{name\}}}:
For newer Epiphan drivers:
{code:none}
{code:none} 
$ udevadm info --attribute-walk --name=${device}
KERNEL=="video[0-9]*", ATTR{name}=="vga2usb", SYMLINK+="screen"
{code}

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


{anchor:autostart}

h5. Autostart
h4. Galicaster Launcher & Autostart

Add the file galicaster.desktop to the folder {{\~/.config/autostart/}}
If you want to make a launcher to run galicaster through the visual interface you may follow these instructions:

{code:none} 
[Desktop Entry]
Name=Galicaster Class
Version=1.0
Type=Application
Terminal=false
Exec=python "/home/galicaster/src/galicaster/classexec.py"
{code}
* Copy {{docs/autostart/galicaster.svg}} to {{/usr/share/icons}}.
* Copy {{docs/autostart/galicaster.destktop to {{usr/share/applications}}.
** Now you have galicaster on your Unity interface.
* Run Galicaster and Lock the launcher of the dock.
* Drag the GC icon to the desktop.
** If the GC logo doesn't show, right-button on the file, go to _Properties_, choose the tab _Permissions_ and check _Allow executing file as a program_.
** You can resize it by clicking right-button on the launcher, go to _Resize Icon..._ .

Warning: Some paths may need to be adjusted to the current environment.
To make galicaster start as the operative system loads do the following:
* Copy {{docs/autostart/galicaster.desktop}} to {{~/.config/autostart}}.