km is a Linux kernel module that provides Video4linux interface to video capture capabilities of Mach64, Rage128 and Radeon cards. Note that we are not saying "only All-in-Wonder cards" as each of the cards mentioned has a capture engine - whether or not something (like a decoder) is hooked up to it. Often the user can "expand" their card by either connecting a standalone card to it with a cable or utilizing a ZV port in a notebook. In these cases km can provide video capture - provided the capture engine has been correctly setup first.


  • Obtain km from our download area or from CVS.
  • Usually typing make will cause everything to compile - provided the source to your Linux kernel is located in /usr/src/linux
  • To try out km type make test.

Capture Requirements

Generally, in order to simply read video data into main memory very little computing power is required. The situation changes if you want to have a copy of it on disk. A simple estimation shows the bandwidth requirements to be about 18 megabytes per second - a lot more than modern hard drives can do. Thus one must compress the video stream before writing it to disk - AVview will do that with the help of ffmpeg library.

  • You hard drive must be using DMA for transferring data. Otherwise too much CPU time is spent on this task. You can use hdparm to adjust your hard drive mode of access.
  • Pentium III-700mhz should be able to compress "half-width" "half-rate" video stream (320x240 @ 30hz for NTSC) with about 60% CPU utilization.
  • Athlon XP 1900 should be able to compress "double-interpolate" "half-rate" video stream (640x480 @ 30hz for NTSC) with about 50% CPU utilization.
  • It is generally a good idea to have plenty of RAM and CPU power.


  • km is dependent upon video4linux support - either compile it into your kernel or as a module. In the latter case you need to issue /sbin/modprobe videodev before trying to load km
  • Passing km_debug=0 on the command line will eliminate the bulk of dbug messages, in particular no messages would be printed during running capture unless there are some errors.
  • Current CVS source of km requires that you install drm-kernel for km to work properly.
  • Good hard disk perfomance is essential for successful capture. The command hdparm /dev/hda will display current hard disk parameters. You can test the read speed with hdparm -t /dev/hda. To enable DMA use the command hdparm -d1 /dev/hda. If your read speed is something like 2.66 meg/sec and/or you are not using DMA to transfer data you will get very poor capture perfomance.
  • You can check whether hard disk is the bottleneck by specifying the file to capture to as /dev/null.
  • For using applications other than AVview you need to have TV playing in a window before you can record anything. Otherwise, you will see "No data available" messages in dmesg output and no data will be read from km-managed /dev/videoX device.
  • Nikolai Zhubr has done some interesting work enhancing km to behave better with programs other than AVview. His patches are available at
  • In order for km to work correctly the video card must be assigned an IRQ. Some BIOSes do not do this unless explicitly configured. Be sure to check video card IRQ assignment option in your BIOS.
  • Some people have experienced lockups with km that were curable by passing pci=noacpi option to the kernel on the command line. I have no idea what this option does.

TODO list for CVS code

  • Finish up km_api so other work can go ahead
  • Test and debug mach64 and rage128 code.
SourceForge Logo was last modified by Vladimir Dergachev 9:00am Friday, July 25th 2003