[MPlayer-users] Optimize video output from tv card

Michael auslands-kv at gmx.de
Wed Aug 26 09:43:44 CEST 2009


Reimar Döffinger wrote:

> On Tue, Aug 25, 2009 at 01:50:42PM +0200, Michael wrote:
>> I want to output external video from a tv encoder card (USB) to the
>> screen. It works, but it uses too much CPU power. If the stream is played
>> back at 25fps it uses 100% CPU. With 15fps it is about 50%.
> 
> What kind of CPU usage? In "top"/"time"/whatever program, user or sys?
I use the column "CPU usage" in "top" or "htop". I think it shows user CPU 
usage.

> What values does the MPlayer command line show for CPU usage?
> 

I only have ??% there, e.g.
V:   0.0 170/170 ??% ??% ??,?% 0 0

>> When I instead use a webcam, I can reach 25fps with about 50% only. So I
>> guess it is somehow the internal processing. Is there a way to optimize
>> it?
> 
> What internal processing? There isn't any serious amount of processing
> for that case, though using something suitable for video output like
> -vo xv or -vo gl:yuv=2 should be somewhat better.

Unfortunately, I am pretty much fixed on a small embedded hardware system 
(GeodeLX), which seems to only support fbdev and directfb. (directfb, 
however, uses more CPU).

btw. my command line looks like this (the same for the webcam and for the tv 
card):
mplayer -vo fbdev tv:// -tv  driver=v4l2:device=/dev/video0 -vf crop=640:400

> From personal experience: finding a TV card that is not total crap would
> help most, though if such a thing exists is still unclear.
> Though since you say it is an encoder card (by which I assume you mean
> this thing has an actual hardware encoding chip), there are two obvious
> points:
> 1) Most USB encoder cards only have an encoder because they only support
> USB 1.1. You can't transfer 640x480x25 fps over USB 1.1, it's simply
> impossible. Getting a USB 2.0 device helps there, though it can't fix
> the fact that USB in any version sucks for actually transferring data.
> 2) Thus you should find out how to make this thing encode, having
> to transfer less data over USB will always save more than the decoding
> will cost.
> 
> Note that according to the output it is your webcam that supports
> encoding (only JPEG, and MPlayer does not use it), to the TV card...

I have to admit, that I nearly know nothing about video processing at all.
I guess, that the external video capturing card/TV card/webcam encodes the 
video somehow, e.g. MJPEG or other type of streams? Furthermore I guess it 
needs to use some type of colorspace, which might need a conversion?

The resolution and the framerate, however, is the same between the webcam 
and the TV card (604x480, 25fps). So, I thought, if displaying the webcam 
takes app. 50% of CPU usage, while displaying the TV card take 100%, mplayer 
seems to be doing more stuff ("internal processing") on the video data it 
gets from the TV card than from the webcam.

I hoped that there is some special command line option, maybe to the driver 
to maybe switch to a different colorspace that is less time consuming for 
mplayer to use. Or maybe mplayer is using some redundant conversions that I 
may reduce via some command line option.

Of course, I might be totally mistaken, and only hardware changes can make 
any difference.

Thanks for trying to help.

Michael




More information about the MPlayer-users mailing list