AVerMedia LX5004 running Linux + surveillance program Motion

lx5004 card foto
Good things:
    + It was cheap (39£).
    + Each input has its own Brooktree Corporation Bt878 Video Capture chip,
      which makes it possible to get high frame rates simultaneously on all four channels.
    + It seems stable (used it now continuously for more than 1 year).

Bad things:
    - No hardware compression, so needs much CPU power.
    - No usable support from vendor (www.chaners2000.com)
    - No usable support from AVerMedia.com
    - bttv driver card list does not include this card.
    - The shipped software did not work (could not install).

Is it recommendable?
     Yes, I think so, as it is a cheap high-performance card.
     But the producent does not give support to this card, as it is out-dated (they say).

Successfull installations on several setups. Latest setup:
    * Hardware: 3800+ AMD dual core on motherboard ASUS M2NPV-VM. PCI LX5004 4-port grabber card.
    * Linux distro: Fedora Core 6 (64-bit version and added many 32-bit packages).
    * Additional RPM packages to install (if not already installed):
      directfb, directfb-devel
      lame , lame-devel , lame-libs
      faad2 , faad2-devel
      faac , faac-devel
      imlib2 , imlib2-devel
      ffmpeg-libs-0.4.9-0.35.20070204.lvn6.x86_64
      ffmpeg-devel-0.4.9-0.35.20070204.lvn6.x86_64
      ffmpeg-0.4.9-0.35.20070204.lvn6.x86_64
    * Additional software to compile yourself (read the instructions carefully!):
      Mplayer and Mencoder from mplayer
      motion (version 3.2.7) from motion
    * Load the bttv driver correct (after a reboot) by adding this to /etc/rc.local
        rmmod bt878
        rmmod bttv
        modprobe bttv radio=-1 card=77,77,77,77
        modprobe bt878
        modprobe tuner type=-1
    * The motion configuration file needs to have input=0 (and not input=1 as you might think). These files can be used for a start:
       motion.conf
       thread1.conf
       thread2.conf
       thread3.conf
    * Grabbing 5sec from /dev/video0 with MEncoder can be done like this (small mpeg4 and large raw video example):
       mencoder -tv noaudio:driver=v4l:width=640:height=480:fps=25 -vf pp=lb -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=900 -endpos 5 tv:// -o lavc.avi
       mencoder -tv noaudio:driver=v4l:width=640:height=480:fps=25 -vf pp=lb -endpos 5 tv:// -o mencoder_v4l2_640_480_25fps_pplb_endpos5.avi -ovc raw

    * After testing in graphical runlevel 5, the mashine only needs to run in runlevel 3. Edit the file /etc/inittab and change:
         id:5:initdefault:
       to
         id:3:initdefault:
       This will take effect after a reboot.


    * Performance examples:
      A slow computer (1GHZ Intel Pentium III) can not handle four input of 640x480 with more than a few frames per second.
      I recommend to use resolution of only 320x240 on such a slow PC. If the CPU gets too slow for the job,
      then the movie framerate will not be correct, and the movies will play back too fast.
      
      Motion is not written to multi-processors. A dual core processor is therefore only using one of its CPU's.
      The current configuration (3800+ AMD dual core) performs stable with 3 cameras each running at 640x480
      and with 8 frames/s on all three cameras at the same time. That's nice!


    * When the PC is configured correctly, then a complete backup of the harddrive can be done over network like this:

      If there is 5.5GB free disk space on the mashine you with to back up,
      then fill ex. 5GB up with zeroes (to make the compressed file smaller) like this:
      dd if=/dev/zero of=/home/username/dummyfile count=2000 bs=1M

      Second PC (backup server) has in this example ip-address 10.0.0.2
      Boot the mashine you want to backup with a knoppix live CD and write:
        su -
        /etc/init.d/ssh start
        fdisk -l /dev/hda | ssh username@10.0.0.2 "cat > /path/to/backup_hda_fdisk_information"
        sfdisk -d /dev/hda | ssh username@10.0.0.2 "cat > /path/to/backup_hda_sfdisk_information"
        dd if=/dev/hda bs=512 count=1 | gzip -c -9 | ssh username@10.0.0.2 "dd of=/path/to/backup_hda_mbr.gz"
        dd if=/dev/hda bs=512 conv=sync,noerror | gzip -c -9 | ssh username@10.0.0.2 "dd of=/path/to/backup_hda.gz" 

      Note: The method above will not exit the command correctly when it finishes. Therefore notice when the destination file
      size is not increasing any more. Then cancel the command with CTRL+C. The reason for the problem is probably the required
      password for the ssh-connection.

      Restore can be made like this (from the remote mashine)  (warning - not tested!!!!):
        dd if=/path/to/backup_hda_sfdisk_information | ssh root@knoppix_ip_address "gunzip -c | sfdisk /dev/hda < -"
        dd if=/path/to/backup_hda_mbr.gz | ssh root@knoppix_ip_address "gunzip -c | dd of=/dev/hda"
        dd if=/path/to/backup_hda.gz | ssh root@knoppix_ip_address "gunzip -c | dd of=/dev/hda"

    * Support for several usb webcams (pwc driver)
      The pwc driver (needed for my Philips TouCam Pro II USB cam) needs to be installed.
      I recommend you read about it here for the latest solution.



Last modified 2016-09-05