Probably the one thing, judging by people's statements in the many Mac forums, that makes people upgrade to Intel more than any other is HD video playback. They say their old Powerbook/Powermac is too slow, playback is choppy, or even [shiver] slideshow-esque. But in my extensive studies;) on this issue, I've found this isn't only a hardware question. There is a software component that many people aren't adequately exploring.
It should be noted right here, though, that if you're talking about flash video streamed in HD over the internet, you're most probably permanently out of luck. Flash is dead on PPC, and it was never any good when in active development, and HD video pushes it past the edge on everything except maybe a G5 quad.
But if you're talking about H.264 files like mp4's and mkv's, you may be in luck. By now you've probably tried Quicktime with the Perian plug-in or VLC and found the results lacking. Playback stutters, your computer's too slow, and you're back to square one. However, there's another player that's much more CPU efficient called mplayer, specifically, running the mplayer binary from the command line.
You can download a GUI version, MPlayer OSX, that's a bit long in the tooth here (UPDATE: a newer binary is available inside this app package). Maybe you've tried it before and didn't like it because the GUI was old. But the real strength of mplayer is the many parameters you can use from the command line. There are literally hundreds, too many to fit into a GUI, and a few of them greatly enhance playback on slower computers.
So the point of the above download is not to use the GUI, but to extract the binary by control-clicking on the app and choosing "Show Package Contents." Open Contents-->Resources-->External_Binaries and control-click on "mplayer_ppc.app" if you're on a G4 or "mplayer_noaltivec.app" if you're on a G3. Choose "Show Package Contents" again and open Contents-->MacOS and there's your binary. Duplicate "mplayer" and move it somewhere convenient like your desktop or applications folder. Other people say create a symlink to your /usr/local/bin, but my system doesn't have that folder, and now is not a good time for me to break my system so I'm gonna steer clear of that, thanks very much. I just put it in my applications folder and invoke it with /Applications/mplayer in Terminal.app. Luckily I don't have to type this out every time as I can hit the up arrow key to cycle through my previous commands.
Now let's fire up mplayer and experiment with its parameters. The simplest way is to enter /Applications/mplayer in the terminal, then add a space, then drag the file you want to play onto the terminal window. You will now notice the path to file has been printed after the final space like this:
/Applications/mplayer /Users/username/Desktop/themostgodawfultabooyoucanthinkof.mp4
Now press return and a window should arise playing the movie. And there are several keys to control playback, a listing of which is here. Arrow keys for moving backward and forward, f for fullscreen, q for quit, etc. No command-key necessary.
At this point, you'll say, "Great, but it's not that much different than VLC or Quicktime. It still stutters." That's because you're not using any parameters (slapping you upside the head). Now try this (all on one line):
/Applications/mplayer -really-quiet -framedrop /Path/To/File (no space between -really and -quiet)
(Incidentally, you can download a Star Trek trailer here that we can use as a common reference. It's a 720p mp4, and it's dubbed in Spanish!)
The -really-quiet is for reducing the output in the terminal window as the movie plays. The -framedrop is to skip late frames and keep the audio in sync.
Now you may say it's a little better, but still not there. Well, it's a little better than VLC/Quicktime because there's no GUI taking away CPU cycles. It only displays the movie itself. Quick demonstration: Play a movie in MPlayer OSX PPC and open Activity Monitor (or run top if you prefer). Notice how there are two entries, one "MPlayer Window" (the video itself), and the other "MPlayer OSX PPC" (the GUI). Notice the GUI using an additional percentage of your CPU in addition to the movie playing?
Now let's go back to the command line and add another parameter like this (again on one line):
/Applications/mplayer -really-quiet -framedrop -lavdopts skiploopfilter=all /Path/To/File
With the above Star Trek trailer, I can now view it stutter-free on a 1.5 GHz G4 Powerbook, something I can't do with VLC or Quicktime. However, you may not have a 1.5 GHz G4, and you still can't see smooth playback. Is there anything else you can do? Yes, with a qualification. You can add another option to the -lavdopts parameter, skipframe=nonref, that will reduce CPU usage by about 50% by skipping some frames to decode. This will result in something of a blinky effect like you're looking at an old zoetrope, but it makes a lot of files playable that weren't before. You can try it and see if your eyes adjust to it or not. Enter this (all on one line):
/Applications/mplayer -really-quiet -framedrop -lavdopts skiploopfilter=all:skipframe=nonref /Path/To/File
Also, I don't have a dual processor to test this on, but you can assign two threads for decoding with the -lavdopts option "threads=2" so it would read (all on one line):
mplayer -really-quiet -framedrop -lavdopts skiploopfilter=all:threads=2 /Path/To/File
So there you have it, the tools necessary to run HD video on your PPC Mac. There is one minor hitch in that the binary we used above is from December, 2006, and although it works with almost any file you throw at it, it doesn't correctly decode some newer AVC files. So the only solution here is to get an up-to-date binary, which you can only do by compiling it yourself, which I have no idea how to do. So I'll be writing a future post on my adventures or misadventures in compiling, depending on how things go.
One last thing. I noticed on a Sawtooth with an ATI Rage 128 Pro video card, the option -vo quartz is less demanding on the CPU than the default CoreVideo, but there's no difference on an aluminum Powerbook. My guess is it's because the Sawtooth's video card is not Quartz Extreme capable, but in any event you might want to use -vo quartz if you're running on a calcified card like the Rage 128.
Saturday, May 21, 2011
Thursday, May 5, 2011
An eDonkey That Plays With Tiger
UPDATE: Somewhere in the time since this post was written, aMule released a new version 2.3.1 which resumes support for Tiger. Cool!
I was looking for an eDonkey client because I wanted to try out eD2k links to quench my thirst for old movies that you can't find anywhere else but, well, the eDonkey network. I had used aMule a few years ago, but I only used it to download through searching the network through the client. I never got around to downloading directly through eD2k links. So I went searching for the latest version but found it required Leopard (An OS Too Far) and couldn't immediately find the last version for Tiger.
Well, after much searching and scouring, I found the download link to aMule 2.2.5 here. Download the "aMule-2.2.5-OSX10.4+.dmg" file. It's a universal binary and it runs on Tiger. Happy hunting.*
*And on the whole downloading-copyrighted-material thing, I sort of go by the copyright laws we had before Hollywood money bought off Washington and purchased legislation to ensure Disney owned Mickey Mouse's copyright into perpetuity. If the makers of a movie, for example, are all long dead, I think it's okay to download a TV rip, at least.
I was looking for an eDonkey client because I wanted to try out eD2k links to quench my thirst for old movies that you can't find anywhere else but, well, the eDonkey network. I had used aMule a few years ago, but I only used it to download through searching the network through the client. I never got around to downloading directly through eD2k links. So I went searching for the latest version but found it required Leopard (An OS Too Far) and couldn't immediately find the last version for Tiger.
Well, after much searching and scouring, I found the download link to aMule 2.2.5 here. Download the "aMule-2.2.5-OSX10.4+.dmg" file. It's a universal binary and it runs on Tiger. Happy hunting.*
*And on the whole downloading-copyrighted-material thing, I sort of go by the copyright laws we had before Hollywood money bought off Washington and purchased legislation to ensure Disney owned Mickey Mouse's copyright into perpetuity. If the makers of a movie, for example, are all long dead, I think it's okay to download a TV rip, at least.
Saturday, April 9, 2011
TenFourFox Final vs. Beta 12
On the TenFourFox development blog, the 4.0 final release came with a caveat that a last minute bug fix caused a 10% to 15% slowdown in javascript performance (stability wins over speed). This bug wasn't present in the betas, just the release candidate. The developer then released another quickie update that he said largely corrected the speed hit, so I wanted to check out which was faster, the last beta (12) or the updated final release (4.0s).
I tested both browsers with Sunspider and here were the results (lower number is faster):
Beta 12 - 7392.0 ms
4.0s - 7724.3 ms
Yeah, I know, but I'm on a Sawtooth. Cut me some slack.
Then I went over to Dromaeo, and the results were (higher number is faster):
Beta 12 - 18.89 runs/sec.
4.0s - 16.78 runs/sec.
So in Sunspider, the beta's javascript performance remains about 4% faster than the final, and slightly faster still in Dromaeo, though these results aren't always absolutely consistent when repeated. However, the beta was consistently very slightly faster.
So should you use the beta instead of the final? Well, the final had security fixes, but I have a need for speed so I'll stick with the beta.
Danger is my middle name.
Addendum: Lest you think the final release is some kind of slouch, it still beats the pants off Firefox 3.6, whose Sunspider score was 18786.2 ms, a full two and a half times slower. So if you're using Firefox 3.6 and not TenFourFox, then you probably haven't read this far yet 'cause your renderer is so slooooooooow.
I tested both browsers with Sunspider and here were the results (lower number is faster):
Beta 12 - 7392.0 ms
4.0s - 7724.3 ms
Yeah, I know, but I'm on a Sawtooth. Cut me some slack.
Then I went over to Dromaeo, and the results were (higher number is faster):
Beta 12 - 18.89 runs/sec.
4.0s - 16.78 runs/sec.
So in Sunspider, the beta's javascript performance remains about 4% faster than the final, and slightly faster still in Dromaeo, though these results aren't always absolutely consistent when repeated. However, the beta was consistently very slightly faster.
So should you use the beta instead of the final? Well, the final had security fixes, but I have a need for speed so I'll stick with the beta.
Danger is my middle name.
Addendum: Lest you think the final release is some kind of slouch, it still beats the pants off Firefox 3.6, whose Sunspider score was 18786.2 ms, a full two and a half times slower. So if you're using Firefox 3.6 and not TenFourFox, then you probably haven't read this far yet 'cause your renderer is so slooooooooow.
Saturday, April 2, 2011
Tuesday, March 29, 2011
Replace TenFourFox Icon
So I'm reading people are loving the new TenFourFox, Firefox 4 custom made for PPCs on Tiger, except for one nagging issue. They don't like the icon. I know. Some people are very particular about this. I don't know what to say. It's not the ugliest icon I've ever seen. That award goes to the original icon for Phoenix Slides. In fact, I kind of like it. It has a certain kind of whimsy.
But being that people shouldn't have a stupid icon separating themselves from probably the most valuable piece of software you can run on Tiger, here's a quick tutorial on changing it. This will also apply to changing the icon to any other application.
Step 1) Choose the image file you want to use. Here's a sample png you can download. It's the Firefox globe without the tasty critter:

