This guide provides an overview of the steps involved. However, RivaTV is very much work in progress and this guide should probably be read alongside the testers information too. It first covers the building of a system, then installing and loading the stable rivatv source code, and then turns to the various RivaTV uses, namely for:
Grab your graphics card and take a good looooong look at it. It's fun! Cards are cool to watch!
There are lots of cool chips on it! And we need to know which chip is responsible for decoding the video signal that comes from your video source. Very common are the Philips SAA71xxx chips, but you might just as well have a Yamayokudobuka chip we never heard about. Maybe we already know your chip, in that case it's mentioned on the status report page. But if it says your card uses one chip, and you are actually seeing a completely different chip (for decoding video, DUH!), let us know.
So. Now you know your hardware. Remember it. Write it down. Tattoo it on your forehead. Or not. Whatever.
First, install a windows. We really don't care which one, or how you got it. Install necessary drivers and software so you are able to watch video in windows. This will be your reference to compare RivaTV to. Now that you are seeing this wonderful video on your screen, you understand why we want it in linux. Read on!
[This section is probably not necessary, and could conflict, with many modern 2.6.x kernel-based distributions that set up devices on-the-fly]
Install Linux if you hadn't already. You also need the following software:Compile them in, or build as
modules. Now would be a good time to load V4L and I2C, if you
built them as
modules:
# modprobe videodev
# modprobe i2c-core
# modprobe i2c-algo-bit
DO NOT build console framebuffers. They conflict with RivaTV for some reason.
Make sure you have a character device file for video in /dev:
# ls -la /dev/video*If you don't, you can create them using mknod:
lrwxrwxrwx 1 root root 11 Jul 22 2001 /dev/video -> /dev/video0
crw-rw-rw- 1 root root 81, 0 Jul 22 2001 /dev/video0
crw-rw-rw- 1 root root 81, 1 Jul 22 2001 /dev/video1
crw-rw-rw- 1 root root 81, 2 Jul 22 2001 /dev/video2
crw-rw-rw- 1 root root 81, 3 Jul 22 2001 /dev/video3
# mknod /dev/video0 c 81 0(Yes, this only creates /dev/video0. Be creative.)
Stable is probably a misnomer as RivaTV is very much work in progress, but this section deals with the released code while those that want to test the CVS code should look here.
Download RivaTV 0.8.5. We will assume you are building RivaTV in your /usr/src directory. Unpack RivaTV:
/usr/src$ tar xvzf rivatv*.tar.gzIn the newly created rivatv directory, you will find a README file, which contains all instructions you need to install rivatv. That file ALWAYS contains the proper installation procedure. This page is updated after the README and is provided for completeness and convenience.
/usr/src/rivatv$ ./configureIf this completes without any errors, RivaTV is installed. If there were errors, consult the FAQ for advice.
/usr/src/rivatv$ make
/usr/src/rivatv$ su
/usr/src/rivatv# make install
Mandriva is based on the 2.6.x kernel source code that includes the bttv code directly and comes with a copy of the tuner, audio** & **** modules already installed. RivaTV comes with an outdated copy of the bttv code, but it seems to be necessary to use these versions of the modules as the latest code has deprecated the way that RivaTV initialises the tuner module (plus it could not even access the gzipped modules that Mandriva distribute - I detected the further difficulties only after gunzipping the 3 modules). I've ended up installing two kernels on my system so that I could replace the tuner, audio** & **** modules from one setup and yet get my computer to work with my other (bttv) TV card when I'm not testing.
# modprobe rivatv
You should now have an additional video device available. If you didn't have any to begin with, you now only have /dev/video0. You can see what cards RivaTV detected by viewing the files named rivatv0, rivatv1, etc, in /proc/driver/. For example:
$ cat /proc/driver/rivatv?
nVidia Chip: GeForce2 GTS
Model: Asus V7700 TVR
Architecture: NV10 (NV15)
Access: Control [0xee000000-0xeeffffff]
FB [0xf0000000-0xf7ffffff]
Interrupts: 0 out of 678 (DMA: 0, Overlay: 0, Missing: 678)
Device: available
VideoDecoder: SAA7113H
Tuner: unavailable
AudioDecoder: unavailable
AudioProcessor: unavailable
There is also a file /proc/driver/rivatv, which is just a symbolic link to rivatv0. It is there for backwards compatibility.
Although RivaTV supports it, we never heard of someone actually having more than one video-in cards installed. If you do, please tell us!
If your card is listed as supported but is not loading automatically you can specify the number of your card with the card parameter of the module directly. For example, for a VisionTek Xtasy Everything Personal Cinema, you would load RivaTV like this:
# modprobe rivatv card=56
If you're interested: there are more RivaTV module options.
If you experience problems, please check the testers guide. If your card is not listed, check the FAQ and then report them.alias char-major-81-0 rivatvIf you need to set any options, add a line like this one:
options rivatv card=55After you have made the appropriate adjustments, run depmod:
# depmod -aeNow, when /dev/video0 is opened, rivatv is loaded automagically. Of course, if you want rivatv tied to e.g. /dev/video1, use char-major-81-1, and so on.
After successfully loading RivaTV, let's put it to good use. While only a few applications are discussed here, RivaTV should work with any V4L compliant program.
$ xawtv -noxv -nodgaAnother popular program is mplayer. It is more poised to play movie files, but it has Video4Linux capabilities as well. Because of this, it is a bit harder to get it going. We can't so into detail here, this is not a manual. But here is a command that should get you started:
$ mplayer -tv on:driver=v4l:norm=PAL:input=0:outfmt=YUY2:width=352:height=288The norm parameter takes PAL, NTSC or SECAM.
$ ffmpeg -vd /dev/video -r 15 -b 2048 -an -s 352x288 -t 10 video.mpgIt grabs video to the file "video.mpg", with a resolution of 352x288, 15 fps and a 2k bitrate, without sound. Thanks to Fredrik Svensson for this information.
# modprobe rivatv autoload=0