tir, 08 03 2005 kl. 16:06 +0100, skrev Alberto Hernando:
> Hi.
> 
> I'm trying recording with freevo from my bt8x8 card. It seems to work fine, 
> but it eats more than 50% of my cpu. It's a 3GHz pentium-iv. I'd like to get 
> good quality, but without frying my cpu, as I'd like it to be quiet too. This 
> is how mencoder is executed:
> 
> /usr/local/bin/mencoder tv:// -tv 
> driver=v4l2:input=0:norm=pal:channel=44:chanlist=europe-west:width=768:height=576:outfmt=yuy2:device=/dev/video0:adevice=/dev/dsp:audiorate=32000:forceaudio:forcechan=1:buffersize=64
>  
> -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1200:keyint=30 -oac mp3lame 
> -lameopts br=128:cbr:mode=3 -ffourcc divx -endpos 1138 
> -o /mnt/video/03-08_15:45_El_cor_de_la_ciutat.avi
> 
> What do you use to get good quality and less cpu usage?
> 
>  Alberto

Recording in Fullframe square D1 is a cpuhog. as a general guideline,
the number of pixels is almost linear propartional to the processing
time required. So simple reduce the number of pixels by 2, and your
cpuload will drop to half..
Also, with regards to playing back the video, horizontially rectangular
pixels is less "visible" than vertiacally rectangular. In other words,
384x576 seems less grainy than 768x288. This is especially true on tv
sets, which blurs horizontially more than vertically.
This alos leads to the fact than tv's dont use square pixels. thats why
PAL Fullframe D1 is actually 720x576, and not 768x576 which is square
pixels more suited for monitors. This effects is also used on low-res
DVDs (Half-res) which uses 352x576, and Quarter-res 352x288. These
should all be scaled to an aspect ratio of 4/3 (or 16/9 depending on
content.. ). 
hmm.. lots of details here.. I can go into more if anyone wants it, but
I'll cut it short here and give you my mencoder line.
It records in 352x576, which is autostretched by mplayer to 768x576,
which makes for excellent video quality on regular tv-sets. Also it
includes option which allows it to pack it all into about 700Mb pr. hour
in decent quality. ( I only record tv-shows, so I'd rather have a large
base than super quality... doubling the bitrate pretties the picture up
a bit. ). It uses about 67%cpu on a Athlon 700.
Of course its not HDTV or DVD quality.. but If thats what you wanted, I
wouldn't think youve bought a bt8x8 card ;)

nice -n -17 /usr/bin/mencoder tv:// -oac mp3lame -lameopts cbr:br=128:mode=3 
-force-avi-aspect 1.33 -ovc lavc -vf pp=lb/al -lavcopts 
vcodec=mpeg4:vbitrate=1650:mbd=1:vqmin=2:vlelim=-4:vcelim=7:lumi_mask=0.15:dark_mask=0.07:vqcomp=0.5:vqblur=0.2:mpeg_quant:keyint=50
 -ffourcc divx -noskip -tv 
driver=v4l2:outfmt=yv12:input=0:width=352:height=576:device=/dev/video0:norm=pal:chanlist=europe-west:channel=S11:adevice=/dev/dsp1:audiorate=44100:buffersize=64
 -endpos 3649 -o recording.avi

notice the nice value, which removes framedrops but renders the rest of
the system very slow.
Also notice the -vf pp=al/lb, which makes the colors pretty and
deinterlaces the picture. I notice you're from europe, so your signal is
very likely interlaced, hence you might want deinterlacing. (this is
another long story on how to handle this I will spare you ;) but you can
encode the interlaced picture which plays nicer on interlaced tv's )

Hope you all enjoyed my rant :) maybe I should type up an article for
the web or wiki on this topic :)

 - Jesper

-- 
PGP/GnuPG key available at http://www.control.aau.dk/~jsma00/pgpkey.txt

Attachment: signature.asc
Description: Dette er en digitalt underskrevet brevdel

Reply via email to