Step 2) If your image file isn't already in .icns format, you need to convert it using img2icns.app (link goes to the Tiger version). It's very simple, just drag and drop. You should now have your .icns file.
Step 3) Right+click or control+click on TenFourFox.app and choose "Show Package Contents." Go into Contents --> Resources, and there you will find a file called firefox.icns. Rename it something like firefox-old.icns, then name your replacement icon firefox.icns and move it into the same folder.
Step 4) Close everything and start up Firefox (if you already had it in your dock, you should remove it first). You should see your new icon.
But being that people shouldn't have a stupid icon separating themselves from probably the most valuable piece of software you can run on Tiger, here's a quick tutorial on changing it. This will also apply to changing the icon to any other application.
Step 1) Choose the image file you want to use. Here's a sample png you can download. It's the Firefox globe without the tasty critter:
Step 2) If your image file isn't already in .icns format, you need to convert it using img2icns.app (link goes to the Tiger version). It's very simple, just drag and drop. You should now have your .icns file.
Step 3) Right+click or control+click on TenFourFox.app and choose "Show Package Contents." Go into Contents --> Resources, and there you will find a file called firefox.icns. Rename it something like firefox-old.icns, then name your replacement icon firefox.icns and move it into the same folder.
Step 4) Close everything and start up Firefox (if you already had it in your dock, you should remove it first). You should see your new icon.
Wednesday, March 16, 2011
Update Your Mactubes
I've written a bit about Mactubes for OS X before. It's among the best kept secrets for PPC users as it allows smooth playback of Youtube videos even on something as low end as a Sawtooth. All you do is choose Quicktime for playback in the preferences, and Mactubes ignores the flash wrapper and plays back the videos as mp4 files. Much much easier on the CPU.
However, there's a chink in Mactubes's armor. Every once in a while, Youtube changes something in the urls Mactubes uses to retrieve the mp4's, causing Quicktime playback to go dead. You get a popup alert saying something like, "Can not open video. Please open URL with browser." Luckily this is a temporary problem as all it requires is a minor update from the developer, and everything's fixed. And luckier still, the developer is very prompt about providing updates for when this happens.
So anytime Mactubes gives you a popup alert like the above, wait a day or two, and by then the developer will likely have an updated version for you to download. And we can all safely return to wasting hours and hours watching random videos on the internet:)
However, there's a chink in Mactubes's armor. Every once in a while, Youtube changes something in the urls Mactubes uses to retrieve the mp4's, causing Quicktime playback to go dead. You get a popup alert saying something like, "Can not open video. Please open URL with browser." Luckily this is a temporary problem as all it requires is a minor update from the developer, and everything's fixed. And luckier still, the developer is very prompt about providing updates for when this happens.
So anytime Mactubes gives you a popup alert like the above, wait a day or two, and by then the developer will likely have an updated version for you to download. And we can all safely return to wasting hours and hours watching random videos on the internet:)
Tuesday, March 1, 2011
Getting Conky To Display Your iBook or Powerbook Battery
I couldn't figure out how to get Conky, a lightweight system monitor for Linux, to display the battery charge on the G3 iBook given that most of the example conkyrc files I saw were for the Intel architecture and used ACPI or APM for power management and monitoring, neither of which is utilized on PPC machines. So off to Google I went.
Long story short, if I knew to google "conky pb_battery" it would have saved me a whole lot of time. It turns out you need to insert the variable pb_battery in your conkyrc file like this: under the TEXT section at the bottom insert {pb_battery percent} in the appropriate spot accompanied by whatever text you want displayed with it, like "Battery:" so that it displays out "Battery: 93%" or somesuch.
percent isn't the only item within the variable you can display. There's also status and time. status shows whether the battery is "fully charged, charging, discharging, or absent (running on AC)."* time shows "the time remaining until the battery will be fully charged or discharged at current rate."* Note that under percent and time, nothing will be displayed if battery is fully charged or is running on AC power. Also note that you can only specify one item. Your variable must read either {pb_battery percent} or {pb_battery status} or {pb_battery time}.
Or if you want to do all this commando style, you can monitor your battery from the command line. Just type cat /proc/pmu/battery_0, and you'll get the output you want.
*Quotes taken from Conky's website.
One last note: the monospace font makes it look like there's a space between "{" and "pb_battery". There isn't. Just copy and paste for the right syntax.
Long story short, if I knew to google "conky pb_battery" it would have saved me a whole lot of time. It turns out you need to insert the variable pb_battery in your conkyrc file like this: under the TEXT section at the bottom insert {pb_battery percent} in the appropriate spot accompanied by whatever text you want displayed with it, like "Battery:" so that it displays out "Battery: 93%" or somesuch.
percent isn't the only item within the variable you can display. There's also status and time. status shows whether the battery is "fully charged, charging, discharging, or absent (running on AC)."* time shows "the time remaining until the battery will be fully charged or discharged at current rate."* Note that under percent and time, nothing will be displayed if battery is fully charged or is running on AC power. Also note that you can only specify one item. Your variable must read either {pb_battery percent} or {pb_battery status} or {pb_battery time}.
Or if you want to do all this commando style, you can monitor your battery from the command line. Just type cat /proc/pmu/battery_0, and you'll get the output you want.
*Quotes taken from Conky's website.
One last note: the monospace font makes it look like there's a space between "{" and "pb_battery". There isn't. Just copy and paste for the right syntax.
Subscribe to:
Posts (Atom)