Title: TV-Tuner Card
Subject: I had to setup my tv-tuner card (

Useful Links: http://www.robfisher.net/video/

Find my card specs:
   dmesg |grep Hauppauge
       bttv0: detected: Hauppauge WinTV [card=10], PCI subsystem ID is 0070:13eb
       bttv0: detected by eeprom: Hauppauge (bt848) [card=2]
       bttv0: Hauppauge eeprom: model=62471, tuner=Philips FM1236 (2), radio=yes
   lspci |grep bt848
       0000:00:0b.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 02)
       0000:00:0b.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 02)

Hauppauge WinTV card is supported by the 'bttv' driver:
   Edit /etc/modprobe.conf
       options bttv    pll=1 radio=0 card=0
       options tuner   type=0

Reboot and see if it loads
   lsmod |egrep 'bttv|tuner'
       tuner                  20004  0
       bttv                  147276  1
       video_buf              20356  1 bttv
       firmware_class          9600  1 bttv
       i2c_algo_bit            9352  1 bttv
       v4l2_common             6144  1 bttv
       btcx_risc               4744  1 bttv
       i2c_core               23312  4 tuner,tvaudio,bttv,i2c_algo_bit
       videodev                9344  2 bttv

Now test to see if /dev/video0 is accessable
   xawtv -hwscan

        This is xawtv-3.94, running on Linux/i686 (2.6.8-24.5-default)
        looking for available devices
        port 84-84                              [ -xvport 84 ]
            type : Xvideo, video overlay
            type : Xvideo, image scaler
            name : NeoMagic Video Engine
        
        /dev/video0: OK                         [ -device /dev/video0 ]
            type : v4l2
            name : BT878 video (Hauppauge (bt848))
            flags: overlay capture tuner

----------------------           
Hookup the S-Video from a camera to my Hauppauge WinTV card, 
Hookup the audio out to my 
and press play

Install axwtv, and streamer will be there.
  streamer -o quicktime.mov -f yuv2 -F stereo -r 12 -t 0:10
  streamer -i S-Video  -o quicktime1.mov -f yuv2 -F stereo -r 12 -t 0:10                 

This created a movie but I didn't hear any sound
  streamer -i S-Video -t 0:10 -o movie.mov -f jpeg -F mono16

  streamer -i S-Video -t 0:30 -s 352x240 -r 24 -o /data/movie.avi -f mjpeg -F stereo

This gives the best quality picutre so far, but still no audio
  streamer -i S-Video -c /dev/video0 -t 0:30 -s 320x240 -r 24 -o /data/movie.avi -f mjpeg -j 75 -n ntsc -F mono8 -C/dev/dsp -R 44100     
Someone sugests setting some audio options
  amixer set Master,0 100%,100% unmute
  amixer set Line,0 75%,75% mute captur
  amixer set Capture,0 100%,100% mute captur
  su
  alsactl store
  exit
  streamer -i S-Video -c /dev/video0 -t 0:30 -s 320x240 -r 24 -o /data/movie.avi -f mjpeg -j 75 -n ntsc -F mono8 -C/dev/dsp -R 44100 

This was good, but sound only comes from one speaker, and 10 minutes=360MB
  streamer -i svideo -c /dev/video0 -t 00:30:00 -s 320x240 -r 24 -o /data/movie.avi -f mjpeg -j 75 -n ntsc -F stereo -C /dev/dsp -R 44100     
----------------------           
Install a boat load of packages:
    avifile
    avifile-qt
    All the 1394 packages # for firewaire
    libdv
    All libdvd packages
    
Now check to see if we can stream:        
    cat /dev/video0 > test.mpg

Without a tuner, you can only grab Composite video or S-Video.

PVR: Purchase a composite video port from (Radio Shack), solder two wires
to the video port.

Transcode can deinterlace the mpeg.

PAL signal shows a B&W Picture.
NTSC signal shows Color Picutre.
------------------------------------
Setup Mplayer:
  Found agreat source for this stuff.
    Open the control center.
    Click YaST modules
    Click Software
    Click Change Installation Source
    Click Add
    Select http
    Put packman.iu-bremen.de in the site field
    Put suse/9.2 in the path field
  Install mplayer, mplayerplug-in, ImageMagic, python-twisted, python-imaging, kdegraphics3-imaging, python-gamelets, python-pygame, python-pygame-doc, python-devel, python, python-opengl, python-ogg, atitvout, camsource, libmovtar, libvcd, libvcd-devel, libxinel-*, pwlib-plugins-{avc,dc,v4l}, transcode, Video-DVDRip, dvid-devel, python-eye3D

