Linux driver untuk EasyCap USB2.0 Video Adapter

From OnnoWiki
Revision as of 09:22, 31 October 2010 by Onnowpurbo (talk | contribs)
Jump to navigation Jump to search

Pastikan ada kernel headers. Di Debian biasanya di kenali sebagai "linux-headers-...". Dengan menggunakan perintah `uname -r` kita dapat mengetahui apa yang cocok untuk system kita. Jika di install maka folder berikut akan di isi /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

Pastikan EasyCAP unplug, sebagai root lakukan:

mkdir ~/EASYCAP
cd ~/EASYCAP

Copu dan ektrak easycap driver

cp -p easycap_dc60.0.8.5.tar.gz ~
cd ~
tar zxf easycap_dc60.0.8.5.tar.gz
cd easycap_dc60.0.8.5
./install.sh

Cek apakah modul telah berhasil di load dengan baik:

lsmod | grep easycap

Masukan secara fisik EasyCAP, dan cek apakah file berikut berhasil di buat secara automatis:

/dev/easycap0
/dev/easysnd1

Jika kita ingin menggunakan easycap dengan user bisa, kita haru memberikan ijin yang benar ke file tersebut

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

Atau kita dapat menggunakan script ./permit.sh yang tersedia di distribusi.

Jika /dev/dsp tidak ada di sistem anda, maka anda perlu menginstalasi paket yang dibutuhkan. Di Debian paket tersebut di sebut oss-compat. Pastikan bahwa /dev/dsp mempunyai ijin rw untuk user biasa.

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.

Referensi

Pranala Menarik