Page 1 of 1

High-def h.264 video is rumping my server's hump

Posted: 2007-10-03 02:30pm
by Uraniun235
My "home theater" setup at home consists largely of a digital projector connected to my web/file server. The server is running a ~2.5GHz P4.

XVID-encoded high-def video (~720p) doesn't hugely stress the CPU, but h.264-encoded video of a similar resolution is semi-choppy and pegs CPU usage at max.

Is this sort of performance to be expected with my CPU or is there some sort of configuration issue here?

Posted: 2007-10-03 03:01pm
by Praxis
H.264 seems to take the most processor usage of the formats I've used.

When I encode for my iPod, the iPod's processor can't handle H.264 with a bitrate higher than 1500 but it can handle MPEG-4 up to 2500. Since anything that can play H.264 usually can play MPEG-4, I usually save everything as MPEG-4.

Posted: 2007-10-03 03:06pm
by Beowulf
Um... yeah. It's to be expected. You'll need a better processor in there to manage the load you're trying to put on it. H.264 requires more processor power for a given bitrate than MPEG-4. It gives a better picture at a given bitrate than MPEG-4 though.

Posted: 2007-10-03 05:54pm
by Stark
Are you sure? h264 is grunt-hungry, but a P4 2.4ghz not being enough? I guess I need to play with HD content more, but that seems a little extreme. I mean, 'my iPod can't handle it' is absurd next to 'this desktop can't handle it'.

Posted: 2007-10-03 06:28pm
by phongn
Stark wrote:Are you sure? h264 is grunt-hungry, but a P4 2.4ghz not being enough? I guess I need to play with HD content more, but that seems a little extreme. I mean, 'my iPod can't handle it' is absurd next to 'this desktop can't handle it'.
When playing 720p content, my 2.2GHz dual-core Opteron pegs 30-50% on both cores using the fastest H.264 decoder on the market (CoreAVC ... which is technically inaccurate). The more accurate decoder in ffdshow uses up even more CPU power.

I'd hate to think what a high-bitrate CABAC H.264 1080p file would do to my poor machine :(

Posted: 2007-10-03 06:32pm
by Stark
phongn wrote: When playing 720p content, my 2.2GHz dual-core Opteron pegs 30-50% on both cores using the fastest H.264 decoder on the market (CoreAVC ... which is technically inaccurate). The more accurate decoder in ffdshow uses up even more CPU power.
Holy shit. That's fucking crazy.

Posted: 2007-10-03 06:39pm
by phongn
Stark wrote:Holy shit. That's fucking crazy.
Just for completeness' sake, I tried playing a complex scene (a large flock of birds in a documentary) and both cores went to 75%+ :shock:

EDIT: There's a good discussion on the complexity of H.264 on Ars, from Feb. 2007. MrNSX is an ATI engineer, IIRC. In short: a Core 2 E6300 trying a 25 megabit CABAC-encoded 1080p H.264 file was dropping frames (IIRC, he sustained about 28fps on a 30fps file). Now imagine a 30-40mbit file that also has to be decrypted (BD, HD-DVD), with overlaid video as well, etc.

Posted: 2007-10-03 06:44pm
by Stark
Just stop it you're hurting me.

Given I'm a complete HD/codec/video noob, what is it about h264 that makes it so processor intensive? I use it for ~400MB TV show eps ripped from DVD, and while I notice a difference from (say) xvid, I had no idea it scaled like that with HD content.

Posted: 2007-10-03 06:55pm
by phongn
Stark wrote:Just stop it you're hurting me.
:mrgreen:
Given I'm a complete HD/codec/video noob, what is it about h264 that makes it so processor intensive? I use it for ~400MB TV show eps ripped from DVD, and while I notice a difference from (say) xvid, I had no idea it scaled like that with HD content.
It's just a lot more complex, that's all. Remember that 720p is already higher resolution by a factor of 2.67X compared to 480p (so figure about that much more CPU time) and then add the much greater complexity of H.264 on top of that and CPU usage can shoot through the roof.

Then add in more sophisticated coding schemes to improve the bitrate and you can see what happens ...

EDIT: Fortunately, GPUs are starting to be able to decode H.264 natively, greatly reducing CPU load

Posted: 2007-10-03 07:24pm
by Master of Ossus
The best idea would be to get a modern GPU that supports H.264. Any of the nVidia 8000 series, for example, will significantly decrease CPU load.

Posted: 2007-10-03 07:27pm
by Stark
Doesn't Phong-baby have an 8000-series?

Posted: 2007-10-03 08:18pm
by phongn
Master of Ossus wrote:The best idea would be to get a modern GPU that supports H.264. Any of the nVidia 8000 series, for example, will significantly decrease CPU load.
The 8800 will help somewhat, but lacks some of the H.264 decoding hardware that the 8500 and 8600 have.
Stark wrote:Doesn't Phong-baby have an 8000-series?
7800GT

Posted: 2007-10-04 12:47am
by Praxis
Stark wrote:Are you sure? h264 is grunt-hungry, but a P4 2.4ghz not being enough? I guess I need to play with HD content more, but that seems a little extreme. I mean, 'my iPod can't handle it' is absurd next to 'this desktop can't handle it'.
I remember that my 2.6 GHz P4 couldn't handle anything over 720p and even 720p didn't have a smooth framerate.