Encoding on Dual 2.5Ghz G5 slow

HandBrake for Mac support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
lost21
Posts: 7
Joined: Thu Apr 26, 2007 4:47 pm

Encoding on Dual 2.5Ghz G5 slow

Post by lost21 »

When using HB 0.8.5b1 my encoding frame rate when using the HB-Ipod preset is only 10-11 FPS. The same movie using the older HB 0.7.1 at 1500 bit rate /640 res/ and H264 gives me 22 frames. What gives?

Is the Intel Core2Duo that much faster? or is HB 0.8.5 not optimized for the G5 processor :(
User avatar
s55
HandBrake Team
Posts: 10358
Joined: Sun Dec 24, 2006 1:05 pm

Post by s55 »

The advanced h264 options used on that profile will do that. It does however give much nicer videos out.
lost21
Posts: 7
Joined: Thu Apr 26, 2007 4:47 pm

Utilize more CPU?

Post by lost21 »

Any way to increase the CPU / treads being used. It currently only utilizes 120% when looking at the activity monitor?
deckeda
Enlightened
Posts: 138
Joined: Thu Feb 22, 2007 8:38 am

Re: Encoding on Dual 2.5Ghz G5 slow

Post by deckeda »

lost21 wrote:When using HB 0.8.5b1 my encoding frame rate when using the HB-Ipod preset is only 10-11 FPS. (
Sounds low. I get an avg. of 13 or so on my 2.0 G5, 10.5 if surfing the Net or something else. And that's with a 2-pass AppleTV preset. I have 150-167% CPU usage.

Make sure you aren't doing anything else on the Mac. Speaking of which ... gotta go now.
lost21
Posts: 7
Joined: Thu Apr 26, 2007 4:47 pm

Post by lost21 »

deckeda,
If I use the apple-tv preset I get 19fps. I read somewhere that others are getting higher rates with encoding for the apple tv than for the ipod preset. So I guess that is normal.
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: Utilize more CPU?

Post by jbrjake »

lost21 wrote:Any way to increase the CPU / treads being used.
Not in the Mac GUI, thought you could specify a number of threads for x264 to use in the preferences/preset creation (threads=8 for example).

Telling HandBrake how many threads to use is possible in the CLI, so it seems like this would make a reasonable thing to include in the Mac GUI's preferences. ( Or it would, if we weren't getting harassed every day by people who think having new stuff available, even hidden away in the prefs, is a Bad Thing. )

Now, whether or not you will see any difference using a higher number of threads than the CPU count HandBrake autodetects...that I cannot say.
lost21
Posts: 7
Joined: Thu Apr 26, 2007 4:47 pm

Post by lost21 »

That would be great if that was an option in the preference!.. No point in wasting idle CPU power
cvk_b
Veteran User
Posts: 527
Joined: Sun Mar 18, 2007 2:11 am

Post by cvk_b »

G5 Optimized 0.8.5b1
You can try my personal build with extra cflags for ppc970. Please post your results.
baggss
Moderator
Posts: 886
Joined: Tue Jan 02, 2007 8:21 am

Post by baggss »

Thanks, I will!
baggss
Moderator
Posts: 886
Joined: Tue Jan 02, 2007 8:21 am

Post by baggss »

WOW! That is a HUGE improvement on my Quad. Getting between 80 and 105FPS on a 320x240 1500k rip. I normally get 50-70 FPS on average. CPU is at 70% to 90% on all 4 cores.
cvk_b
Veteran User
Posts: 527
Joined: Sun Mar 18, 2007 2:11 am

Post by cvk_b »

baggss wrote:WOW! That is a HUGE improvement on my Quad. Getting between 80 and 105FPS on a 320x240 1500k rip. I normally get 50-70 FPS on average. CPU is at 70% to 90% on all 4 cores.
Great! How much L2 Cache per core do you have? You are the first person to give me ANY feedback on this build. I have an early Dual Proc G5 with only 512Kb of L2 (per processor) and I am really interested to see how the newer DualCore G5's perform. I was sure it would be more drastic improvement… Nice to see some confirmation.
baggss
Moderator
Posts: 886
Joined: Tue Jan 02, 2007 8:21 am

Post by baggss »

The Quad G5s have 1Mb per core.....
d70mac
Posts: 6
Joined: Thu Apr 26, 2007 5:08 am

Post by d70mac »

Since I'm not a coder, I figure I should do some of the testing. Hope this helps.

Test Scenario:

-I have dual 2.7GHz G5's and 3 GB of memory
-The test DVD is the original 1997 anamorphic "Contact".
-Chapter selected was 33 that is 4:42 in length (time).
-Besides my normal background processes and the version of Handbrake under test I also ran Activity Monitor.
-Processing was done directly from the original DVD.

Results:

Handbrake (Reg)
CPU Utilization = 165
Avg. FPS = 18.65
Resulting File size = 91,857,509 bytes

Handbrake (G5)
CPU Utilization = 191
Avg. FPS = 20.78
Resulting file size = 91,733,680 bytes

Both clips were indistiguishable. Basically, for a 15.76% increase in CPU utilization I was able to get an 11.42% increase in FPS. I'm wondering what the results would be if I could get CPU utilization to 190 with the release beta.

Let me know if I should test something else or if you want to change my methodology.
cvk_b
Veteran User
Posts: 527
Joined: Sun Mar 18, 2007 2:11 am

Post by cvk_b »

d70mac wrote:Since I'm not a coder, I figure I should do some of the testing. Hope this helps.

Test Scenario:

-I have dual 2.7GHz G5's and 3 GB of memory
-The test DVD is the original 1997 anamorphic "Contact".
-Chapter selected was 33 that is 4:42 in length (time).
-Besides my normal background processes and the version of Handbrake under test I also ran Activity Monitor.
-Processing was done directly from the original DVD.

Results:

Handbrake (Reg)
CPU Utilization = 165
Avg. FPS = 18.65
Resulting File size = 91,857,509 bytes

Handbrake (G5)
CPU Utilization = 191
Avg. FPS = 20.78
Resulting file size = 91,733,680 bytes

Both clips were indistiguishable. Basically, for a 15.76% increase in CPU utilization I was able to get an 11.42% increase in FPS. I'm wondering what the results would be if I could get CPU utilization to 190 with the release beta.

Let me know if I should test something else or if you want to change my methodology.
That was a great test. :) So your system is not dual core then? What settings did you use? How much L2 Cache per CPU does your system have? Again, thanks a lot.