------------------------------------
Setup FreeVo (requires mplayer install)
  install suse rpm:
    tvtime
    xine-devel, xine-extra, xine-lib, xinetd, xine-ui
    vdr-plugins
  Download mmpython:
    http://www.sf.net/projects/mmpython
    wget http://unc.dl.sourceforge.net/sourceforge/mmpython/mmpython-0.4.7.tar.gz
    tar -xzvpf mmpython-0.4.7.tar.gz
    cd mmpython-0.4.7
    python setup.py install
    cd ../
    rm -rf mmpython-0.4.7
    export PATH=/usr/bin:${PATH}

  wget http://voxel.dl.sourceforge.net/sourceforge/freevo/freevo-1.5.2.tar.gz   
  tar -zxvpf freevo-1.5.2.tar.gz        
  cd freevo-1.5.2/
  read INSTALL
  python setup.py install

This isn't installing so I'm                                                              gogion to moven
----------------------------------------
http://www.slothmud.org/~hayward/Linux_VCR.html
  Downloading avifile from http://avifile.sourceforge.net/
http://umn.dl.sourceforge.net/sourceforge/avifile/avifile-0.7-0.7.41.tar.gz

  wget http://voxel.dl.sourceforge.net/sourceforge/avifile/binaries-011002.tgz
  tar -zxvpf binaries-011002.tgz 
  cp win32/* /usr/lib/win32/
  rm -rf win32

  wget http://umn.dl.sourceforge.net/sourceforge/avifile/divx4linux-20020418.tgz
  tar -zxvpf divx4linux-20020418.tgz     
  cd divx4linux-20020418/
  ./install.sh
  rm -rf divx4linux-20020418

  wget http://voxel.dl.sourceforge.net/sourceforge/avifile/Win32_dmo.tgz
  tar -zxpvf Win32_dmo.tgz
  cp Win32_dmo/* /usr/lib/win32/
  rm -rf Win32

  tar -zxvpf avifile-0.7-0.7.41.tar.gz 
  cd avifile-0.7-0.7.41/
  ./configure
      Configuration for avifile RELEASE-0.7.41-041215-12:27-3.3.5
      Compiler C:       gcc  -O2 -mcpu=i686 -march=i686 -ffast-math -fomit-frame-pointer -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -pipe
      Compiler C++:     g++  -O2 -mcpu=i686 -march=i686 -ffast-math -fomit-frame-pointer -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -pipe
      Install path:     /usr/local
      Qt:               yes
      Sdl:              no  (*** no SDL => no video rendering! ***)
      Xft:              yes
      Oss audio:        yes
      Sun audio:        no
      Mga_vid:          no
      Plugins:
        ac3passthrough  yes  (with SBLive only)
        divx (dec/enc)  yes/yes (DivxNetworks divx4linux)
        xvid            no   (DivX4, XviD)
        xvid4           yes  (DivX4, XviD)
        ffmpeg          yes  (DivX ;-), OpenDivX, MJPEG, AC3)
        ffmpeg faad     no  (AAC) (runtime yes)
        os motion jpeg  yes  (MJPEG)
        win32           yes  (DivX, WM7/8/9, DV, MJPEG, Ati, Asus,...)
        mad             yes  (MPEG Layer I/II/III)
        vorbis          yes
        lame runtime    yes
   make failed:
      In file included from fcc_type.c:1:
      ../../include/utils.h:41: error: parse error before '{' token
      ../../include/utils.h:50: error: parse error before '{' token
      ../../include/utils.h:56: error: parse error before "uint16_t"
      ../../include/utils.h:61: error: parse error before '{' token
      ../../include/utils.h:70: error: parse error before '{' token
      ../../include/utils.h:78: error: parse error before "uint32_t"
      ../../include/utils.h:83: error: parse error before '{' token
      ../../include/utils.h:92: error: parse error before '{' token
      ../../include/utils.h:101: error: parse error before '{' token
      ../../include/utils.h:103: warning: type defaults to `int' in declaration of `b'
      ../../include/utils.h:103: error: `v' undeclared here (not in a function)
      ../../include/utils.h:103: warning: data definition has no type or storage class
      ../../include/utils.h:104: warning: type defaults to `int' in declaration of `b'
      ../../include/utils.h:104: error: conflicting types for `b'
      ../../include/utils.h:103: error: previous declaration of `b'
      ../../include/utils.h:104: error: `v' undeclared here (not in a function)
      ../../include/utils.h:104: warning: data definition has no type or storage class
      ../../include/utils.h:105: error: parse error before "return"
      ../../include/utils.h:108: error: parse error before '{' token
      ../../include/utils.h:117: error: parse error before '{' token
      ../../include/utils.h:119: warning: type defaults to `int' in declaration of `b'
      ../../include/utils.h:119: error: conflicting types for `b'
      ../../include/utils.h:104: error: previous declaration of `b'
      ../../include/utils.h:119: error: `v' undeclared here (not in a function)
      ../../include/utils.h:119: warning: data definition has no type or storage class
      ../../include/utils.h:120: warning: type defaults to `int' in declaration of `b'
      ../../include/utils.h:120: error: conflicting types for `b'
      ../../include/utils.h:119: error: previous declaration of `b'
      ../../include/utils.h:120: error: `v' undeclared here (not in a function)
      ../../include/utils.h:120: warning: data definition has no type or storage class
      ../../include/utils.h:121: warning: type defaults to `int' in declaration of `b'
      ../../include/utils.h:121: error: conflicting types for `b'
      ../../include/utils.h:120: error: previous declaration of `b'
      ../../include/utils.h:121: error: `v' undeclared here (not in a function)
      ../../include/utils.h:121: warning: data definition has no type or storage class
      ../../include/utils.h:122: warning: type defaults to `int' in declaration of `b'
      ../../include/utils.h:122: error: conflicting types for `b'
      ../../include/utils.h:121: error: previous declaration of `b'
      ../../include/utils.h:122: error: `v' undeclared here (not in a function)
      ../../include/utils.h:122: warning: data definition has no type or storage class
      ../../include/utils.h:123: error: parse error before "return"
      ../../include/utils.h:126: error: parse error before '{' token
      ../../include/utils.h:136: error: parse error before '{' token
      ../../include/utils.h:140: error: parse error before '{' token
      ../../include/utils.h:144: error: parse error before '{' token
      fcc_type.c:8: error: parse error before '{' token
      fcc_type.c:110: error: parse error before '{' token
      make[2]: *** [fcc_type.lo] Error 1
      make[2]: Leaving directory `/home/jstile/avifile-0.7-0.7.41/lib/common'
      make[1]: *** [all-recursive] Error 1
      make[1]: Leaving directory `/home/jstile/avifile-0.7-0.7.41/lib'
      make: *** [all-recursive] Error 1
      
Giving up on building my own build of avifile, just used suse rpm
----------------------
Install vcr          
  wget http://www.stack.nl/~brama/vcr/src/vcr-1.10.tar.gz
  ls
  tar -zxvpf vcr-1.10.tar.gz
  cd vcr-1.10/
  ./configure
  make
  make install
No errors seen
Create vcr program
## BEGIN ~/.vcrrc  ##
[global]
freqtab = us-cable
pixsize = 128 x 96
pixcols = 1
jpeg-quality = 75
mjpeg-quality = 75
toggle-mouse = 0
keypad-ntsc = no
osd = yes

# [Station name]
# capture = overlay | grabdisplay | on | off
# input = Television | Composite1 | S-Video | ...
# norm = PAL | NTSC | SECAM | ...
# channel = #
# fine = # (-128..+127)
# key = keysym | modifier+keysym
# color = #
# bright = #
# hue = #
# contrast = #

[defaults]
norm = NTSC
capture = over
input = Television

[CH0 0]
channel = 0
fine = 0

[CH1 1]
channel = 1
fine = 0

[CH2 2]
channel = 2
fine = 0
## END ~/.vcrrc  ##

## BEGIN recordshow6.sh ##
#!/bin/sh
DATE=`date +%m%d%y`
FILENAME=/multimedia/movies/show-6pm-$DATE.avi
v4lctl setstation 2
vcr -t 60m $FILENAME
## BEGIN recordshow6.sh ##

## BEGIN cron ##
00 06 * * 1-5 /path/to/recordshow6.sh 
## END cron ##