Difference between revisions of "Linux driver untuk EasyCap USB2.0 Video Adapter"

From OnnoWiki
Jump to navigation Jump to search
Line 6: Line 6:
 
used to find out which of these is the right one for your system.  When
 
used to find out which of these is the right one for your system.  When
 
installed the package populates /usr/src/linux-headers-X.X.XX-.../*.
 
installed the package populates /usr/src/linux-headers-X.X.XX-.../*.
 +
 +
Instalasi paket program pendukung
 +
 +
sudo apt-get install doxygen linux-headers-2.6.32-21-generic bin86 libqt3-headers libqt3-mt-dev libncurses5-dev \
 +
libusb-dev libsane-dev libsane-extras-dev exuberant-ctags camorama subversion
 +
 +
  
 
Make sure the EasyCAP device is physically unplugged.  Then, as root:
 
Make sure the EasyCAP device is physically unplugged.  Then, as root:
Line 11: Line 18:
 
Create a directory to work in:
 
Create a directory to work in:
  
mkdir ~/EASYCAP
+
mkdir ~/EASYCAP
cd ~/EASYCAP
+
cd ~/EASYCAP
  
 
Next, depending on where the file was downloaded to:
 
Next, depending on where the file was downloaded to:
  
cp -p ~/Desktop/easycap_dc60.x.y.tar.gz .
+
cp -p ~/Desktop/easycap_dc60.x.y.tar.gz .
tar zxf ./easycap_dc60.x.y.tar.gz
+
tar zxf ./easycap_dc60.x.y.tar.gz
cd easycap_dc60.x.y
+
cd easycap_dc60.x.y
./install.sh
+
./install.sh
  
 
Check that the module has been successfully loaded:
 
Check that the module has been successfully loaded:
  
lsmod | grep easycap
+
lsmod | grep easycap
  
 
Physically plug in the EasyCAP device, and check that the following
 
Physically plug in the EasyCAP device, and check that the following
 
special files have been successfully created:
 
special files have been successfully created:
  
/dev/easycap0
+
/dev/easycap0
/dev/easysnd1
+
/dev/easysnd1
  
 
If you wish to perform the subsequent testing as an unprivileged user
 
If you wish to perform the subsequent testing as an unprivileged user
 
you must give these special files the correct permissions:
 
you must give these special files the correct permissions:
  
chmod ugo+rw /dev/easycap0
+
chmod ugo+rw /dev/easycap0
chmod ugo+rw /dev/easysnd1
+
chmod ugo+rw /dev/easysnd1
  
 
You may use the script ./permit.sh provided in the distribution to perform
 
You may use the script ./permit.sh provided in the distribution to perform
Line 49: Line 56:
 
visible and audible output:
 
visible and audible output:
  
mplayer tv:// -tv driver=v4l2:norm=PAL_BGHIN:width=720:height=576:outfmt=uyvy:device=/dev/easycap0:input=0:fps=25:adevice=/dev/easysnd1:audiorate=48000:amode=1:forceaudio:immediatemode=0 -hardframedrop -vo xv -ao oss -msglevel all=9
+
mplayer tv:// -tv driver=v4l2:norm=PAL_BGHIN:width=720:height=576:outfmt=uyvy:device=/dev/easycap0:input=0:fps=25:adevice= /dev/easysnd1:audiorate=48000:amode=1:forceaudio:immediatemode=0 -hardframedrop -vo xv -ao oss -msglevel all=9
  
 
A script test.sh is provided to make this easier.  You will need to remember
 
A script test.sh is provided to make this easier.  You will need to remember
Line 57: Line 64:
 
If the test with mplayer is successful, you may wish to try using the
 
If the test with mplayer is successful, you may wish to try using the
 
driver with other user programs, possibly using the supplied scripts:
 
driver with other user programs, possibly using the supplied scripts:
              ./tvtime.sh PAL
+
 
              ./tvtime.sh NTSC
+
./tvtime.sh PAL
              ./vlc.sh PAL
+
./tvtime.sh NTSC
              ./vlc.sh NTSC
+
./vlc.sh PAL
 +
./vlc.sh NTSC
 +
 
 
It is necessary to have sox installed to provide the audio output for tvtime.
 
It is necessary to have sox installed to provide the audio output for tvtime.
 
Because vlc must be run as an unprivileged user, it will be necessary for
 
Because vlc must be run as an unprivileged user, it will be necessary for
Line 67: Line 76:
 
fails to display a picture or shows a picture without colour, try editing the
 
fails to display a picture or shows a picture without colour, try editing the
 
file src/easycap.h so that line 41 becomes
 
file src/easycap.h so that line 41 becomes
        #define PREFER_NTSC      or    #undef  PREFER_NTSC
+
 
 +
#define PREFER_NTSC      or    #undef  PREFER_NTSC
 +
 
 
depending on whether you are using NTSC or PAL, then reinstall the driver.
 
depending on whether you are using NTSC or PAL, then reinstall the driver.
  

Revision as of 20:12, 30 October 2010

QUICK START GUIDE


Make sure that the kernel headers are present. On Debian the relevant packages are called "linux-headers-...". The command `uname -r` can be used to find out which of these is the right one for your system. When installed the package populates /usr/src/linux-headers-X.X.XX-.../*.

Instalasi paket program pendukung

sudo apt-get install doxygen linux-headers-2.6.32-21-generic bin86 libqt3-headers libqt3-mt-dev libncurses5-dev \
libusb-dev libsane-dev libsane-extras-dev exuberant-ctags camorama subversion


Make sure the EasyCAP device is physically unplugged. Then, as root:

Create a directory to work in:

mkdir ~/EASYCAP
cd ~/EASYCAP

Next, depending on where the file was downloaded to:

cp -p ~/Desktop/easycap_dc60.x.y.tar.gz .
tar zxf ./easycap_dc60.x.y.tar.gz
cd easycap_dc60.x.y
./install.sh

Check that the module has been successfully loaded:

lsmod | grep easycap

Physically plug in the EasyCAP device, and check that the following special files have been successfully created:

/dev/easycap0
/dev/easysnd1

If you wish to perform the subsequent testing as an unprivileged user you must give these special files the correct permissions:

chmod ugo+rw /dev/easycap0
chmod ugo+rw /dev/easysnd1

You may use the script ./permit.sh provided in the distribution to perform this step if you wish.

If /dev/dsp is not present on your system install the package which provides it. On Debian the package is called oss-compat. Optionally, check that /dev/dsp has rw permissions for unprivileged users.

If all has gone well so far, check that the EasyCAP's input cables are correctly connected to the videotape machine (or whatever) and test the setup with mplayer. Variations on the following command should give some visible and audible output:

mplayer tv:// -tv driver=v4l2:norm=PAL_BGHIN:width=720:height=576:outfmt=uyvy:device=/dev/easycap0:input=0:fps=25:adevice= /dev/easysnd1:audiorate=48000:amode=1:forceaudio:immediatemode=0 -hardframedrop -vo xv -ao oss -msglevel all=9

A script test.sh is provided to make this easier. You will need to remember Mplayer's keybindings: 1 and 2 for contrast; 3 and 4 for brightness; 5 and 6 for hue; 7 and 8 for saturation; / and * for volume; m for mute.

If the test with mplayer is successful, you may wish to try using the driver with other user programs, possibly using the supplied scripts:

./tvtime.sh PAL
./tvtime.sh NTSC
./vlc.sh PAL
./vlc.sh NTSC

It is necessary to have sox installed to provide the audio output for tvtime. Because vlc must be run as an unprivileged user, it will be necessary for root to run the script ./permit.sh in order to set the correct permissions for /dev/easycap0 and /dev/easysnd1 after the EasyCAP is plugged in. If vlc fails to display a picture or shows a picture without colour, try editing the file src/easycap.h so that line 41 becomes

#define PREFER_NTSC      or     #undef  PREFER_NTSC

depending on whether you are using NTSC or PAL, then reinstall the driver.

Pranala Menarik