What
is RivaTV?
The RivaTV project is dedicated to producing linux drivers for nVidia
based graphics boards with
video-in feature. The term "RivaTV" is used to refer to the entire
driver set.
Does
it work already?
Yes. RivaTNT, RivaTNT2, GeForce 256, 2, 2MX, 3, 4MX and 4Ti chipsets
are supported. Riva 128 works,
kinda. See the status
page for detailed
information about supported
features.
What's
the difference between video-in and TV-in?
People mix up these two terms very often. This is understandable, since
they are closely
related.
There are two kinds of signals that can provide you with a TV image: a
Video signal and an RF
signal. The video signal is what comes out of a scart(like) interface
of your VCR/TV/Camera/etc.
This goes directly into your graphics card and is translated.
The RF signal is what comes out of the wall in your home. Your coax
cable. This signal carries
much more information than just one video stream: it has multiple video
AND audio streams. To
decode this, you need a tuner, like your VCR, TV, Asus TV BOX, PCI TV
card, etc.
Because the video-in feature on graphics cards is often used to watch
TV, it is mistakenly called
TV-in.
In short: If you have TV-in, you can plug your cable directly into your
PC. If you have video-in,
you need an additional appliance.
Can
I help?
Of course! There are several ways in which you can help:
- Test
rivatv on
your machine
- If you have some hardware we aren't aware of, look up details and
specs.
- Try and write a driver for your own video processing chip
- Search for documentation on the nvidia chips
- Try and improve the rivatv nvidia steering
Of course, if you do any of the above, it would be nice if you sent us
your findings ;-)
Another thing you could do is lend us a graphics card, so we can work
with it. That speeds up
support for that card incredibly. If you decide to do this, post it on
the devel-list. Be sure to
send it to someone who is with the project, to prevent theft. You can
check who is with the project
on the RivaTV
sourceforge page. Your
card will be returned to you when development is finished, or when you
so desire.
How
about FreeBSD, BeOS, etc?
There are no plans to port RivaTV to other OSes. But there are probably
lots of open source
projects out there for other operating systems. Start your own project!
Open Source Rules!
What
do I do if my question isn't answered here?
You might want to read the testers
guide
and go through the
mailing
list
archive. If that doesn't
help, contact
us.
RivaTV is a driver set. Of the drivers, the most important one is 'rivatv.o', a Video4Linux module. Because of this, you can use Video4Linux applications to view whatever is on your video-in. There are also a bunch of decoder modules. These are I2C client drivers to support the video decoder chip on your graphics board. The one appropriate for your board is loaded by the RivaTV V4L module, if it knows your card. If not, you can load it yourself beforehand.
This is how it all works, basically. If you want more detail, read the source or ask.
What's the current status? Is my board supported?
Possibly. Check the status page. If your board is not listed there, it does not mean it doesn't work. It just means we know nothing anything about it. Send us enough info to add a line to that page, and we'll see what we can do! For example, your log may indicate it cannot determine what card you have. Like this:...If this is the case, you should send those 4 (hexadecimal) numbers to us, WITH the manufacturer and model name of your board, AND the decoder chip on it so that the support can be added to subsequent releases. The hardware info can be found using the packaging and/or the following commands:
rivatv: It is impossible to identify your board uniquely, sorry.
rivatv: PCI identifiers: 10DE 002D 0000 0000
...
$ cat /proc/bus/pci/devices
# lspci -v
Note, however, that the nVidia Personal Cinema cards generally (always?) include a SAA71(3/7)4HL based capture chip and the driver for this chip is not yet complete and cannot produce any video output.
What is the issue with the SAA7134HL and SAA7174HL capture chips?
Many nVidia personal cinema cards use a SAA7174HL video-in module. This chip is understood, the i2c communication between it and the nvidia chip works, but the register programming that permits the video to pass through the card is still under development. The RivaTV developers refer to this as the "magic switch".
The magic code needs to be set when the card is initialised. You can extend the "saa7174hl_init_bytes" field in the saa7174hl.c file in order to apply initial register values very easily. With a working windows version and knowledge about how to "debug" register writes to the saa7174hl (and compatibles) chip it may be possible to find out by trial and error.... See the 7134hl documentation for more help.
One suggestion to help identify the register values is:
If you look on the driver CD that
came with the card, there is nvcap.sys
which is the windows driver, and
nvcap.inf which is some kind of
parameters for the driver. In
there is some information about
customizations relative to the usual
driver, such as:
;---------------------------------------------------------------
; Subkey for VidTuner
; 8574=W/46/7f
; 8575=W/46/ff/1
;---------------------------------------------------------------
HKR,VidTuner,NumCmd,,1
HKR,VidTuner,Cmd0,,W/46/7f
These are command registers and
things that should be written to them.
Note: The SAA7134 is supported by the bttv drivers, but note that here the output from the capture card is to the PCI interface and not over the i2c bridge needed for nVidia cards. As things stand, the existence of the bttv driver is of no use for Personal Cinema cards.
Does
it work with the nVidia binary driver?
It did for drivers up to and including 5336, but changes made in the
6xyz series prevent RivaTV from being run. You may
also have
trouble running on SMP systems. If you experience
problems on a multi-CPU
system with rivatv and NVdriver, you can work around the issue by using
the open source nv
driver. We are trying to resolve the issue. Also, DMA does not yet work
with NVdriver.
modprobe rivatv when a recent nVidia driver is being used typically results in only the following showing up in the system messages file - see also this question.
Does
it work with the XFree86 nv driver?
Yes.
Does
it work outside of X?
Yes, RivaTV is self-contained and does not need X or any other
graphical
supplement to do it's thing. You can use any V4L application to grab
the video and, for example, save it (e.g. with ffmpeg), or display it
on an X server running on a
different machine (e.g. with xawtv).
Does
RivaTV support TV-out?
No. TV-out and TV-in support were split up into two separate projects,
for the benefit of both.
nv-tv-out
(or
"nvtv") is the TV-out project for the nv driver,
RivaTV is the TV-in project. The nVidia binary drivers also
support TV-out, but see question
above.
Is
it SMP safe?
We're doing the best we can to keep rivatv SMP safe. At the moment,
there is an
issue in setups with rivatv and nVidia's binary driver, that can cause
crashes. The
XFree supplied nv driver does not have this problem.
Does
it work with a tuner, e.g. TV-Box?
Yes. See tuner
support page for more info.
Loading
RivaTV fails with "init_module: No such
device".
When this error message occurs and the "dmesg" command just states
rivatv: Video4Linux driver for NVIDIA cardsand nothing more, it is most probable that you have a graphics card which is not yet supported by RivaTV.
rivatv: Version 0.8.2
rivatv: MMX processor extension enabled
RivaTV
can't reserve a resource or IRQ. What's
wrong?
If RivaTV is unable to reserve an IRQ, it is possible you have no IRQ assigned to your VGA card in your system's BIOS. Enable and try again.
If RivaTV is unable to reserve the framebuffer ("FB"), you are probably using a console framebuffer device (eg. vesafb or rivafb). Try without by unloading, compiling a new kernel or booting with the vga=normal boot option.
Why
doesn't RivaTV work simultaneously with
Twinview/TV-out?
This issue has been resolved. You are most likely using an old version
of RivaTV.
Download a newer version and try again.
Why
doesn't RivaTV try to autodetect my decoder
chip?
If you want RivaTV to autodetect your video decoder chip and load its
driver, you have to enable
the module loader of your linux kernel: Kernel module support
-->
Kernel module loader.
When
I try to grab a picture or movie with xawtv,
I get 'Resource temporarily unavailable'. What's wrong?
This happens when xawtv is set to 'overlay'. You need to switch to
'grabdisplay' before you can capture anything. Xawtv is not smart
enough to switch to
grabdisplay by itself.
My
tuner works, but I don't hear any sound! What
is wrong?
First, make sure you have loaded all audio modules (tvaudio and
tvmixer), and that they're patched
for use with rivatv. See the tuner
page for
details.
Then, check the volume setting on your tda8425 (or similar, if
applicable). For example, this can
be done in KDE's KMix program by clicking the appropriate mixer tab.
Why
is grabbing so slow and CPU intensive?
By default, RivaTV uses normal memory copies to get the frames from the
card's memory, and
then from memory to where you want it; usually the framebuffer (screen)
or harddisk. A full-PAL grab is 704x576x24bit, at 25fps, copied twice,
meaning a little over 58MB per second to be copied for a perfect movie.
Memory copies are CPU intensive and there are a lot of them. So that's
why it's slow.
But there is a way to overcome this. It is called DMA. If you enable
DMA in RivaTV, like so:
# modprobe rivatv dma=1grabbing will be sped up. Proceed with caution, though, this is experimental!
Loading
RivaTV fails with "rivatv.o: unresolved
symbol agp_copy_info". What is wrong?
You need to load the agpgart.o module. A simple
# modprobe agpgartshould suffice. The necessity for agpgart has been removed in RivaTV 0.8.3.
Why
does compiling RivaTV on SuSE fail, saying
the kernel is not configured for modules?
Compiling RivaTV 0.8.2 or higher on a SuSE install can result in the
following errors:
make -C /lib/modules/2.4.19-4GB/build SUBDIRS=`pwd`/bttv modulesYou can fix this by doing a `make oldconfig`, instead of the `make config` suggested by the error message.
make[1]: Entering directory `/usr/src/linux-2.4.19.SuSE'
The present kernel configuration has modules disabled.
Type 'make config' and enable loadable module support.
Then build a kernel with module support enabled.
make[1]: *** [modules] Error 1
make[1]: Leaving directory /usr/src/linux-2.4.19.SuSE'
make: [all-kbuild] Error 2 (ignored)
make -C /lib/modules/2.4.19-4GB/build SUBDIRS=`pwd`/src
EXTRA_CFLAGS=-I`pwd`/bttv modules
make[1]: Entering directory `/usr/src/linux-2.4.19.SuSE'
The present kernel configuration has modules disabled.
Type 'make config' and enable loadable module support.
Then build a kernel with module support enabled.
make[1]: *** [modules] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4.19.SuSE'
make: *** [all-kbuild] Error 2
RivaTV
0.8.2 worked for me, but higher versions
don't! How come?
Starting with version 0.8.3, RivaTV no longer supports colour formats
other
than those supported by the nVidia hardware. This means only the UYVY
is
supported. The reason for this
is the
performance impact software colour conversion has. The arguement being
that
drivers should not convert, but applications should, if needed.
Unfortunately, not all applications support UYVY. So this is where we
are
asking you to go and bug the author(s) of your favorite application and
ask
them to implement UYVY.
We realised beforehand that some people would be left dead in the water
with
our colour conversion taken away. So we decided to provide the option
of
compiling it in. Do a ./configure --help for more information.
How
can I use RivaTV with lm-sensors?
It is possible to use rivatv with lm-sensors, to monitor your chip's
temperature for example.
All you need to do is load the rivatv.o module, and you're good to go.
You may have noticed a
file named i2c-riva.o in the rivatv source tree. That is NOT a module,
just an object file
part of the rivatv.o module. It'll load, but it won't work and will
mess up your running kernel.
Do NOT use i2c-riva.o !
Do
you guys know of a good grabbing application?
Apparently ffmpeg
is a
good console app for that purpose.
The following command line should give you a push in the back:
$ 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.
RivaTV
says it can't identify my board uniquely.
WTF?
This means the manufacturer of your card was too lame to change the
subsystem device identifiers
from 0 (zero) to the proper values. Hence, we can't determine what
board you have, and consequently
don't know what decoder to load.
What to do about this:
If your hardware is known to us and listed in the CARDLIST file you can
force rivatv to use specific
settings by
# modprobe rivatv card=#and thus identify your board. If you have a CVS version, you're stuck loading all modules yourself. But with CVS you were doing that anyway.
# RivaTV
alias char-major-81-0 rivatv
options rivatv autoload=0
below rivatv saa7108e
RivaTV
doesn't grab in overlay mode. Is that a
bug?
No. That's how it works. Overlay doesn't grab to memory, it displays
the image directly onto the
framebuffer (ie: what you see). But in grabbing mode, the frames are
copied to memory, and then
copied to the framebuffer. This makes saving them to disk possible, but
is also slower. See also
question 18.
MPlayer
doesn't work with RivaTV! Why?
Because you're doing it wrong! Here's how:
$ mplayer -tv on:driver=v4l:norm=PAL:input=0:outfmt=YUY2:width=352:height=288Use NTSC or SECAM instead of PAL if applicable.
Xawtv
only does 4:3 pictures! How do I get it to
show other ratios?
Put this in your xawtv config file (~/.xawtv):
[global]This will tell xawtv not to uphold a fixed aspect ratio.
ratio = 0:0