Bug? Anomalous CPU usage when playing HDTV clips.
No joy on the users list, so I'm moving over here. Hope someone has the expertise to track this down. First let me say that I have verified that xv is working for output and have verified that X has minimal CPU utilization on more ordinary video clips. I have some clips I generated using a pcHDTV card. The capture resolution is 720p (1280x720 @ 60fps). When playing these clips, CPU utilization by X server jumps to 55-60%! mplayer cpu utilization hums along at about 35-40%. Since I knew that more ordinary streams did not exhibit this problem, I decided to narrow the variables by re-encoding the stream at various resolutions and frame rates. I eventually created a stream that I can demonstrate a 10x increase in CPU utilization (by the X server) by changing the playback frame rate by 30%. e.g. test.avi is a re-encoding to 1024x576 @ 60fps $ mplayer -nosound test.avi > /dev/null Causes the X server to use 20% of the CPU $ mplayer -fps 40 test.avi > /dev/null Causes the X server to use 2% of the CPU $ mplayer -fps 30 test.avi > /dev/null Causes the X server to use 1.25% of the CPU Note that X server cpu usage runs from .5% to 1% when mplayer is NOT running. This could well be an X server problem. But I wanted to report here because the behavior is so strange, I suspect the problem is some odd interaction between mplayer and X. System is (laptop) Pentium-M 1.4Ghz with a Radeon Mobility M9. Note that I have run the same experiments on 2 other configurations with very similar results. 1. P4 2.6Ghz with Radeon 9200SE 2. P4 2.6Ghz with integrated Intel chipset (865G) Anyone out there have any theories? Want me to run other tests? Want access to the test clip? Its 20M. I can upload it to ftp://mplayerhq.hu/MPlayer/incoming/ if anyone would like to see this firsthand. MPlayer spam... (from P4 2.6, integrated Intel graphics) MPlayer 1.0pre3-3.3.2 (C) 2000-2003 MPlayer Team CPU: Intel Pentium 4/Xeon/Celeron Northwood 2594 MHz (Family: 8, Stepping: 9) Detected cache-line size is 64 bytes CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1 Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2 Reading config file /usr/local/etc/mplayer/mplayer.conf: No such file or directory Reading config file /home/jstebbins/.mplayer/config Reading /home/jstebbins/.mplayer/codecs.conf: Can't open '/home/jstebbins/.mplayer/codecs.conf': No such file or directory Reading /usr/local/etc/mplayer/codecs.conf: Can't open '/usr/local/etc/mplayer/codecs.conf': No such file or directory Using built-in default codecs.conf. font: can't open file: /home/jstebbins/.mplayer/font/font.desc Font /usr/local/share/mplayer/font/font.desc loaded successfully! (206 chars) Using Linux hardware RTC timing (1024Hz). Can't open input config file /home/jstebbins/.mplayer/input.conf: No such file or directory Can't open input config file /usr/local/etc/mplayer/input.conf: No such file or directory Falling back on default (hardcoded) input config Playing test.1024.60fps.avi. AVI file format detected. AVI_NI: No audio stream found -> no sound. VIDEO: [DIVX] 1024x576 24bpp 59.940 fps 3167.9 kbps (386.7 kbyte/s) Clip info: Software: MEncoder 1.0pre3-3.3.2 vo: X11 running at 1600x1200 with depth 16 and 16 bpp (":0.0" => local display) Disabling DPMS ========================================================================== Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4) ========================================================================== Audio: no sound Starting playback... VDec: vo config request - 1024 x 576 (preferred csp: Planar YV12) VDec: using Planar YV12 as output csp (no 0) Movie-Aspect is 1.78:1 - prescaling to correct movie aspect. VO: [xv] 1024x576 => 1024x576 Planar YV12 Successfully enabled DPMS Exiting... (End of file)
Hmm quite interesting. My quess is that the you may have reached AGP limit. Could you check your AGP tunning/speed? Best Regards Ivan Kalvachev iive --- John Stebbins <stebbins@jetheaddev.com> wrote:
No joy on the users list, so I'm moving over here. Hope someone has the expertise to track this down.
First let me say that I have verified that xv is working for output and have verified that X has minimal CPU utilization on more ordinary video clips.
I have some clips I generated using a pcHDTV card. The capture resolution is 720p (1280x720 @ 60fps). When playing these clips, CPU utilization by X server jumps to 55-60%! mplayer cpu utilization hums along at about 35-40%.
Since I knew that more ordinary streams did not exhibit this problem, I decided to narrow the variables by re-encoding the stream at various resolutions and frame rates. I eventually created a stream that I can demonstrate a 10x increase in CPU utilization (by the X server) by changing the playback frame rate by 30%.
e.g. test.avi is a re-encoding to 1024x576 @ 60fps
$ mplayer -nosound test.avi > /dev/null
Causes the X server to use 20% of the CPU
$ mplayer -fps 40 test.avi > /dev/null
Causes the X server to use 2% of the CPU
$ mplayer -fps 30 test.avi > /dev/null
Causes the X server to use 1.25% of the CPU Note that X server cpu usage runs from .5% to 1% when mplayer is NOT running.
This could well be an X server problem. But I wanted to report here because the behavior is so strange, I suspect the problem is some odd interaction between mplayer and X.
System is (laptop) Pentium-M 1.4Ghz with a Radeon Mobility M9. Note that I have run the same experiments on 2 other configurations with very similar results. 1. P4 2.6Ghz with Radeon 9200SE 2. P4 2.6Ghz with integrated Intel chipset (865G)
Anyone out there have any theories? Want me to run other tests? Want access to the test clip? Its 20M. I can upload it to ftp://mplayerhq.hu/MPlayer/incoming/ if anyone would like to see this firsthand.
MPlayer spam... (from P4 2.6, integrated Intel graphics)
MPlayer 1.0pre3-3.3.2 (C) 2000-2003 MPlayer Team
CPU: Intel Pentium 4/Xeon/Celeron Northwood 2594 MHz (Family: 8, Stepping: 9) Detected cache-line size is 64 bytes CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1 Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
Reading config file /usr/local/etc/mplayer/mplayer.conf: No such file or directory Reading config file /home/jstebbins/.mplayer/config Reading /home/jstebbins/.mplayer/codecs.conf: Can't open '/home/jstebbins/.mplayer/codecs.conf': No such file or directory Reading /usr/local/etc/mplayer/codecs.conf: Can't open '/usr/local/etc/mplayer/codecs.conf': No such file or directory Using built-in default codecs.conf. font: can't open file: /home/jstebbins/.mplayer/font/font.desc Font /usr/local/share/mplayer/font/font.desc loaded successfully! (206 chars) Using Linux hardware RTC timing (1024Hz). Can't open input config file /home/jstebbins/.mplayer/input.conf: No such file or directory Can't open input config file /usr/local/etc/mplayer/input.conf: No such file or directory Falling back on default (hardcoded) input config
Playing test.1024.60fps.avi. AVI file format detected. AVI_NI: No audio stream found -> no sound. VIDEO: [DIVX] 1024x576 24bpp 59.940 fps 3167.9 kbps (386.7 kbyte/s) Clip info: Software: MEncoder 1.0pre3-3.3.2 vo: X11 running at 1600x1200 with depth 16 and 16 bpp (":0.0" => local display) Disabling DPMS ========================================================================== Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4) ========================================================================== Audio: no sound Starting playback... VDec: vo config request - 1024 x 576 (preferred csp: Planar YV12) VDec: using Planar YV12 as output csp (no 0) Movie-Aspect is 1.78:1 - prescaling to correct movie aspect. VO: [xv] 1024x576 => 1024x576 Planar YV12
Successfully enabled DPMS
Exiting... (End of file)
_______________________________________________ Mplayer-advusers mailing list Mplayer-advusers@mplayerhq.hu http://mplayerhq.hu/mailman/listinfo/mplayer-advusers
__________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com
I've just got another (simplier) idea. It could also be connected with VSync (changing picture on retrace). You can test this by increaseing monitor vertical refresh rate. Or finding option to disable VSync. --- Ivan Kalvatchev <iive@yahoo.com> wrote:
Hmm quite interesting. My quess is that the you may have reached AGP limit. Could you check your AGP tunning/speed?
Best Regards Ivan Kalvachev iive __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com
On Fri, Mar 19, 2004 at 04:12:41AM -0800, Ivan Kalvatchev wrote:
I've just got another (simplier) idea. It could also be connected with VSync (changing picture on retrace). You can test this by increaseing monitor vertical refresh rate. Or finding option to disable VSync.
My guess is that the hardware only supports up to a certain image size natively, and the stupid drivers emulate scaling in software for larger images... Rich
I thought of that too. But there are a couple of things that make me think that there is some other problem here. One is that I can create the same symptoms by leaving the image size constant, and increasing the frame rate. The other is that xvinfo tells me that the max XvImage size is 2048x2048. xvinfo could be lying. I could be dealing with 2 unrelated problems. There could be a size limit (that xvinfo mis-reports) and a bandwidth limit (that appears to be around 54MB/s with the clips I've tried). I think I'm going to have to lock myself in a closet for a weekend with the source code and a debugger to figure this out. On Wed, 2004-03-24 at 22:45, D Richard Felker III wrote:
On Fri, Mar 19, 2004 at 04:12:41AM -0800, Ivan Kalvatchev wrote:
I've just got another (simplier) idea. It could also be connected with VSync (changing picture on retrace). You can test this by increaseing monitor vertical refresh rate. Or finding option to disable VSync.
My guess is that the hardware only supports up to a certain image size natively, and the stupid drivers emulate scaling in software for larger images...
Rich
_______________________________________________ Mplayer-advusers mailing list Mplayer-advusers@mplayerhq.hu http://mplayerhq.hu/mailman/listinfo/mplayer-advusers
participants (3)
-
D Richard Felker III -
Ivan Kalvatchev -
John Stebbins