Using 2 TV Capture Cards with Different Drivers
This page describes a freevo configuration to support many different and heterogeneous capture cards.
Example One
In the following, we will see an example for managing two cards,
- an IVTV card, that is an analog-to-MPEG capture card (Hauppauge WinTV PVR-150) and
- a DVB-T card (ASUS 3000M mini).
Recording is done by the generic recording plugin.
First of all, create the following scripts, that are capable of recording from the two devices. For DVB-T we use /home/freevo/bin/record-dvb , that contains
#!/bin/sh #arguments : # channel_name_or_number frequency_in_MHz seconds_to_record output_filename exec mencoder dvb://"$1" -quiet -ovc copy -oac copy -endpos "$3" -of mpeg -o "$4"
while /home/freevo/bin/record-ivtv contains
#!/bin/sh #arguments : # channel_name_or_number frequency_in_MHz seconds_to_record output_filename ivtv-tune -f "$2" exec mencoder /dev/video0 -quiet -ovc copy -oac copy -endpos "$3" -of mpeg -o "$4"
Do not forget to 'chmod a+x' the two scripts. Note that the two scripts accept the same parameter list (and ignore unneeded parameters).
Then set up the cards in /etc/freevo/local.conf, using different video groups, as in this example
TV_VIDEO_GROUPS = [
# Hauppage analog capture card
#lspci: Internext Compression Inc iTVC16 (CX23416) MPEG-2 Encoder (rev 01)
VideoGroup( # ivtv device, group 0
desc='Hauppauge WinTV PVR-150',
group_type='ivtv',
vdev='/dev/video0',
vvbi='/dev/vbi0',
adev=None,
input_type='Tuner 1',
input_num=0,
tuner_norm="PAL",
tuner_chanlist='italy',
record_group=0),
#ASUS 3000M mini, USB DVB-T gadget
VideoGroup( # dvb device, group 1
vdev='/dev/dvb/adapter0',
adev=None,
input_type='tuner',
input_num=0,
group_type = 'dvb',
record_group=1,
desc='DVB Viewer'),
]For the following step, you may need to apply a patch that adds a new field to VCR_CMD, called `group-type'. With this patch, it is easy to record from different sources.
Indeed, we set the VCR_CMD to call different scripts for different video cards, as follows
VCR_CMD = ('/home/freevo/bin/record-%(group-type)s ' +
' "%(channel)s" "%(frequencyMHz)s" "%(seconds)s" "%(filename)s"')Eventually we set up channels for different cards, as follows
TV_CHANNELS = [('www.rete4.com', 'rete 4', 'Rete 4', None, 1 ), #<- from DVB
('www.canale5.com', 'canale 5', '38', None, 0,), #<- from analog input
]As you see, in the 5th field we set the group (that is 0 for analog, 1 for DVB-T) while in the 3rd field we set either the channel name (for DVB) or the channel number (for analog).
Example Two
This example shows a DVB card being used for regular viewing and recording and an IVTV card being used for S-Video capture (to watch the old VHS videos)
The DVB card is card 0 and the IVTV card is card 1.
TV_VIDEO_GROUPS = [
VideoGroup(
vdev='/dev/dvb/adapter0',
adev=None,
input_type='tuner',
input_num=1,
group_type = 'dvb',
record_group=0,
desc='DVB Viewer'),
VideoGroup(
desc='S-Video Input',
group_type='ivtv',
vdev='/dev/video0',
adev=None,
input_type='S-Video 1',
input_num=2,
tuner_type='external',
record_group=1
)
]The last line on the TV channels will use card 1 (here the ivtv card) and has no TV guide entries.
TV_CHANNELS = [
( 'sbshd.free.au', 'SBS HD' , 'SBS HD', '', 0 ),
( 'abchd.free.au' ,'ABC HD' , 'ABC HDTV', None, 0 ),
( '', 'Video', 'None', 'None', '1'),
]