[Solved] quicktime movie excessive CPU

Hi - hope you can help.

Purchased iScreensaver Pro a couple of days ago as my client required a short 30sec movie to be turned into a screen saver for both their mac and PCs.

However their IT dept has rejected the screen saver on the grounds that it’s too resource heavy.

The screen saver I originally created was at 1600 x 1000 pixels @ 24fps.

Deciding that it was possibly too large I’ve been experimenting and reduced the size to 768 x 480 with the video set to crop. There’s a big loss in quality but it would be acceptable.
Unfortunately they have also rejected the lower res version on the same grounds (excessive CPU usage) so have been trying a few things here on my mac.

I’ve noticed, that running a screensaver built with iScreensaver, containing nothing more than a 6mb h.264 quicktime movie uses upto (and over) 100% CPU. However the same movie running full screen it Quicktime only uses 12 - 15% CPU resource. Running a screensaver containing static images uses significantly less CPU (anywhere between 12 - 30%).

I tried halving the movie resolution again, down to a very pixelated 384 x 240, but it still uses too much CPU.

I’ve also tried different codes (h.264, jpeg, mpeg-4, etc) but nothing appears to drop the CPU usage.

Hopefully Im missing something obvious - how can I produce a video screensaver that uses significantly less CPU?
Is there an issue that can be fixed somewhere?

My client uses a wide variety of PCs and macs, but my own machines for testing purposes are:

  • late 2010 17" Mac book pro, 2.66 GHz intel core i7, 4GB ram, NVIDIA GeForce 330M graphics card with 512mb vram.
  • Mac Pro, 2 x 2.66 Dual Core Intel Xeon, 10GB ram, NVIDIA GeForce 7300 GT with 256mb vram.

Mac Book Pro is single screen (no external monitor attached). I’ve tried the mac pro with both one and two monitors.

Hope someone can help… I’m worried my client might not pay for my work including the cost of iScreensaver pro.

Thanks
Stef

Hi Stef,

Very good questions. As you have realized, it’s easily possible to overwhelm a computer’s CPU by playing back a large (high resolution) movie file. However, some of your measurements don’t make sense to me and I wonder if you are mis-mesauring or have some other misconfiguration.

Issue 1: test results:

File: Sigur Ros 1280x720p 25fps H264 (a high quality Sample video from the QuickTime site).
Mac: 2008 Macbook Pro (Core 2 Duo 2.2GHz). Mac OS X 10.6.6
iScreensaver Test:
Media Settings: Stretch “Actual Size”.
Results: aprox 40-45% CPU

QuickTime Player 7 Test:
Media Settings: “Actual Size”
Results: approx 50% CPU ()
(
) note that QuickTime Player actually uses 2 separate processed to decode video : you’ll see “QuickTime Player 7” using about 20% and “vdecoder” using another 30%.

So, while QuickTime Player may be better than in iScreensaver (due to some overhead) in some cases, in others it’s actually worse. You are reporting an 800% increase in CPU usage, which doesn’t make any sense, and you also reported that codecs don’t matter (this also makes no sense - PhotoJPEG is much better than H264 in terms of CPU usage).

Could you be mis-measuring the CPU usage?

Testing notes:

  • make sure you are testing the screensaver with nothing else running.
  • Do not test by watching it with the screensaver control panel open (since that causes an extra copy to be running).
  • to determine CPU, SSH into the mac and issue the “top” command.

Issue 2: codec choices.
By far the most efficient codec is PhotoJPEG – H264, while high compression, is also very high CPU. Try re-encoding your movie file using PhotoJPEG – the file will be much larger, but it also will dramatically reduce the CPU usage. Sometimes this size/cpu tradeoff is worth it.

Issue 3: stretch modes
Playing back a movie full-screen is often inefficient, since pixels must be stretched. We recommend “actual size” for highest performance – depending on the monitor size, the movie will be surrounded by background color, which may or may not be artistically OK.

Finally - feel free to contact us via email if you’d like us to test your video file on our test machines.

More data – the first tests were with using a MBP 15" / Core 2 Duo with an NVIDIA GEforce 8600M. This is a fairly old machine.

We repeated these tests on another mac : MBP 17" / Core Duo, with an ATI Radeon X1600. This is an even slower mac, although some folks think the x1600 is a better graphics card.

Results:
Using the 1280x720p / 25fps movie:
H.264: 50-60% cpu* when running either in Actual Size or Crop modes.
PhotoJPEG: 70-80% cpu.

  • all %s are given as the % for a single CPU. Thus, “50%” for a 2 CPU chip is really only 25% of the entire CPU being used. Note that Mac and Windows report these values differently (On mac, % values are reported as % of a single core, on Windows they are reported as % of the total CPU)

Conclusions:

  • Even 3 or 4 year old mac powerbooks can easily serve up a HD quality movie (720p) using roughly 25% of the total CPU power.

  • Codecs matter, though in our latests tests (using 10.6.6) we now see that QuickTime Movies using PhotoJPEG actually use more CPU than H.264, which is not what we used to see – this suggests some improvements in 10.6’s ability to decode H.264.

  • The stretch mode matters, a little bit. Actual size will almost always be fastest. Crop & Letterbox will be slower, typically.

Unused system resources are gone forever.

They should run from a USB stick as well as a DVD. Way less wear and tear than C: drive.

Mine can select a random video and a random segment to play. Then the next and next.

By hitting “enter enter” the SS switches to slow motion and back again. The interruption causes the video clip to play again.

If you have lots of video, like I do you need random to keep in touch with your video hoard.