|
|
Video Capture ISummary:
(Editorial note: This article has been generously contributed by Mandrake user Roger ?.) Well, this time I'm even more excited with Mandrake Linux 8.1 and video capturing. Code is maturing and my capture performance is showing it1.1 My Hardware And Software
rpm ––rebuild ––clean {packagename-version}.src.rpm You may need to install other required RPMs (I installed the requires from i586.rpm's, although, you could go the extra mile and grab the *.src.rpm's). The reason I rebuilt the rpm's from source, is for the added optimizations of the i686 architecture and, if you have an SMP layout, rebuilding the packages may add additional benefits. This is as far as I will go with my system setup, as there are many other tweaks that you can optionally perform while re-compiling source code (ie. '~/.rpmrc' & adding optflags: i686 -O9 -march=i686 -mcpu=i686 And, of course, upgrading the Mandrake with Cooker packages is experimental and isn't really recommended unless you're testing, developing, or experiencing problems. I've only listed what I'm using here for user info. Your default Mandrake 8.1 should perform just fine, but you will need xanim if you want to playback your recorded files. Configuration Files~/.xawtvJust some clippings from my messy config file. Hit Google Groups for some more config options. I'm hoping the author of Xawtv will work allot more config settings into here such as "Default record filename", "Default Movie Driver", and so on. If you know them, let me know. I'm really tired of typing the same options over and over. Also, beware of word wrapping in configuration files posted here. {global} ~#Sound - if your having problems finding the correct channel to record in, do ~#'mixer=mixer' will cause a dump of all the 'valid values' (hint hint) ~#mixer = vol ~#/dev/mixer: available: 'vol' 'bass' 'treble' 'pcm' 'speaker' 'line' 'mic' ~#'cd' 'rec' 'ogain' 'line1' 'line2' 'line3' 'dig1' 'dig2' 'phin' mixer = line freqtab = us-bcast ~#Set the pixsize to the value you record in1.1 ~#pixsize = 128 x 96 ~#pixsize = 640x480 pixsize = 320x240 ~#pixsize = 800x600 pixcols = 1 jpeg-quality = 75 mjpeg-quality = 75 toggle-mouse = 0 keypad-ntsc = yes osd = yes {defaults} norm = NTSC capture = over input = Composite1 ~#input = svideo ~# The following appear to increments of 500's. ignore the 'bright' & ~#'contrast' as i just copied these values & they happen to be ~#correct1.1 bright = 38966 contrast = 44280 ~#up'ed hue & color for my personal video tape hue = 41500 color = 43000 /etc/modules.confHere's the REAL MAGIC1.1 Per my hardware system resources, I was able to add a line "gbuffers=8". Once i did so, capturing smooth flowing video was possible. Prior to doing this, I was getting "choppy video & sound". If you get "v4l: waiting for a free buffer" then you may want to experiment with this option. I've also included my sblive line to show that i'm using a video capture card w/o onboard audio. alias sound-slot-0 emu10k1
alias char-major-81 bttv
options bttv gbuffers=8 card=1 tuner=3 radio=0
Each time you change the settings here, you need to do a rmmod bttv modprobe bttv /etc/X11/XF86Config-4Only the module section here. May not be really needed if it's already loaded. And with Mandrake 8.0/8.1, I believe it is unless you're using your own XF86Config-4 config file. So, most users can really ignore this part. Section "Module" ~# This loads the DBE extension module. Load "dbe" ~# This loads the miscellaneous extensions module, and disables ~# initialization of the XFree86-DGA extension within that module. ~SubSection "extmod" #Option "omit xfree86-dga" ~EndSubSection ~# This loads the Type1 and ~FreeType font modules Load "type1" Load "freetype" ~# Other Load "glx" Load "dri" Load "GLCore" Load "v4l" Load "bitmap" ~EndSection Each time you mess with the 'XF86Config-4' file, you need to restart X1.1 Performance TuningRefer to the MU article on tuning hard drive performance with 'hdparm' . Checking .bashrc Settings For ~XawTVYou will need to customize the 'xawtv' command to start up with at least -noxv Add it to the following file including any other switches: '~/.bashrc'alias xawtv='xawtv -noxv -parallel 2 -dspdev /dev/dsp -geometry 320x240+35+25 - -bpp 32 -outfile /mnt/winc2/video-captured/ -v 0' You can optimize the above to your liking, but one thing I recommend you do is what I've done in my root's '~/.bashrc'. alias xawtv='nice -n-20 xawtv -noxv -parallel 2 -dspdev /dev/dsp -geometery352x240+35+25 -bpp 32 -v 0' alias cdrecord='nice -n-20 cdrecord' Now, I am pretty much guarenteed that, I won't miss a frame during the record process. Notice that I also added my cdrecord line here since I felt it to be just as an important tip to do so. The bad thing is nice/renice needs root permissions, or you could 'suid' it. Now do a exec bash -$-
Your probably now getting ready to start capturing, if not, you've already started. This is probabely a good time to mention that you should “stop” and Cron/Anacron and any other services that will eat your system resources. # /etc/rc.d/init.d/anacron stop # /etc/rc.d/init.d/crond stop Optionally, you could use /usr/sbin/drakxservices if you a gui nut. I find the console much faster tho. Next Item: Sound, troubleshooting, testing and more. Related Resources:man xawtv ~XawTV homepage The BTTV Mini-HOWTO Revision / Modified: Dec. 18, 2001 Legal: This page is covered by the GNU Free Documentation License . Standard disclaimers of warranty apply. Copyright LSTB and Mandrakesoft. |