[MPlayer-users] Tips on TV-encoding performance

rcooley rcooley at spamcop.net
Sun Aug 10 11:29:34 CEST 2003


I've been using mencoder on my system to record to MPEG4 in realtime 
from my TV-tuner card, but it uses up just about all of my CPU power, so 
I'm unable to do anything else with the system without dropping frames. 
  I really need to be able to playback on this sytem at the same time I 
am encoding.  If anyone has even the most trivial suggestion to improve 
performance, I'd like to hear it.

But first, I'll cover a few things I've already tried, and their 
results, maybe someone can find where I went wrong.

Here is the command-line I currently use:

nice -n -19 mencoder -nocache -tv
on:driver=v4l:device=/dev/video0:input=0:norm=NTSC:chanlist=us-cable:width=720:height=480:audiorate=24000:amode=0:outfmt=yuy2:channel="$CH" 
-vop crop=640:472:40:4,pp=md -ovc lavc -lavcopts 
vcodec=mpeg4:vbitrate=1000:vqcomp=0.0:vhq -oac mp3lame -lameopts 
cbr:br=48:mode=3

In I have tried using mjpeg instead of MPEG4, but that provides only a 
minimal improvement in performance, not nearly enough to justify it.
I only recently added the vhq, even without it, the process was using up 
just about as much power, and I think the greatly improved quality is 
worth just a few CPU cycles.
I have tried using PCM audio instead of mp3lame, but my hard drive isn't 
fast enough apparently, and I get lots of errors about droping audio frames.
I would like to use denoise3d despite it's drawbacks, but it puts my 
processor usage over the top, and frames are dropped.
I have tried using nuppelrec, and nuvrec, but the quality is lower than 
I would want, and I would prefer not to have to use up quite that much 
hard drive space.  They don't support any resolutions above 640x480 
either.  (Ideally I would like to encode straight to MPEG4, but I'll do 
a two-step process if it's the only option)
I have tried vqscale as Rich has suggested a few times recently, but 
there is no noticable improvement in performance or quality.


Here is all the information about my system:


   Mencoder command-line above.

BTTV Module Options:
options bttv card=78 tuner=2 radio=1 pll=1 autoload=1 fieldnr=1 gbuffers=32
options tuner type=2
options i2c scan=1 verbose=1 i2c_debug=0

hdparm args:  -A1 -a64 -c1 -d1 -m16 -p4 -S240 -X66 -Xmdma2
OS: Gentoo 1.4rc1
All software compiled with "-march=athlon-xp"

Actual Hardware:

   AMD Athlon XP 2000+  1.666GHz Processor
   Asus A7S333 Mobo
   256MB PC2700 DDR RAM
   Western Digital 40GB HDD, 7200RPM, 2MB Cache
   KWORLD TV878RF-PRO BTTV Tuner Card



More information about the MPlayer-users mailing list