If anybody else wants to help out the G5 Project here's some info that would GREATLY help:

Test at least 15 min somewhere in the middle of a disc.
Test from HardDisk
About your System:
  • # of CPU's
    DualCore = yes/no
    L2 Cache per/CPU
Use iPod Preset (this is a taxing preset and it's easy to make sure everyone is on the same page)
Info about source
FPS Increase/Decrease
Notes about CPU utiltization
cvk_b
Veteran User
Posts: 527
Joined: Sun Mar 18, 2007 2:11 am

Post by cvk_b »

baggss wrote:The Quad G5s have 1Mb per core.....
Wow, so that's 4 Megs total. x264 relies so heavily on L2. No wonder you got such a nice bump. Cool.
lost21
Posts: 7
Joined: Thu Apr 26, 2007 4:47 pm

Post by lost21 »

cvk_b wrote:G5 Optimized 0.8.5b1
You can try my personal build with extra cflags for ppc970. Please post your results.
Thanks! :D
Ok using the optimized G5 version of HB I now get 16 fps and the cpu usage is 190% much better! Hopefully more optimization can be done for the G5 ( I would really love to see 30fps)

so far a 45% increase from 11 to 16fps
lost21
Posts: 7
Joined: Thu Apr 26, 2007 4:47 pm

Post by lost21 »

:( Oh no! cvk_b
The volume on encoded file is very soft... did some setting get changed from the HB-Ipod preset?
lost21
Posts: 7
Joined: Thu Apr 26, 2007 4:47 pm

Post by lost21 »

lost21 wrote::( Oh no! cvk_b
The volume on encoded file is very soft... did some setting get changed from the HB-Ipod preset?
NEVER MIND!

Loose Nut Behind the Keyboard! :oops: or should I say loose cable to the speakers.
d70mac
Posts: 6
Joined: Thu Apr 26, 2007 5:08 am

Post by d70mac »

cvk_b wrote:That was a great test. :) So your system is not dual core then? What settings did you use? How much L2 Cache per CPU does your system have? Again, thanks a lot.
I used the AppleTV preset without changes and my system has 512K of L2 cache per processor board.
cvk_b
Veteran User
Posts: 527
Joined: Sun Mar 18, 2007 2:11 am

Post by cvk_b »

lost21 wrote:
cvk_b wrote:G5 Optimized 0.8.5b1
You can try my personal build with extra cflags for ppc970. Please post your results.
Thanks! :D
Ok using the optimized G5 version of HB I now get 16 fps and the cpu usage is 190% much better! Hopefully more optimization can be done for the G5
That's good news! The x264 presets included in the current HB are pretty Hardcore. Try creating your own presets for further speed. Hopefully more Altivec improvements will be made to x264. If they do (and I keep up with x264 svn, so I would notice) I will update.
d70mac wrote:
cvk_b wrote:That was a great test. :) So your system is not dual core then? What settings did you use? How much L2 Cache per CPU does your system have? Again, thanks a lot.
I used the AppleTV preset without changes and my system has 512K of L2 cache per processor board.
Sounds like your speed increase is in line with mine.
cbud
Bright Spark User
Posts: 181
Joined: Thu Feb 22, 2007 2:24 am

Holy Moly!!

Post by cbud »

I can't believe it!!! Is this possible?! 47%!!


Source: Last King of Scotland, ch 10?, ~7 min.
Preset: HB-iPod
FPS - 0.8.5b1/0.8.5b1-G5: 3.09/5.83
File Size (mb) - 0.8.5b1/0.8.5b1-G5: 85.33/85.29

Notes: CPUs for both around 90%. Quality looks the same.


Machine Name: iMac G5
Machine Model: PowerMac8,2
CPU Type: PowerPC G5 (3.0)
Number Of CPUs: 1
CPU Speed: 1.8 GHz
L2 Cache (per CPU): 512 KB
Memory: 512 MB
Bus Speed: 600 MHz
baggss
Moderator
Posts: 886
Joined: Tue Jan 02, 2007 8:21 am

Post by baggss »

Ok, a bit more info.

Movie: Kim (by Rudyard Kipling)
Ripping with the G5 optimized version:

Ripping the movie ay my self-built preset 320x240, 1200k with this version gave me an average Bit Rate of about 83 Fps and 85-90% average CPU usage across all 4 cores.

Ripping the same movie with my self-built preset 640x480 1500k resulted in 35 Fps. and 90-95% average CPU usage across all 4 cores.

Ripping with 0.8.5 B1:

Ripping the Movie with HB 0.8.5 B1 built in iPod preset results in about 8 Fps with about 45% average CPU usage across all 4 cores.

I see very little quality difference between rips 1 and 2. Waiting to see what rip 3 looks like.
cvk_b
Veteran User
Posts: 527
Joined: Sun Mar 18, 2007 2:11 am

Re: Holy Moly!!

Post by cvk_b »

cbud wrote:I can't believe it!!! Is this possible?! 47%!!
Glad to see my efforts weren't in vain. :mrgreen:
I posted to digg and got no interest at all. Guess everyone went intel…
Maybe my wording was too technical.
baggss
Moderator
Posts: 886
Joined: Tue Jan 02, 2007 8:21 am

Post by baggss »

Just another example. I ripped a single chapter of the above movie with the iPod preset that comes with 0.8.5 B1. 0.8.5 B1 gave me 8Fps and 35-40% Avg CPU use. The G5 version gave me 30Fps and 85 to 90% Average CPU usage.

IF that's not an improvement, I don't know what is.
cvk_b wrote:
cbud wrote:I can't believe it!!! Is this possible?! 47%!!
Glad to see my efforts weren't in vain. :mrgreen:
I posted to digg and got no interest at all. Guess everyone went intel…
Maybe my wording was too technical.
Just so you know, I have put the word out at a few Mac forums (iOnMac and Mac-Forums) and iLounge. I posted links to both your threads here, but for the download I put a copy on my server and linked to it.
Post Reply