Analog TV

Create kernel that supports your tv card and mark the driver as module to pass arguments to the driver. Help you can find in: https://www.linuxtv.org/

No auto detected TV cards

TV cards are a combination of tuner and TV-decoder chip, there are various combinations but not all can be auto detected correctly. The drivers are based on the main chips and are written universally to work with all kinds on tuners. Check out:

/usr/src/linux/Documentation/video4linux

If your card isn't auto detected correctly, you have add the missing information to the driver when loaded.

modprobe<drivername> radio=<radio number> card=<card number> tuner=<tuner number>

Make sure that /etc/conf.d/rc contains

RC_coldplug="no" 

otherwise the driver is loaded before the command in /etc/modules.autoload.d/kernel-2.6 is launched. There is also a /hotplug/blacklist that should prevent loading modules, but it did not work. Check with dmesg | grep <driver name> that the parameters had been passed to the module.

Analog cards

Analogue TV cards are replaced by digital TV, analogue TV cards can also be used to digitize analog video signals of some historic devices as vcr, tv cam, ... .

Driver BTTV

Create a kernel with the bttv (BT848 Video For Linux) built as module, so you can pass command line parameters.

Card: Pinnacle PCTV

Check for the card and tuner number

/usr/src/linux/Documentation/video4linux/bttv

card=39 - Pinnacle PCTV Studio/Rave

tuner=0 - Temic PAL (4002 FH5)

Info about the device driver

modinfo /lib/modules/$(uname -r)/kernel/drivers/media/video/bttv.ko

Since the card is not auto detected load the driver manually:

modprobe bttv radio=0 card=39 tuner=0 gbuffers=32

If it is already loaded consider to unload it with rmmod bttv since the required arguments might not have passed. Not knowing the correct tuner makes the card unusable.

To have it started correctly put the lines

modules_3="${modules_3} bttv
module_bttv_args_3="radio=0 card=39 tuner=0 gbuffers=32"

in /etc/conf.d/modules.

Figure 12.6. PCTV

BT


Audio can be supported by connecting an internal audio cable from the vt card to the motherboard as shown in the above photo or by plug-in externally a 3.5mm Audio cable into the tv card an feed it to the external line in socket of the PC's audio card.

To checkout the card run as regular user mplayer tv:// -tvscan autostart and note a channel as channels=R6-ch1. Finally q brings you back.

To watch

mplayer tv:// \ -tv driver=v4l2:device=/dev/video0:width=768:height=576:channels=R6-ch1

To record a raw stream gets tricky when also audio has to be recorded. So two devices are required the tv card for the video and the sound card for the audio. To get the video without sound:

mencoder tv:// -tv \

driver=v4l2:device=/dev/video0:outfmt=yuy2:adevice=default:alsa:forceaudio \

-vc rawyuy2 -nosound -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=3200 -o output.avi

And to get the audio from the first alsa device hw.0,0 you need to enable the line input capture switch and set a good volume.

mencoder tv:// -tv \

driver=v4l2:device=/dev/video0:outfmt=yuy2:adevice=default:alsa:forceaudio:\ amode=0:\

adevice=hw.0,0 -vc rawyuy2 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=3200 -oac \

mp3lame -lameopts cbr:br=128:mode=0 -o output.avi

It might happen that audio and video get out of sync using this approach, to fix that there is avifix -i reits-parijs.avi -f 2487,100

Ctrl-c stops the well working mencoder, if it does not stop then something is wrong like the audio.

Driver SAA7134

Card: LifeView FlyVIDEO3000

TV Card EASYLITE identifies itself as LifeView FlyVIDEO3000

Its internals are not auto-detected. Therefore it has to be done manually.

According /usr/src/linux/Documentation/video4linux/CARDLIST.saa7134 it is:

card=2

The tuner on the card is TNF-9935-B/DFF that is not listed in /usr/src/linux/Documentation/video4linux/CARDLIST.tuner but

tuner= 69

is similar and works (61 works as well but no FM radio support). To test load the driver manually:

modprobe saa7134 card=2 tuner=69

If it is already loaded consider to unload it with rmmod saa7134 since the required arguments might not have passed. Not knowing the correct tuner makes the card unusable.

Then put this line

modules_3="${modules_3} saa7134
module_saa7134_args_3="card=2 tuner=69"

in /etc/conf.d/modules to have the right command parameters when the file is loaded.

However there is an other approach than /etc/conf.d/modules that loads kernel modules when they depend on others. It can happen that this loads the tv kernel module before /etc/conf.d/modules . To have also this approach using the correct parameters create a file /etc/modprobe.d/tv.conf with the line.

        options saa7134 card=2 tuner=69  

