CrabApple Forest |

Picking The Good Ones & Crabbing About The Bad Ones

FStream: Like a PVR for streaming audio and web radio

Thursday May 15, 2008

FStream is an interesting piece of software that has probably escaped the attention of many Mac OS X users in the English-speaking world, because its web site is entirely in French. It’s a small program that makes it possible to listen to, and to easily record Web radio stations and audio streams.

Features of FStream are as follows:

  • Decoding of streams in any of these formats: OGG Vorbis, AAC/AAC+, MP3, MMS (ASF for WMA)
  • Encoding of the streams to any of these formats: MP3, AAC, AIFF, WAV
  • Recognizes the Apple infrared remote control
  • Very low CPU usage
  • Minimalist Interface: Simple to use, and does not take much display space
  • Customizable interface
  • Great flexibility in recognition of streams (among other things, IceCast and ShoutCast streams)
  • Access to pre-selected lists (ShoutCast and SourceMac)

When they say minimalist interface, they aren’t kidding - there’s a lot more to this software than you might think at first glance. Normally, this is all you see on the screen:

FStream interface

We should note that if you don’t care for the basic style of the interface, there are a number of skins available for download. Anyway, when FStream is the foreground application and you press the SHIFT key, it changes color and now you are at the recording panel:

FStream recording panel

The button on the left hand side controls playing or pausing the stream unless the SHIFT key is depressed and you’re at the recording panel, in which case it starts or stops recording. Note that in the program preferences you can select whether pausing the audio will simply mute it, or will actually buffer it so that when you un-pause it will play the stream from where you left off (like a PVR). We wish this functionality wasn’t buried in the preferences, but instead was on two separate buttons (or a “split” button as is used on the right side), because there are times when we may want to pause but don’t care that much about what we’re listening to (as when it’s in the middle of a long commercial break) and other times when we really don’t want to miss the discussion on whatever talk show we’re listening to.

FStream pause options

As mentioned above, the button on the right hand side of the interface is split into two halves. Clicking on the lower half reveals a volume control slider:

FStream volume control slider

While clicking on the upper half brings up the main menu:

FStream main menu

From the main menu you can select Quick Open, which lets you enter (or paste) a stream URL directly:

FStream Quick Open

But most of the time, you’ll probably want to use the Streams Manager, which allows you to select any of a multitude of preset streams, or streams that you have previously saved:

FStream Streams Manager

FStream actually has a fairly comprehensive help file (accessed from the top menu bar, and yes, it’s in English if you’ve selected English as your primary language) and it would be a real good idea for you to scan through it if you want to utilize FStream to its fullest capabilities. Also, if you want to visit the author’s web site, we suggest using either Yahoo Babel Fish or Google Translate to translate the page to English (here are links to the translated main FStream page using Yahoo and Google).

FStream is a great FREE program, and it is the only one we know of that will give you the ability to pause live audio streams and/or record them for future listening. The only way it could be made better (other than the aforementioned suggested change in the pause control) would be to actually allow recording on a schedule, so that you could have it automatically start recording your favorite show at the time it begins (and stop when it ends), in case you aren’t home, or simply forget that the show is on. If there is a way to do this with FStream, we haven’t discovered it yet, but if you’ve figured out how to do it please leave a comment and share what you know!

Related posts


Comments Off

Use Folder Actions to make things easy as Drag and Drop

Wednesday May 14, 2008

As Apple describes it, “Folder Actions is a feature of Mac OS X that lets you associate AppleScript scripts with folders. A Folder Action script is executed when the folder to which it is attached is opened or closed, moved or resized, or has items added or removed. The script provides a handler that matches the appropriate format for the action…..”

What they are saying is that by setting up a Folder Action, you can run a script whenever any of the following occur:

  • the attached folder is opened
  • the window of the attached folder is closed
  • the window of the attached folder is moved or resized
  • items are placed into the attached folder
  • items are removed from the attached folder

What we’re going to show you here is how to use a folder action to make a folder that, when you drop an image file into it, will attempt to convert it to another format, in case you like to save all your images in the same format.

To start with, in Finder go to the location you want to create your “Drag and Drop” folder and right-click and select New Folder:

Finder - create a new folder

Rename the folder as you like (we called it “Convert to PNG”) and then right-click on the newly created folder and select “Enable Folder Actions” (note that you may have to navigate through the “More” selection, as shown here):

Finder - Enable Folder Actions

Once you have done that, right click on the folder again, and this time select “Attach a Folder action…”

Finder - Attach a Folder action...

A file picker will appear - you want to navigate to /Library/Scripts/Folder Action Scripts/ (note this is off your primary drive’s root folder, not your user folder) and then click on Choose:

Navigating to Mac HD/Library/Scripts/Folder Action Scripts/

