RivaTV - users guide


[ home - older news - status - screenshots - users guide - test CVS - developers - sourceforge - FAQ  - contact ]

[ TV/tuner - remote control - module options ]

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:

Building your system: hardware examination

To test rivatv you need the following hardware:

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.

Building your system: software setup

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 a new kernel, to suit your needs. You need to build these features for RivaTV to work:

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*
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
If you don't, you can create them using mknod:
# mknod /dev/video0 c 81 0
(Yes, this only creates /dev/video0. Be creative.)

Next, set up your X using the driver of your choice and start X, as a normal user.  Note: If you choose to use the TV-out feature from nVidia's binary driver, you may experience difficulty using RivaTV.

Installing the "stable" RivaTV code

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.gz

In 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.

Since the 0.8.2 release, RivaTV follows common build instructions.
	/usr/src/rivatv$ ./configure
/usr/src/rivatv$ make
/usr/src/rivatv$ su

/usr/src/rivatv# make install

If this completes without any errors, RivaTV is installed. If there were errors, consult the FAQ for advice.

Some notes from a Mandriva user - may be relevant for other users of a recent distribution

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. 

Loading RivaTV

Next step is to load RivaTV.  This is done by the following command:
	# 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.  

Audio modules

To be added.

Loading RivaTV on demand

If you don't want to load RivaTV manually every time you want to use it, here is what you should do.
There is a file /etc/modules.conf (modprobe.conf for some systems). In this file, add the following line:
	alias char-major-81-0 rivatv
If you need to set any options, add a line like this one:
	options rivatv card=55
After you have made the appropriate adjustments, run depmod:
	# depmod -ae
Now, 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.

Using RivaTV

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.

Watching a video stream

A program well known for its Video4Linux capabilities is XawTV. When XawTV starts, it autodetects most abilities and settings and shows you what is on your composite video-in connection. However, depending on the features enabled in both RivaTV and the driver you have chosen for X, it is possible you are not seeing what you were expecting. In such an event, try starting xawtv with some features disabled:
	$ xawtv -noxv -nodga
Another 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=288
The norm parameter takes PAL, NTSC or SECAM.
The input parameter takes 0 for composite, 1 for S-Video and 2 for TV/TV-Box (more on TV next).
Watching TV using a tuner
Tuner support is available, although still under development. Read the tuner guide for more information.
Using a remote control
Some versions of the Asus TV-Box came with a remote control. It takes some effort to get it going, but it's worth it.

Capturing

There are a gazillion programs out there intended to grab video: ffmpeg, NewVideoRecorder, vcr, VDR, Video4Linux Grab, XawTV, ...
Apparently ffmpeg works ok. We are open to suggestions on what grabbing software to use!
Using ffmpeg should go something like this:
	$ ffmpeg -vd /dev/video -r 15 -b 2048 -an -s 352x288 -t 10 video.mpg

It 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.

Monitoring hardware

If you want to do this, you probably already know about lm_sensors. If not, that's the place to start.
lm_sensors tells you you need i2c-riva.o from the rivatv package to monitor nVidia cards. You should NOT load i2c-riva.o, despite what lm_sensors tells you! All you need to do is to load the RivaTV module (rivatv.o), possibly with autoloading disabled:
	# modprobe rivatv autoload=0


© 2003, 2004 RivaTV team