This card is also detected as additional alsa cards, so check if your soundsystem is still working. Maybe it is but misses the loudspeakers on this tv card so it will be quiet. So test alsa and configure it to have the soundcard as card 0 and this tv card as card 1.

To checkout the card run as regular user mplayer tv:// -tvscan autostart and note some channel as channels=R6-ch1,SR2-ch2. R6 is the channel ch1 is the name. Finally q brings you back.

To watch (k and h zap through the channels)

mplayer tv:// \

-tv driver=v4l2:device=/dev/video0:width=768:height=576:channels=R6-ch1,SR2-ch2

Figure 12.7. SAA3134

Fly


Probably no sound comes.

There are two options:

  1. Cable between audio out of the tv card and audio in of the soundcard. This occupies the socket audio in of the soundcard, and puts the work when digitizing sound to the soundcard and not the tv card. It is also expected that the sound quality will decrease.

    With the jumper cable two sound cards are involved:

    1. TV card sound output (sound level can be adjusted and can be muted)

    2. Line in of the sound card where the loudspeakers are (where the sound level can be adjusted and also can be muted). Additionally there is the capture sound level used for recording, that also can be muted.

    There are so many parameters to be adjusted, that you can be lucky if it works as you wanted! In case of troubles (You are lucky if you don't have) replace the jumper cable with a headphone to listen what comes out of the TV card and on the other end plug in via jumper cable a MP3 player that pumps sound into the sound card, so you can determine, if the problem is with the TV card or the sound card or both.

  2. Use the alsa sound on the tv card. If not already loaded modprobe saa7134-alsa. If you do that or it has been automatically done, you add a new sound card to your computer, watch out that the sequence of sound card is not get messed up. See Alsa. The sound gets to the tv cards audio chip, but does not find the way to the soundcards loudspeakers.

    A way out is the following command that reads from the TV card, writes it into a buffer and that reads it out of the buffer from your sound card. It basically replaces the jumper cable.

    arecord -D hw:1,0 -r 32000 -c 2 -f S16_LE | aplay -

To record video with sound from the tv card mencoder tv:// -tv \driver=v4l2:device=/dev/video0:outfmt=yuy2:adevice=default:alsa:forceaudio \

-vc rawyuy2 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=3200 -oac mp3lame \

-lameopts cbr:br=128:mode=0 -o output.avi

For the on board FM radio check that the module tuner is loaded and emerge fmtools that includes the fm and the fmscan application. Type fmscan and not how it finds station by printing their frequency and level to the screen. To listen type fm 99.8 to get the radio at 99.8 MHz with default volume. To have something nicer emerge gnomeradio.

There is also the program radio that has a user interface in the console. It comes with xawtv. Since it does not find the radio type radio -c /dev/radio0.

gnomeradio holds all its setting in ~/.gconf/apps

To record it is important to set the mixer input appropriate. In the mixer applications the red lights for line and capture should be on.

TV Applications

The classic TV application is xawtv (so emerge xawtv) that has some not obvious and ugly user interface behavior. Arrow up and down select channels, mouse click left and right when mouse cursor is over slide bar increases and decreases (e.g. brightness). Capture in the pop up menu lets you select how the video comes to the screen, probably not all works so try out. Select some tv stations and save it, the result will be in ~/.xawtv, so next time it keeps up on running.

xawtv -hwscan

xawtv -nodga -c /dev/video0

If you like to have something less ugly lookingemerge tvtime or put a home theater application as vdr or mythtv or use the standard tv application that comes with your desktop environment. Or use mplayer on the command line or with some front-end.

tvtime

tvtime is a nice looking tv application that does not depend on the desktop environment. Configuration is done via menu as well as scanning the channels.

Figure 12.8. Tvtime

TV time


AleVT

Alevt is a standalone video text (VT) application (or teletext).

Make sure the use flag zvbi is set, so also other applications will get video text support.

Check that daemons such as nxtvepg or even other TV programs are not running, since they can obviously occupy the video text decoder circuitry in the TV card and therefore aleVT can not access it and will not work. Unfortunately aleVT does not give an error message in this case.

Figure 12.9. Aletv

Aletv


A channel must be tuned in as when watching TV

alevt was written for analog cards, with

alevt -vbi /dev/vbi0

However the new versions work also for digital cards:

alevt -vbi /dev/dvb/adapter0/demux0


Linurs Servernest startpage