Once you’ve chosen the Folder Action Scripts directory, choose the actual script to associate with the folder. In this case we’ve chosen Image - Duplicate as PNG.scpt:

Picking the script to associate with the folder

Now drag an image to the folder that’s not already a PNG (such as a GIF or JPG) and it should be converted to PNG. The original is not deleted, so you should find both inside the folder. As you may have noticed, there are also scripts that will “Duplicate as JPEG” and “Duplicate as TIFF”, so the possibilities exist to make “Drag and Drop” folders for those formats as well.

This just scratches the surface of what Folder Actions can do. Apple’s site has a section on Folder Actions, including a page showing how you can write your own Folder Action Scripts, and descriptions of the Folder Action Scripts found in /Library/Scripts/Folder Action Scripts/.

Apple’s site also has a couple of additional Folder Action Scripts that you can download and use if you wish. They are:

Archive Added Items - This script will make an archived copy, in ZIP format, of the individual items added to the attached folder. Archived files are placed in folder named “Done” within the attached folder.

Auto-backup Script - This script will automatically backup specified items any time a particular hard drive is mounted on the desktop.

In addition, if you search the web you can find other Folder Action Scripts that people have created.

We would be remiss if we did not mention that this is the Apple way to do things, and it’s always possible to do things differently. For example, in an article entitled “Use launchd to replace folder actions” at Mac OS X Hints, the author of that article notes that “Folder actions are quite slow, and on 10.5.x, I found them to be not really fun to play with. Another way to watch a folder is to create your own launchd script.” He then goes on to explain how to do that, though admittedly we didn’t quite follow what he was doing. He still winds up calling an AppleScript, but he uses a launchd script to actually watch the folder, and since our most recent previous article was about Lingon, which assists in creating launchd scripts, we thought we’d at least mention it so that the “true geeks” could try their hand at using that technique. As for us, we probably aren’t going to care all that much if it takes the Mac an extra second or so to notice that we dropped something into a folder!

Related posts


Lean on Lingon to launch scripts and applications

Sunday May 11, 2008

Lingon is one of those tools that at first blush may seem to be something only a true geek would love, but it’s actually fairly practical. What it does is to allow you to launch scripts or programs according to certain criteria. If you have previous experience with Linux or Unix, you can think of it as a way to set up something similar to a cron job, except that you have more flexibility.

One thing you can do is set up scripts or applications to launch at startup. Now, you may already know how you can launch applications at startup - you go into System Preferences, click on Accounts, and then (while your account is selected) click on Login Items. Once there, you can add or remove applications you want to launch at startup by using the + and/or - buttons. And, that’s the preferred way to launch an application at startup for the logged-in user.

But what if you want to launch an application based on some other criteria, or you want to launch a script of some kind? What if you need an application to start no matter which user is logging in? Or, what if you want to tweak an existing startup item that’s run by the system (as an agent or a daemon) and not by a particular user? That’s where Lingon comes in. Lingon lets you edit and create configuration files for launchd (and maybe you are asking, what is launchd? Well, according to Wikipedia, “launchd is a unified, open source service management framework for starting, stopping and managing daemons, programs and scripts.” Aren’t you sorry you asked?).

To give you an example of how Lingon can be used, we set it up to start the CallerIDpop perl script from the Michigan Telephone, VoIP and Broadband blog. This is a script used with Linksys/Sipura VoIP adapters (and some phones) that, when there is an incoming call, provides a Growl popup showing caller details and the time the call was received (it can also write this information to a log file). Previously we had been using their suggested method of running an AppleScript (saved as an application) at startup, the AppleScript containing the line that actually starts the Perl script. Although this works, it’s a fairly convoluted way to do it and it seems to eat up a lot of system resources. So, we set out to find another way to invoke the script at startup. Here’s how we did it using Lingon (which, by the way, seems to get the script running a lot quicker, and the script itself seems to be running in a more stable environment):

When you first fire up Lingon, you get this screen:

Lingon opening screen

Click the small button labeled “New” (with the + on the button) in the upper left-hand corner, and you get a dropdown as shown here:

Lingon dropdown

We selected “My Agents” because we only have one user account on that system, and didn’t really want the script to have root privileges. You should think long and hard about running anything as a daemon, because if anything goes wrong (whether due to programming error or malicious intent) the script will be running as root and can do just about anything to your system. Having selected that, we got this window:

Lingon main options window

As you can see, everything is fairly straightforward. In section 1 you give the agent a name, in section 2 you insert the command just as you would enter it if you ran it directly from a terminal window (or you choose the application to run, if you are running an application), and in section 3 you pick the options you want to use to trigger running the script or application. If you’re not sure about any of the options, click on Help (in the top menu bar) and then “Lingon Help” and it will bring up a PDF file in Preview that explains how to use Lingon. The Help menu also gives you access to the man pages for launchd.plist, launchctl, and launchd, in case you are making changes in any of those files.

