(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 it!
- 2x750 Intel P3's
- 1 AGP NVIDIA Geforce 32MB DDR
- 3 Western Digital IDE HDD's (two are 66UDMA &
the other is a 100UDMA)
- Sblive value card (emu10k1) (using this to record
- PCTV Studio Video Capture Card (bt848 based)
- Mandrake 8.1 (with cooker kernel-smp-2.4.13-4mdk
- this version now includes a functional supermount)
- xawtv-3.64-1mdk.src.rpm (v3.60 is included with Mandrake
8.1 & is just fine. No need to upgrade to v3.64)
- xanim-28010-14mdk (This is required for xawtv to
playback your recorded video/audio. It does not playback stereo correctly
I rebuilt the source packages with
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'
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.
section index top
Just 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
#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 in!
#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
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
bright = 38966
contrast = 44280
#up'ed hue & color for my personal video tape
hue = 41500
color = 43000
Here's the REAL MAGIC! 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
rmmod bttv (or the applicable module and if it's loaded)
modprobe bttv. Check the directory '/usr/src/linux/Documentation/video4linux/bttv/'
for the docs for your appropriate bttv module settings. (gbuffers info is
located in the ./Insmod-options file)
Only 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.
# This loads the DBE extension module.
# This loads the miscellaneous extensions module, and disables
# initialization of the XFree86-DGA extension within that module.
#Option "omit xfree86-dga"
# This loads the Type1 and FreeType font modules
Each time you mess with the 'XF86Config-4' file, you
need to restart X!
section index top
Refer to the MU article on tuning
hard drive performance with 'hdparm'.
section index top
You will need to customize the 'xawtv' command to start
up with at least
Add it to the following file including any other switches:
alias xawtv='xawtv -noxv -parallel 2 -dspdev /dev/dsp
-geometry 320x240+35+25 - -bpp 32 -outfile /mnt/winc2/video-captured/ -v
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 -$- in the console window
as user each time you edit it, to reload the bash settings. Once this command
is in history, press 'Ctrl R' and '$' in the console (this will do a 'reverse
search' of $). Just hit enter after this. You may need to edit .bashrc &
have bash reload it's config file several times to get Xawtv to execute as
I found that this was required on loading xawtv to allow 'record mode'
Dunno. sounds good tho! (maybe it's smp stuff?...lol)
Just in case sblive (your sound device) wasn't detected. (May not be needed)
For more settings, check the 'man xawtv' and '/usr/src/doc/share/xawtv
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.
section index top
Sound, troubleshooting, testing