[mythtv] EPIA M10k - XvMC: Very high CPU (even when paused!!)

Daniel Kristjansson danielk at cuymedia.net
Tue Jan 2 17:09:14 UTC 2007

On Tue, 2007-01-02 at 16:35 +0000, Colin Guthrie wrote:
> Daniel Kristjansson wrote:
> >> I get the following info in the log (-v playback,important,libav,general)
> >> stream: start_time: 72854.927 duration: 7586.681 bitrate=3833 kb/s
> >> 2006-12-28 13:32:37.954 AFD: Opened codec 0x896f3a0, id(MPEG2VIDEO)
> >> type(Video)
> > 
> > You are not using the OpenChrome video acceleration, the
> > codec id would be MPEG2VIDEO_XVMC_VLD if you were using it.
> > 
> > Ask for help in the user's mailing list and CC me and
> > I'll try to help you diagnose the problem there.
> Thanks for the response Daniel.
> It seems odd, but I do quite often get the MPEG2VIDEO_XVMC_VLD to work
> and CPU load drops accordingly to a low value.
> I can't explain as to why it sometimes uses it and sometimes doesn't.
> As I tried to diagnose further, it seems to now (annoyingly, but nicely)
> pick MPEG2VIDEO_XVMC_VLD more consistantly.
> I don't really know what I did to fix this, but for the moment I'll keep
> quiet and hope for the best :)

There is a function in videoout_xv.cpp called
GetBestSupportedCodec(), this checks if it is possible to
use any video acceleration which has been configured. This
checks a few things: First, the video must use a supported
codec, either MPEG-2 or MPEG-1 for OpenChrome. Second, it
must be possible to allocate a video frame of the desired
size (some video accelerators only with with PAL/NTSC
resolutions and not with HDTV). Third, a XVideo port with
the required capabilities must be available.

The last requirement can become a problem. If MythTV or
another application that uses XVideo crashes it may leak the
XVideo port we need. This is due to a mistake the people who
wrote the XVideo specification made. They didn't allocate
device nodes in "/dev" for the ports, so Linux and other UNIX
like kernels can't clean up properly after a crash; the
application has to do it, and sometimes it can't. When this
happens the only solution is to exit Xorg and unload and then
reload the video output driver module. I don't know if this
works with OpenChrome, but this works with the nVidia drivers.

> I had the same recording using MPEG2VIDEO and
> MPEG2VIDEO_XVMC_VLD on two successive "plays".
Hmmm, that sounds odd; nothing else played video in-between?

-- Daniel

More information about the mythtv-dev mailing list