Note the “Expert Mode” button in the lower right-hand corner - this shows you the actual XML code, and allows you to write keys and values directly if you are comfortable doing that.

Don’t forget to click the “Save” button at the top when you are finished - we forgot to do that and had to start all over! We sort of wish that the “Save” button were underneath the other three sections, maybe in a section 4!

Unfortunately, to make everything work properly you’ll have to log out and login again, or reboot your Mac, as Lingon will remind you:

Lingon restart warning

Not only can Lingon be used to make your own script or application launchers, but it can also be used to edit existing system agents and daemons. While you normally shouldn’t do this, if you know what you are doing it can sometimes improve system performance. On the other hand, if you don’t know what you are doing, you could render your system totally inoperable! As an example of why you might want to do this, we recommend you see the article, “The Case of the Slow Mac (and how to fix it)” at Maciverse. If you think that your Mac is running a bit sluggish, or if you’re seeing the “spinning beachball of death” a bit too often, this article explains one possible reason, and a suggested fix that’s much easier to make if you use Lingon.

Related posts


Weekend fun with free Cubes game

Friday May 9, 2008

The deal here is that you can go and download this free game called Cubes, which comes in Mac and Windows versions. The company behind it offers several other games but most of them are not free, and you can’t tell which are free and which are not from the main page. You should assume that if you are downloading a demo version of one of their games, you’ll only be able to play a limited number of times. We suspect that Grass Games is giving away Cubes in the hope that you’ll come back and perhaps download something else and buy it (and this is reinforced by the fact that you see an ad for another of their games when you exit Cubes), but as far as we can tell you can play Cubes as often as you want without payment or registration.

So, what is Cubes? It’s a falling brick game - in other words, it’s whole lot like a very popular computer game of Russian origin, that’s been around for at least a couple decades now. The game is highly configurable and has more options than you might expect, and while we couldn’t find any documentation, the effects of most options are fairly obvious. The nice thing is that you can pick the screen resolution you want the game to run in (up to 1920×1200!) and run it in full screen mode, or in a window (interestingly, there seems to be a bug where you have to select your desired resolution while full screen mode is selected, and only then switch to windowed mode). If you run it in full screen mode, the effect is much like playing on an arcade machine, except that the sound of your Mac’s fan screaming may alert you to the fact that your CPU is being pushed to the max (unless maybe you have a newer multi-core system). You can mitigate this somewhat by going into the options and under the “MISC” section, set the “PROCESSING POWER” to a lower value.

Cubes options

Our screenshot (showing the options selections) don’t really do the game justice, because we selected a low screen resolution to minimize page download time. They could have used a typeface that renders a bit better, but it’s not as cramped as it looks here if you’re using a decent screen resolution. Not that it matters when you’re playing the game - you’re looking at colored falling bricks, which could probably be successfully rendered on an old Apple II, though the overall effect wouldn’t be nearly as good as what you are getting here.

We do wish this game didn’t monopolize the CPU quite so much (we watched the Activity Monitor during one run in Windowed mode and Cubes was far and away the biggest user of CPU power, even making Firefox look like a lightweight), but then we did play it quite successfully on a dual-core Mac Mini without any apparent problem (well, except for the fact that Big Crab stinks at these kinds of games!)

Related posts


Two utilities let you explore Time Machine backups

Thursday May 8, 2008
Flux Capacitor
Creative Commons License photo credit: mac_vegetarian

Every so often we like to call your attention to some cool Mac-related articles, even if we didn’t write them. In this case, the articles cover a couple of ways to explore your Time Machine backups, and both of them are from the folks over at TidBITS. The first, “Prune Your Time Machine Backups Selectively”, tells you how to use a modified version of GrandPerspective to see which files are hogging space in your Time Machine backups. If any of these are files that don’t need to be backed up, you can exclude them from your Time Machine backups to make additional room for the files you do want to preserve.

GrandPerspective screenshot

The second explores a new command-line utility called tms, which is coincidentally enough written by Robert Pointon, who is also the author of the fseventer program that we reviewed previously. That article is called “Time Machine Exposed!” and it explains how you can use tms to get much more information about your Time Machine backups than has hitherto been available.

Now, we are not usually a big fan of command-line hacks here in the CrabApple Forest - if we’d wanted to use the command line we’d have stuck with MS-DOS! Mac users (moreso than, say, Linux users) seem to appreciate the value of a good Graphical User interface (GUI). So we are sort of hoping that either Mr. Pointon or someone else will write a GUI “front end” for tms sooner or later. But in the meantime, those of you who are into doing things from the command line, along with those who simply want to be able to delve into your Time Machine backups and find out “what’s in there”, will surely appreciate the information contained in the above-mentioned two articles.

Related posts