Technical Archives

Derrick Story

AddThis Social Bookmark Button

“Last weekend, I decided to expand Coverflow to work with my entire photo album,” said Erica Sadun in her recent post, Accessing all your onboard photos from your iPhone database. “This involved exploring the MusicLibrary and PhotoLibrary frameworks to find out how I could extract a complete set of albums and their pictures. The PLPhotoLibrary class proved to hold the key. With it, I could request an album list, and then build up a dictionary of photos that linked back from the image identifier to the album it came from.”

She then goes on to post the code on how to accomplish this. Quite nice.

Derrick Story

AddThis Social Bookmark Button

Todd Ogasawara has continued to publish his Mac FFOSS (Freeware/Free and Open Source Software) column on O’Reilly’s Mac Center. If you’ve fallen behind on what’s new (and cheap) in the Mac universe, you might want to hop over there for a peek.

Derrick Story

AddThis Social Bookmark Button

Erica Sadun has posted a raft of excellent iPhone technical shorts on O’Reilly’s Digital Media Mac Blog. Topics include Programmatically Handling iPhone interruptions, Creating an UIImage from a URL, and plenty more.

If you’re an “under the glass” iPhone type, you should definitely check out what Erica has been writing about lately.

Gordon Meyer

AddThis Social Bookmark Button

I’ve previously written about how I use Radioshift as part of my home automation setup. However, in the last week or so I’ve been using it as a desktop application, as it’s intended, instead.

And frankly, it’s driving me crazy. I’m continually running into two problems:

First, the show streams from KGO-AM are seriously messed up. Without exception, about half-way through the recording, the first 10 minutes of the show repeats. Sometimes this happens more than once. After the repeated segment, the show picks up where it was before the flashback. It’s frustrating, and I’ve reported the problem to Radiotime (the provider of the streams), but it is exacerbated by Radioshift’s interface.

Which is the second problem. Although Radioshift is sometimes described at “TiVo for radio,” it really doesn’t offer many playback controls at all. There’s no “resume playback” feature, so if you stop listening to a show, you can’t get back to where you left off. Not only does Radioshift not remember your stopping point, it does not offer any controls for navigating the recording. No rewind. No fast-foward.

Dock.jpgBut there’s an easy workaround that you can use until Rogue Amobea addresses this oversight. Specify QuickTime Player as your “audio editor” in Radioshift’s preferences. Then, when you want to listen to a show, click “Edit Audio” to automatically open the recording in QuickTime Player.

This works exceptionally well because QuickTime Player, even without buying QuickTime Pro, provides almost all the playback controls that Radioshift lacks. My favorite is that the fast-forward button, if held down while the audio is playing, allows you to skim ahead and easily skip over commercials.

If you do have QuickTime Pro, you can use the AV Controls to speed up the playback of talk shows. Simply open the AV Controls window, then adjust the Playback Speed setting. I use about 1.5X faster. Then, adjust the Pitch Shift slider until the voices sound normal again. It’s really quite amazing and a great time saver.

qt_avcontrols.jpg

Finally, don’t forget that you can also skip to points in the recording by dragging the playhead. If you want to temporarily mark a point in the recording for later review, use the “I” and “O” keys during playback to set selection markers in the QT window (QT Pro required).

I hope these tips help you get more out of Radioshift. If you have one of your own to share, please leave a comment.

David Battino

AddThis Social Bookmark Button

A former Apple engineer told me the iTunes team is adding features faster than they can be documented. Here’s one I’ll be using a lot: a way to re-download deleted podcasts.

Occasionally, podcast episodes don’t download completely. This happens to me a lot with This American Life, and it recently happened with my own podcast, Digital Media Insider (home page | iTunes link). So I figured I’d delete the partial download and try again. But I couldn’t get it back. iTunes didn’t show the deleted episode when I clicked “Update Podcast”:

itunes episode 13 gone

Unlucky 13: After deleting the partially downloaded episode 13, I couldn’t get it back. Right-clicking and selecting “Update Podcast” wouldn’t display the missing episode.

The secret, I learned at KD Murray’s site, is to collapse the episode list by clicking on the disclosure triangle next to the podcast’s name and then to Option-click the triangle again. That expands the episode list and shows the missing episodes in gray with a “Get” button next to them:

itunes episode 13 back

Option-clicking the disclosure triangle next to the podcast’s name reveals the missing episodes.

Now, normally you wouldn’t want to re-download episodes you’d deleted, so I can sort of understand why this feature is hidden, but by using it on some other shows to which I subscribe, I discovered episodes I didn’t realize I’d missed. And the partial-download problem is probably fairly common, so it might be nice to have a “repair podcast” menu option. Or better, since the duration of the podcast should be recorded in the XML file, make iTunes smart enough to re-download truncated episodes itself.

What “hidden” iTunes features have you found?

David Battino

AddThis Social Bookmark Button

When I want to concentrate on a computing task, I often invoke the Finder’s “hide others” command by Command-Option-clicking on an icon in the Dock. But my screen is so big and my desktop so cluttered that merely hiding the other applications is hardly restful.

In less time that it would take to clean up the piles of icons on my desktop, I whipped up this AppleScript and mapped it to a function key. It grabs the path of the frontmost application, launches Katsura Shareware’s free Screenshot Helper — hiding everything on the desktop — and then switches back to the original app.

(* 
db Hide-the-Desktop
By David Battino, Batmosphere.com, 2007-09-30 
This script hides the desktop and then switches back to the previous app.
Requires Screenshot Helper, free at www.katsurashareware.com.
*)

set front_app to (path to frontmost application as Unicode text)

tell application "Screenshot Helper"
	activate
end tell

tell application front_app
	activate
end tell

Hopefully your virtual desktop is tidier than mine, but you may still find the “do something and then switch back” routine helpful.

Katsura Screenshot Helper

Katsura Screenshot Helper covers your messy desktop with a pure color or photo.

Gordon Meyer

AddThis Social Bookmark Button

So far, I’m pretty much enamored of Rogue Amoeba’s new Radioshift application. If you haven’t tried it yet, it allows you to easily listen to, and record, radio shows from around the world. It makes automatically recording new episodes of a show, or “subscribing,” as simple as TiVo does for television programs.

I think Radioshift would be a wonderful addition to my home, and I want to run it on the Mac that I already use for home automation. However, Radioshift isn’t really optimized for use in a “server” situation. That’s understandable, but it hasn’t stopped me from tying to bend it to my will anyway. Here’s are notes on my progress so far:

• I love that Radioshift uses a background process for recording shows that you’ve subscribed to. This means that you don’t have to leave the app running all of the time. You can use the sound files directly, without opening Radioshift, too. You’ll find your recorded shows in the ~/Music/Radioshift/ folder.

• I want to listen to my recorded shows using another computer, because the home automation Mac is tucked away in a corner and I rarely use it directly. Radioshift doesn’t have any built-in support for sharing, but I can load the above-mentioned files into QuickTime Player (or similar) after mounting the server’s drive. The bonus prize for doing this is that QuickTime Player allows you to fast forward during playback, to skip commercials, which is a feature that Radioshift currently lacks.

• If you don’t care about skipping commercials, just use the Finder’s built-in ability to play QuickTime files, as shown below. Very handy!

Radioshift.jpg

• Radioshift does, apparently, have the ability to add recordings to your iTunes Library. This means you could use iTunes sharing to listen to the shows on other computers. However, this doesn’t work for me. First, I haven’t been able to get Radioshift to successfully add a recording to iTunes. But even if it did, it’s a manual process (Radioshift doesn’t do it automatically) and I don’t want to keep iTunes running on my home automation Mac.

Although parts of this feel a little awkward, so far I’ve found it worth doing. I hope that as Radioshift continues to evolve the process will get easier. If you have tips to share, please feel free to chime in.

Erica Sadun

AddThis Social Bookmark Button

I just posted a quick how-to over at TUAW regarding installing the latest binary iPhone developer toolchain. You can download a copy and use the package to get started with iPhone programming.

The hardest part of the entire exercise involves copying your iPhone file system to your Mac.

Erica Sadun

AddThis Social Bookmark Button

Here’s a nifty little trick. Install my iPhone utilities package. Then cd into /System/Library/CoreServices/SpringBoard.app. Then issue the following command: restart; ./SpringBoard. This lets you run SpringBoard from the command line and peek at all its NSLog messages as they are issued.

Be aware that this is not safe, your stuff won’t work right, and you’ll surely have to reboot after. But it’s still kind of fun in a power-tool way.

Erica Sadun

AddThis Social Bookmark Button

A couple of days ago, as I was updating SendSong (latest version here), I discovered a really nice trick. Until now, I’d been storing ringtones in /Library/Ringtones, the same folder used by the built-in ringtones. Then “DarkTen”“Ste” tipped me off to the fact that you could store them in the root folder, in /var/root/Library/Ringtones and they’d still be recognized. (”LG” discovered this and Nate True confirmed it, adding that there’s a third way to put Ringtones into your iTunes folder–but it’s complicated.) SendSong now takes advantage of this and limits your access (both adding and removing ringtones) to that folder.

What this means, though, is that if you can track down a copy of iPhone Interface for either Windows or Mac, you can install ringtones without having to jailbreak your phone. Create the /var/root/Library/Ringtones folder (on a non-jailbroken phone, that’s the Library that appears as your home folder) and stick whatever ringtones you want into that folder. There’s no need to access system files. You can do it all from the public directories.

David Battino

AddThis Social Bookmark Button

Photographer James Duncan Davidson did a neat experiment with a recent blog, transforming a series of images into a tutorial movie that shows the evolution of a photograph step by step. This format lets the viewer compare images more easily because they’re superimposed.

Readers liked it a lot, but wished for more informative captions. (Duncan had pasted the captions right onto the images as bitmap text, so there wasn’t much room.) I also thought it would also be nice to step through the slides without groping around with the QuickTime transport slider.

My first idea was to replace the movie with JavaScript-controlled arrays of individual photos and text. But creating that would be too much hassle for blog authors. It’s also nice to have a self-contained slideshow file.

Then I wondered about using a QuickTime text track instead. It turned out to be surprisingly easy.

  1. First I created a five-picture slideshow in QuickTime Pro with the Open Image Sequence command.
  2. Then I typed out five captions in a text editor, with a return between each line, and saved the file as plain text.
  3. Finally, I opened the text file with QuickTime Pro (making it into a text-only movie), copied the text movie, and added it to the slideshow with the Add Scaled command. Opening the QuickTime Properties window, I then offset the caption downward.

Here’s the result:

But what about the interactivity? I considered investigating sprite tracks, chapter tracks, Flash, or more complex approaches, but then I noticed that the little left/right arrows at the right side of the QuickTime controller bar stepped between images. Interactivity is built in!

I did do a bit of behind-the-scenes prep on the slideshow above: I layered a black GIF in the background to create a frame around the movie. I also set the slide transition time to two seconds, because that’s the default duration of the captions QuickTime generates. But if you want to get fancy, you can format the fonts and colors as well.

Jochen Wolters

AddThis Social Bookmark Button

Last week, I got a call from a friend in dire straits: his MacBook would no longer boot and he hadn’t yet made a backup of an important documentary project he was working on as a freelance photographer. When I had a first look at the MacBook, it did start booting, the “progress rotor” did show up, but instead of presenting the OS X welcome screen, an icon appeared after a too-long wait, indicating the disk could not be found. Ouch.

So I inserted the OS X installation disk, re-started the machine courtesy of the Power button, and held down the Option key to be able to select the DVD as the boot volume. Interestingly, the Mac’s internal drive was among the boot volume options, but when launching the Disk Utility application from the OS X installation disk, the software could not find the internal HD. As the next step in the quest to revive this Mac, I booted it from a TechTool Pro 4 DVD and launched TechTool Pro, but, alas, the internal drive again failed to appear.

Erica Sadun

AddThis Social Bookmark Button

Website RIActant has kindly posted an iPhone tech talk debriefing for anyone who was not able to attend in person. In addition to an organized summary of the talk, they’re making their raw notes available as a PDF download.

Erica Sadun

AddThis Social Bookmark Button

Behold iLight, my latest creation. It turns your $500 or $600 iPhone into a flashlight.

Use. Enjoy.

David Battino

AddThis Social Bookmark Button

Pummeled by palettes, I’ve been thinking of connecting the extra DVI output* on my G5 tower to a second monitor. That daydream got a boost when my terrific eye doctor raved about his multi-monitor home setup recently.

multiplemonitor-c2k2e.jpg

Multiple monitor photo collage by c2k2e.

So…what advice do you have for setting up and using multiple monitors? Do you like them side by side? Over/under? Same size/brand? How do you arrange programs, windows, palettes, and the Dock?

Noah Gift

AddThis Social Bookmark Button

One of my fellow Cocoa Bootcamp friends, Jonathan Saggau has put his Cocoa skills to get use and wrote an “Unsanctioned”
Pong Application for the iPhone.

Here are two pics from his blog:

iPhone Menu

Pong in Action

Great job at being subversive Jonathan!

Erica Sadun

AddThis Social Bookmark Button

If you’re curious about Leopard, and haven’t had a chance to pop over to see Apple’s OS Foundations overview, I recommend you try to find a few minutes to browse through it. It’s part 6 of Apple’s Leopard Tech developer series and it’s freely available to all comers–you don’t have to be a developer to access it.

Erica Sadun

AddThis Social Bookmark Button

Although there’s already a “hello world’ floating out there for the iPhone, it involves a number of complicated classes. I decided to simplify and create a new “Hello World” from scratch based only on UIWindow, UIView and UITextView.

The code follows after the jump.

Erica Sadun

AddThis Social Bookmark Button

1. You probably want to wait for the binary UI toolchain if you can. Getting it built and configured is a nightmare.

2. /private/var/logs/CrashReporter is, as you expect, your friend

3. You don’t have to edit DisplayOrder.plist. SpringBoard will add any applications it finds to the Widget display. Only use DisplayOrder.plist to change the order or to hide items from the /Applications folder.

Erica Sadun

AddThis Social Bookmark Button

Here’s a quick how-to for people wondering how they can install the iPhone toolchain and try out their own command-line programs.

1. Jailbreak your iPhone and install ssh. You need full access to your iPhone’s file system.
2. Download a copy of the binary toolchain and unpack it onto your i386 Macintosh.
3. Copy arm-cc-specs to your home folder as .arm-cc-specs
4. Move the entire build (local-toolchain) into /usr/local/. (I don’t recommend breaking it out any further so you keep the entire install together.)
5. Edit .arm-cc-specs to match the location of your toolchain, e.g. /usr/local/local-toolchain/share/
6. Edit your path to include /usr/local/local.toolchain/bin and start a new window so the path matches up.
7. Create a new, standard helloworld.c
8. Attempt to compile it using arm-apple-darwin-cc, which will now be in your path. This will fail.

And now we come to the hard part. You either have to edit your system headers, which Apple made read-only for a reason, or load pre-updated headers, which you’ll have to google for. Editing headers basically goes like this: Whenever your compile fails, add || defined(__arm__) to any line that includes if or elif defined (__i386__). Repeat as needed until your hello world compiles. Then, copy your executable to your iPhone and test it there.

Erica Sadun

AddThis Social Bookmark Button

Recently, my iPod has been collecting duplicate playlists like a child collects dirt. It’s not an unknown problem. A bit of googling shows that others have had the same issue and as there didn’t appear to be a simple solution, I decided to write a little script to take care of things. The following code deletes zombie playlists from the iPod. After, I re-sync to restore the playlists. This takes only a second because the iPod has already been synchronized before I run the script. Figlet, as you probably might guess, is the name of my iPod.

tell application "iTunes"
	set Figlet to first source whose name is "Figlet"
	set pls to every user playlist of Figlet
	repeat with eachpl in pls
		try
			delete eachpl
		end try
	end repeat
end tell
Chris Adamson

AddThis Social Bookmark Button

I spent a few hours this weekend upgrading a Core Solo Mac Mini to a Core 2 Duo. Here are a few thoughts on the experiences and lessons learned.

Derrick Story

AddThis Social Bookmark Button

QuickTime 7.2 adds new export presets for the iPhone and an improved H.264 codec. Publishing movies on the Web and mobile devices has never been more beautiful. David Battino just published QuickTime Web Movie Secrets on O’Reilly’s Digital Media site. He’s included some great playback and embedding techniques. Definitely worth a read.

If you want to learn more about QuickTime Pro 7.2 and its capabilities, you might want to download the User Guide from Apple.

Erica Sadun

AddThis Social Bookmark Button

So does the iPhone contains Mobile Web Server, aka Raccoon? Instead of “websites”, Raccoon asks us to think using “mobsites”, mobile websites. This comes as a port of Apache web server to mobile phone platforms. From what I’ve been able to google, Raccoon enables mobile phone users to become content providers (using their keyboards, microphones and onboard cameras). I am just starting to learn about this so thanks in advance to anyone who can point me to more information about iPhone-generated content, Raccoon, and gateways. Am I right in thinking this goes beyond just normal virtual private networks?

Update: Here’s a post from Radar last year by Nikolaj Nyholm on Raccoon.

Update 2: Reader Rodolphe suggests that the racoon on the iphone is not the Nokia variant but rather part of the IPSec tools and used for connecting the iPhone to VPNs. Man page

Update 3: The “cc” versus “c” should have given it away. The cool Mobile Web Server has two c’s. The VPN stuff only has one c. Mea culpa–or more realistically mea reculpa.

Screenshot by request after the jump.

David Battino

AddThis Social Bookmark Button

Amazing. Moments after I mastered the .QTL hack to make QuickTime movies launch in full-screen mode from a Web browser (!), Software Update informed me the new version finally supports fullscreen playback. I commenced downloading, headed over to MacFixIt to read about the other new features, and saw this:

The QuickTime 7.2 disaster: Breaks all CFM apps on Intel-based Macs (Office, Photoshop CS2) for some; Problems playing Flash


I’m running a dual G5, so apparently I’m safe, but I canceled the update anyway. What have your experiences been?

David Battino

AddThis Social Bookmark Button

With one click, Spencer Critchley just eliminated the nail-dragging squeak my dual-G5 used to make every time it ran a complex screen saver or iTunes visualizer. His tip was to disable processor napping.

processor preference pane

Click once, squeaks vanish. Disabling processor napping on my dual G5 eliminated the squeaking sounds it made when running complex visuals. But could there be any drawbacks?

Giles Turnbull

AddThis Social Bookmark Button

Journalist and Mac geek Scott Walker had a great idea for an old Mac mini, a newspaper vending machine, and some Applescript: a home-made digital newsstand.

Here’s the gist of how it works:

The Mac Mini connects to the Internet and to my iTunes library through my home wireless network. Each morning the computer launches a script triggered by an iCal alarm. While cueing up a music playlist, the script automatically gathers images, crops them in half with GraphicConverter and launches a slideshow with PhotoPresenter, a nifty little $8 shareware program with lots of snazzy transitions.

It’s a lovely combination of hardware hack and smart software thinking, and the idea of putting the whole thing inside an old news rack bought from eBay is just genius. Needless to say, it makes me think that perhaps I shouldn’t sell that old redundant Mac mini of mine - I should think of a useful hack for it instead…

Via Technology Guardian

Erica Sadun

AddThis Social Bookmark Button

The official Apple iPhone keyboard video is here. Things that the keyboard does include intelligent type-ahead with word guessing, algorithms to correct for misaligned fingers, predictive resizing of a button’s press zones, intelligent capitalization correction, and more. Yes, there’s still not tactile feedback and I’m not sure if there’s much auditory feedback, and I’m not 100% buying into the punctuation and numbers separation, but it is surely a thing of beauty in and of itself. Go watch the video to see design ideas in action. I can’t wait to try this out.

Giles Turnbull

AddThis Social Bookmark Button

iic_terminal.jpg

My O’Reilly colleague Paul Weinstein has put together a very neat Mac hardware hack: he’s using an old Apple II machine as a terminal connected to a Mac mini. It’s a great way to recycle a chunk of old tech that a lot of other people would just throw away.

From Paul’s detailed write-up:

So virtual desktops is workable, but not perfect. What I need is the ability to off-load some of windows, ones that need to be visible even for a quick glance, as needed, an IRC conversation or the output of a running web process, for example. Taking a looking at the applications I depend on I see the beginnings of an idea. Terminal is an interesting application, a piece of software that’s mimicking what use to be a hardware function. Why can’t it be a hardware function again or at least why can’t it be running on a dedicated piece of cheap, reliable hardware?

To re-create his hack you’ll need a spare old-school Mac (hands up who’s got one or more of those lying around gathering dust), and a handful of easily-obtained cables and connectors.

Erica Sadun

AddThis Social Bookmark Button

About 2 weeks ago, my DSL modem started dying a slow, protracted, and painful death. Rather than fork over $80 to Earthlink, I went out to CompUSA and bought a noname modem for quite a bit less. Thanks go to BroadbandReport’s Earthlink DSL FAQ which revealed that I didn’t have to buy direct from Earthlink and pointed out the 0/35 VPI/VCI settings for whichever modem I bought.

Erica Sadun

AddThis Social Bookmark Button

In a kind of strange synergistic occurance, both Evan DiBiase over at 32584.com and I have been sleuthing (Evan’s “Nancy Drew” reference!) for new Yahoo!Sync references in OS X applications, specifically Address Book. My strings search (strings */Contents/MacOS/* | grep -i yahoo) found a good number of new Yahoo references, which you can examine after the jump. What’s more, Evan also found what completely escaped my notice: a Yahoo end-user licensing agreement in Address Book. (It’s in Contents/Resources/English.lproj/YEULA.html) Pop over to 32584.com to keep up to date on his discoveries.

Erica Sadun

AddThis Social Bookmark Button

WebkitInspectorJune07.jpg

Yesterday, the Surfin’ Safari blog introduced the newly updated completely redesigned Webkit Web Inspector, compatible with both Windows and Mac. Today, I fired up NightShift, installed the latest nightly build and gave it a go.

The new inspector has a completely different look from the old, translucent gray version. It gives you a lot more space to see things, the elements are all laid out more logically, and there’s far more control and overall usability than previous inspector.

Instead of the old-style red rectangles, the new version highlights items on the webpage using the new Safari-find style gray-overlay. You can see that in the picture here, with the selected item in the Inspector highlighted on the webpage behind it.

To be fair, the old style is in many ways “prettier” than the new one, but the new version fairly kicks the old style’s rear in terms of functionality. Nice work, Webkit dudes!

As a final note, for reasons I do not begin to understand, both the old and the new inspector seem to be in my current Webkit installation. Sometimes the new one loads when I inspect an element, sometimes the old one. Be persistent.

Update: The reason I ended up with both inspectors is that I had both the Webkit nightly build *and* the normal build of Safari running at the same time. I didn’t figure this out until the Window menu showed too few open windows that were clearly open.

A shot of the old-style inspector follows after the jump…

Erica Sadun

AddThis Social Bookmark Button

Over at TUAW, I posted about the new Yahoo!Sync framework that gets installed with the 10.4.10 update. I decided to do a little more technical snooping to see what goodies were inside this update and found quite a few phone-specific strings. These follow after the jump. Of particular interest may be the SIM references, the Conduit messages, and the kinds of data that can be synced (address book, calendar, tasks).

Giles Turnbull

AddThis Social Bookmark Button

Windows users, freshly arrived on Mac OS X, always ask the same questions. One of those is “How do I create a new file in this folder?”

It’s understandable they ask this, because they’re accustomed to right-clicking in any Windows Explorer view, and seeing a list of contextual options which include creating a new file (text or otherwise) at that point.

Whether or not you’re a switcher from Windows, if you’ve been looking for a way of re-creating that behavior on Mac OS X, there are various options available to you.

Document Palette is a freeware application that uses empty template files and a system-wide shortcut to let you pick from a list of new files to add.

NuFile is another choice, which again uses templates you can edit.

On My Command can be used to achieve the same effect, but it’s a geekier solution (and a far more powerful tool as a result).

But my chosen solution is Yellow Camp Software’s New File, because it lets you choose the file type simply by typing in the full filename with extension; then, having created the new file, it opens it for you in the default editor for that filetype. Quick and easy and very convenient.

What’s more, if you open it in Automator and re-save as an Application, rather than as a Finder plug-in, you can then drag that application into the Finder’s toolbar, and it becomes a very handy one-click route to new file goodness.

Robert Daeley

AddThis Social Bookmark Button

Recently I had an Apache access log file on a remote server that I wanted to archive. However, it was 3GB, and /usr/bin/zip refused to even admit the behemoth’s existence.

First idea that came to mind was splitting the file into smaller chunks that zip could deal with. For some reason, the prospect of an arduous manual process that would take me through Flag Day didn’t appeal, so I poked around via apropos to see what was available:

$ apropos split

Lo and behold, at the end of a bunch of other stuff,

split(1) - split a file into pieces

(The server was running OS X 10.3, which as far as I can tell does not include the more direct zipsplit utility found on 10.4. Same basic idea, though.)

I copied the behemoth to a secondary drive (took a while) and then navigated to its directory.

$ ls -l

which let me know:

-rw------- 1 robert staff 4239286441 10 Jun 04:55 behemoth_log

That’s a lot of bytes. Since I want to get the largest file down to a svelte 500MB, I’ll need to use this:

$ split -b 500m behemoth_log

Which, after a long period of splitting, produces these:

$ ls -lh

-rw-------   1 robert  staff          3G 10 Jun 04:55 behemoth_log
-rw-------   1 robert  staff        500M 10 Jun 05:18 xaa
-rw-------   1 robert  staff        500M 10 Jun 05:19 xab
-rw-------   1 robert  staff        500M 10 Jun 05:20 xac
-rw-------   1 robert  staff        500M 10 Jun 05:20 xad
-rw-------   1 robert  staff        500M 10 Jun 05:21 xae
-rw-------   1 robert  staff        500M 10 Jun 05:22 xaf
-rw-------   1 robert  staff        500M 10 Jun 05:22 xag
-rw-------   1 robert  staff        500M 10 Jun 05:23 xah
-rw-------   1 robert  staff         42M 10 Jun 05:23 xai

Alternatively I could have split it by kilobytes, or by number of lines using the -l line_count flag. There is also the ability to customize the output file names — read up on man split for more info. By the way, I’m guessing you want to limit your splitting to text files, so leave those binaries alone. See comments regarding using split on binaries as well.

Giles Turnbull

AddThis Social Bookmark Button

instantgallery.jpg

Rory Prior, developer at Think Mac and latterly a participant in our Indie developers in the UK article, has created a new user interface for the Inspector in his Instant Gallery application.

With more and more functionality being embedded in the Inspector, it was getting overburdened with tabs. So Rory took inspiration from what he’d seen of the iPhone interface, and created a menu-based system with smooth side-scrolling to the right for more detail, and to the left to go up the menu list.

Rory has posted a short explanatory screencast that shows the animated interface in action.

AddThis Social Bookmark Button

About a year ago I started a series of articles for O’Reilly on Artificial Intelligence topics with Python. The first of these articles was on decision trees and their uses in data mining and was rather well received. However, after getting off to a great start, my real life took over and my hobbies took a back seat and as a result this series stalled right out of the gate. Well, now that things have calmed down a bit I’m hoping to tack a few more articles onto this series and to start off I thought I might go over an email I recently received concerning the decision trees article, discuss a problem that was found in my implementation, go over a solution to the problem, and just try to give you all a better overall view of how this powerful technique works and maybe even give a little insight into its limitations as well.

To first sum up the email, the question within dealt with what happens in a situation where the decision tree built by the algorithm encounters a record that contains a value never before seen for one of its attributes. The example that was given in the email is described below.

given the following training dataset:

0, 0, LOW
0, 0, MEDIUM
0, 0, MEDIUM
1, 0, MEDIUM
1, 0, MEDIUM

classify the following record:

0, 1, LOW

The reason I wanted to share this question with everyone is that its a really good one for pointing out how a decision tree works and how the algorithm that builds one goes about its business. Look at the record we are tying to classify and see if you notice something about it that differs from the records in the training set. Do you see it? It’s in the second field of the record. Notice that, to date, there have only been zeroes in that field. Because of this, the decision tree has no idea how to classify the record, because it has no idea, from looking at the training set, that the value 1 could ever show up in the second attribute. This really brings to the surface two properties of decision trees that everyone should understand. First, its easy to see from this example that it is absolutely necessary to have a very large training set. Keep in mind that the decision tree algorithm uses probabilities to determine how well each attribute classifies data, and just like anything else in statistics, the larger the data set, the better the accuracy of the algorithm in determining these attributes. So, moral of the story, while small datasets are great for toy problems and examples, in the real world this technique is only trustworthy if there is a sufficiently large set of training data.

The second concept I wanted to point out was the general idea behind decision trees. Decision trees are classifiers and that’s it. The basic idea behind the algorithm is to take a look at a bunch of data and try to figure out which attributes of the data best classify each record in that data. That means if one attribute divides the data into two large groups and another divides the data into twenty small groups, the first is the better classifier since it does a better job of classifying large numbers of data points for each attribute value. So, what does this mean for our question? Well, what that means, essentially, is that the decision tree is no crystal ball. It can’t predict the classification of a record if it comes across one that has a value it’s never before seen and, therefore, has no idea of its existence. Makes since right? If our algorithm has never seen the value, how can it even know of the value’s existence?

So, where is all this talk leading us with respect to the question at hand? Well, there is actually a very simple answer to our problem of classifying a record with previously unseen attribute values–take a best guess. There are many different ways for doing this, some of which can be seen at the Missing Attributes section of this link (http://decisiontrees.net/node/34?PHPSESSID=b6335a10234cac9a895c31c6f139b8cc), however, the solution we are going to use is a very simple one. What we are going to do in our decision tree program is take a guess on the record’s classification based on the most frequently seen outcome from our training dataset (in the case of our sample data above, the default outcome would of course be MEDIUM). How do we go about altering our code to make this guess? Well that part is really easy. Take a look at line 150 of the dtree.py file. If you look at the original code from the article, you should see the following line:


tree = {best:{}}

This code creates a new node in the tree, which is a simple empty dict object. This means that when we search the tree, if we have a record that has no classification, meaning that we reach an empty node in our tree, we will get an error when we try to pass a key to this empty dict object. What we want our tree to do is return the default outcome whenever this situation is encountered. This can be easily accomplished by adding that default value to all of the empty nodes in our tree. Take a look at the following replacement code:


tree = {best:collections.defaultdict(lambda: default)}

What does this code do exactly? Well, essentially this code does exactly the same thing as before (i.e., creates an empty dict object as the next node in the tree), but it does so using the defaultdict method of the collections module. What does that do? It allows us to specify a function that can be ran whenever a key is passed to the dict object that does not already exist. In our code we simply create a lambda function that always returns the default CHOICE (i.e., most frequent outcome for our training dataset). This will ensure that whenever you try to classify a record that has no matching branch in the tree, you will get the tree’s best guess back as to how
it should be classified.

So that’s it, simple, eh? What we’ve done here is hopefully get a little better feel for how d-trees work and at the same time we’ve altered our original algorithm a bit to make it a bit more robust. I’ve attached to this post a new version of the original d-tree code from the article (get it here: Download file). In the tarball you’ll find the same files as in the original code, however, the dtree.py file will have the change we just discussed and the test.py file has also been altered to make a bit more usable. Now you can run the test and pass in a training dataset and a test dataset for classification, whereas it used to load these automatically and you needed to change the test.py file by hand if you wanted to run your own datasets. If you want to test out the new algorithm, just use the following line of code at the command prompt:


$ python test.py training-data test-data

where training-data and test-data are the names of the datasets you wish to use with the algorithm. One more thing, I used the ‘with’ statement in the new test.py file, so if you’re using a version of Python before 2.5, you’ll either have to alter the new test code or use the test.py file from the original code.

Well, I think that’s it for this session. Hopefully everyone got a little bit out of this post and everyone reading this now has a little better overall understanding of this very important data mining technique. If you’re interested in learning some more artificial intelligence/machine learning techniques, keep your eyes peeled for a few more articles in the series and also keep an eye on this weblog, since I am planning on also posting some information here on these topics from time to time as well. I hope to see you all here again very soon.

Erica Sadun

AddThis Social Bookmark Button

More on iTunes Plus data and possible privacy issues: EFF has found two fields (”a 1024 bit variant field labeled sign and a 630 byte variant field labeled chtb”) that seem be unique for each combination of user and track. Beyond that, the data difference between files may be due to cover art duplication (two copies rather than one copy). Read all about it here.

Erica Sadun

AddThis Social Bookmark Button

I need to upgrade to Vista. So early this morning, I started googling around for system requirements and to find out what would be involved in the upgrade. I stumbled across Microsoft’s page about its Window Vista Advisor and downloaded a copy. While attempting to install it, it alerted me that it “Requires .Net Framework”. I stopped the installation, downloaded a copy of the framework and began to install that.

After agreeing to endless end user licensing terms, the installation began. Nearly an hour later, I had to leave and drop the kids off at school while it was still installing. As I left, I noticed it rewriting my system registry and installing hundreds of megabytes of updates. Upon returning from my errands, the installation was finally complete.

I then launched the Advisor installer, agreed to its terms, and waited another 10 minutes for that to finish installing before I could launch it.

Once launched, it took another 15 minutes to tell me what I already knew–I needed another 256 MB of memory installed on my inherited laptop–and what I didn’t know–that other than memory, the laptop was Vista compatible.

So I started doing some math. To upgrade the laptop’s memory would cost me about $50-$100 depending on how much memory I added plus the cost of Vista itself, say another $100-$150 for Vista Home Basic. Alternatively, I could go to Walmart and buy a cheap-o desktop unit without monitor but with Vista Home already pre-installed for about $400 or less.

I’m really hesitant to go the bootcamp or Parallels route with this because (1) my Mini already has 2 partitions on it, neither of which I can get rid of at this time; and (2) I need native peripheral support.

So what advice do you have for me? Should I go the add-memory-and-upgrade-the-laptop? Should I shell out for the low-end desktop? All of this is for a 3-month project, after which I will no longer need much of this technology.

Giles Turnbull

AddThis Social Bookmark Button

My post last Friday began life in a moment of uncertainty. I have a system in place for managing my ideas - of which more follows in a moment - but I was suddenly struck by the thought: “Is there a better way to do this?”

Erica Sadun

AddThis Social Bookmark Button

This one is for Randy, who would like to sync his shuffle with a playlist. I went ahead and chose audio-only unplayed podcasts, but feel free to modify as needed. The script includes some oddball uses that work but look ugly. Like the conversion of “none” to string and the use of the floc local variable. Got a better way? See some obviously bad coding here? Let me know in the comments. Thanks go to Mark Hunte for several improvements.

tell application "iTunes"

	-- Create playlist if it does not already exist
	set podString to "Podcast Playlist"
	if not (exists playlist podString) then
		make new playlist with properties {name:podString}
	else
		-- Remove all existing podcasts in playlist
		delete every file track of playlist podString
	end if

	-- Collect every track that has downloaded
	set tracklist to every file track of playlist "Podcasts"

	-- Add audio-only items that are still unplayed
	repeat with eachItem in tracklist
		if ((video kind of eachItem) as string is "none") and ((played count of eachItem) is 0) then
			set floc to location of eachItem
			add floc to playlist podString
		end if
	end repeat

end tell
Erica Sadun

AddThis Social Bookmark Button

On the off chance that this might prove useful to someone, I thought I’d share. Here’s an AppleScript snippet that moves all the files from a playlist into a single folder you specify.

-- MoveItems:
--   Move all files associated with a playlist to a folder you specify
--
-- Erica Sadun, May 2007
--

tell application "iTunes"

	-- Playlist to use
	set myPlaylist to some playlist whose name is "tmp"

	-- Location to move to. Assumes folder already exists
	set newLocation to ("Data:tmp:" as alias)

	-- Move each track file in this playlist
	set tracklist to every track of myPlaylist
	repeat with eachItem in tracklist
		set nth to item ((location of eachItem) as string) of application "Finder"
		move nth to newLocation
	end repeat

end tell
Giles Turnbull

AddThis Social Bookmark Button

For your weekend homework, I’d like you to think about how you manage ideas on your Mac.

Ideas might start off as all kinds of input: a chunk of text, a URL, a document, a song. How do you store ideas? Sort them? Keep a close eye on those that change rapidly, whilst not forgetting the ones that lie dormant for a long time?

What software do you recommend for managing ideas? Are there any clever Finder techniques that can be used to manage them?

Any and all ideas about idea management are welcomed; please share your thoughts in the comments.

Erica Sadun

AddThis Social Bookmark Button

Let me start this story at the punchline with a quick abstract: After removing all atomic meta information from my iTunes plus purchases, the music files still retain distinguishable trace differences that could be used to track the data if loaded illegally to peer-to-peer networks. Now that you’ve heard the punchline, let’s rewind to the beginning and see how I ended up at this conclusion.

Looks like MacRumors has discovered that the enema is not as thorough as I thought it was. Read this.

More after the jump…

Erica Sadun

AddThis Social Bookmark Button

Yesterday, during D 2007, Steve Jobs talked briefly about Apple TV. He described it as a “hobby” more than a real business, an exploration of a new space–a set top box for the Internet. Apple TV (like Joost) is trying to find a business model that supports Internet-sourced content.

We’re still waiting for high definition iTunes movies and TV shows, content that Jobs hinted might soon appear to take advantage of the newly announced $399 160 GB Apple TV units. (Current Apple TV units have 40 GB hard drives.) And we’ll soon be seeing h.264 YouTube content directly on Apple TV.

The part of Jobs’ interview that really caught my ears wasn’t directly about Apple TV but rather about OS X on the iPhone. Apple TV, as you might be aware, runs a very stripped down, compact version of OS X that occupies just a few hundred MB. It sounds like the iPhone is going to take that approach even further, stripping down smaller and adding the multi-touch UI. In some ways, you might say that Apple TV has acted as the pilot program for iPhone technology.

As for third party iPhone applications, Jobs talked about the iPhone UI limitations: no mice, no pull-down menus and so forth, the “very different UI on the phone”. To me, this was a hedge. Apple TV has a “very different” UI as well and it runs OS X applications very nicely, thank you. On the other hand, if you’re in a two year $80/month data contract, I think people will be far less likely to disembowel their iPhones quite so readily as they currently do their Apple TVs to gain access to the underlying OS.

Giles Turnbull

AddThis Social Bookmark Button

UPDATE: Christoph Priebe has explained this payment system in much more detail. See the end of the post for his comments.

Posterino is one of the more interesting new apps I have had cause to write about in recent months. It’s like Pages for your photos, offering pre-packaged templates for turning photos into attractive posters, leaflets, cards and more.

One of the newer features is a built-in postcard sending service, where you design your card in Posterino, then with a simple payment it gets printed and posted for you automatically. No trip to the post office required.

What’s coolest of all is how you pay for this service. You can simply type your cell phone number into a box, to pay via your phone account. A confirmation SMS message will be sent to the phone number you enter (to prevent you entering the numbers of your enemies, obviously) and once replied to, your postcard is on its way. That’s assuming you have a cellphone contract with the right company, in the right country.

Giles Turnbull

AddThis Social Bookmark Button

The Humax PVR9200T is a combined digital terrestrial set-top box and personal video recorder. And I’ve just found out how you can plug it into a Mac.

David Battino

AddThis Social Bookmark Button

When Electronic Musician magazine asked me to write a tips article about the Frontier Design AlphaTrack, I was intrigued by the challenge. What could I possibly say about a $200 USB volume slider? I composed the first line in my head before the box even arrived: A controller with just one fader? Isn’t that like a piano with just one key?

AlphaTrack-angle.jpg Frontier Design AlphaTrack

The Frontier AlphaTrack adds a motorized fader, transport controls, knobs, buttons, and a ribbon controller to your computer. It’s powered by USB.

The magazine cut that line, but I quickly answered my own question by plugging the AlphaTrack in to my Mac and sniffing its output with Snoize MIDI Monitor. Lots of possibilities there!

Erica Sadun

AddThis Social Bookmark Button


Read more details at Mark’s blog here on his April 4th post.

Robert Daeley

AddThis Social Bookmark Button

This is one of those “Discovered By Accident” tips that I happened upon today in OmniOutliner 3.0 whilst futzing with the Inspectors.

Erica Sadun

AddThis Social Bookmark Button

He says so right here.

Ruby was also the clear winner of my recent “help me pick a language” poll. So how do I get started? And how long until I can start doing useful stuff? All pointers appreciated. Remember, I need mac-specific implementation guidance. I’m just going to go with the ruby built into my Mac. where ruby tells me that ruby is installed into both /usr/bin/ruby and /usr/local/bin/ruby.

% ruby --version
ruby 1.8.2 (2004-12-25) [powerpc-darwin8.0]
Jeremiah Foster

AddThis Social Bookmark Button

I have been working on a series of articles for the MacDevCenter about alternative windowing systems for Mac OS X and I haven’t been blogging recently. I am kind of hiding out from my editor since I am a little behind with the next article, its coming soon Bruce, I promise! :)

I wanted to mention something really cool that I found in researching the articles and that something is Camel Bones. Camel Bones is an Objective-C to Perl bridge which means you can use the underlying OS X system from perl to develop applications.
While you can develop desktop applications in nearly any programming language on OS X, Objective-C is really the best choice since there is so much good Apple documentation and it is what Apple uses. Camel Bones allows you to use perl and connect to all the Cocoa/Objective-C bindings obviating the need to learn Objective-C. This might be useful since you can scour CPAN for modules that have the functionality you want and you can use Camel Bones to build a GUI wrapper around the perl code and Voila! you have a new desktop application.

There are some apps already written using Camel Bones, like a web browser for example, so there is interest in the development community and the developer of Camel Bones, Sherm Pendley, is working actively on developing so here is your opportunity to influence the future of Camel Bones.

Apple should be more active in supporting this sort of development. Third party application development is key to the success of OS X, at least so says Apple’s SEC reports, and this is an excellent way for Apple to get some slick perl hackers on board. Recently SUN stated that Open Source Software developers should be compensated for their work and I think Apple too should look into this since their platform benefits directly from so much excellent Open Source tools, like Apache, MySQL, OpenSSH - the list is long. Making sure that Camel Bones is actively developed and has the resources it needs would be an excellent move by Apple showing its support for its development community.

Now go out and develop the next killer app!

Erica Sadun

AddThis Social Bookmark Button

QuickTime’s info pane offers a great summary of many movie properties, including helpful items like format and data rate. So when you fetch movie properties in AppleScript, why is the format excluded? Is there an easier way to programatically grab codec and bitrate information from AppleScript? From the command line? Using file tells me about AVI files but not much about MP4 files.
PropertiesMovie2.jpg

Erica Sadun

AddThis Social Bookmark Button

I just stumbled across this writeup about the Apple bug reporter and thought I’d share. Scott Stevenson has put togther a particularly nice how-to showing you how to sign up, log in, and create problem reports.

David Battino

AddThis Social Bookmark Button

foo-storycard.jpg

Here I’m presenting kamishibai stories at FOO Camp, Tim O’Reilly’s annual gathering of technology provocateurs. I cracked up when I saw the photographer’s caption: “It’s not just geeks.”

How do you present multimedia at conferences? For my workshops on Japanese kamishibai storytelling, I use a PowerPoint slide show with about 70 slides. Only the first, second, and last slides contain text, because the point of the kamishibai format is to look at your audience, not turn your back on them to read bullet points. (At FOO Camp last year, I wryly called the technique “PowerPoint for People.“)

Later this month, though, I’ll be delivering a lecture about my book and DVD, The Art of Digital Music, at a tricked-out auditorium. The bulk of the DVD is 60-second movies of the artists I interviewed for the book. For each interview, I extracted sound bites with Ambrosia WireTap, added original music with Ableton Live to move the stories along, and then synced the audio with photos I animated in LQ Graphics Photo To Movie.

My concept for the presentation is to intersperse video clips from the disc with photos and behind-the-scenes stories, such as why producer Don Was recorded the Rolling Stones on his iBook instead of in his million-dollar Hollywood studio, how I got a stealth interview with Brian Eno, and more.

Tool Time

My dilemma is one we often face with today’s cornucopia of creative software: Which program(s) would be best for pulling all those media together and presenting them smoothly? My first inclination was to rerender the movies and embed them in PowerPoint slides, but I won’t have my computer with me, so I was worried that the host computer might not be able to keep up. Ditto if I simply built an HTML page and linked to the media files. Perhaps Keynote would perform better, but I haven’t bought it yet. (Should I? Please leave a comment.)

Erica Sadun

AddThis Social Bookmark Button

iQuizEmu

In today’s Mac Devcenter article, I wrote that iQuiz Maker will not import raw data files for you to create trivia packs. However, iQuiz offers a nice feature that I did not cover in the article. It allows you to open and edit all existing trivia packs installed into the iQuiz 1.0 folder in your iTunes/iPod Games directory. “All existing trivia packs” includes the custom ones you build according to the directions in my article.

This means that you can use all the iQuiz Maker features with your custom trivia packs including its game emulator. So if you want to play an iQuiz game without your iPod, just launch iQuiz Maker, select your trivia pack and click Play.

For those of you who want to try out the multiplication and trivia packs I mentioned in the article, you’ll find them here. These include three variations on the multiplication game, the
C source used to create them, and a set of six trivia packs built using trivia data from the net that was represented as open-source and/or public domain on the sites I downloaded from. (If anyone knows otherwise, please let me know and I’ll remove them.)

Erica Sadun

AddThis Social Bookmark Button

Over at Mac OS X Hints, an anonymous poster has discovered that Apple TV retains whatever sort order you set in iTunes. If you want your music to show up in alphabetical order, make sure you click on the Name header in iTunes before you sync to Apple TV.

Erica Sadun

AddThis Social Bookmark Button

Over at AppleTVBBS, poster mtech figured out how to stream Internet radio using VLC. He installed a copy of VLC and my perlbin plug-in and then created individual “station” files in /Users/frontrow/perlbin along the following lines:

#!/usr/bin/perl
use strict;
use warnings;
my $status = system("/Users/frontrow/VLC.app/Contents/MacOS/VLC http://wnycam.streamguys.com");

According to a follow-up post, you can also create a pls playlist for use with the ATVFiles plug-in.

Erica Sadun

AddThis Social Bookmark Button

I’ve dabbled in Perl, messed with csh, but I always seem to come back to C (and her sisters) and Smalltalk. Now I have a little space in my life to learn a new language. Help me figure out where I should direct my energy and let me know why this will take me to new and important places development-wise. Thanks!

Erica Sadun

AddThis Social Bookmark Button

So here it is. The proof of concept Finder Hiding widget. So why did I bother? What’s the big idea? It goes basically like this: Apple TV (and, presumably the upcoming iPhone) can run many Intel Mac OS X applications because Apple TV is, essentially, an OS X computer that runs a slight variant on the OS. However, Finder wants to take over and control the way users interact with the unit. It refuses to hide, it refuses to hand over control to another app.

More after the jump…

Erica Sadun

AddThis Social Bookmark Button

It looks like iChat in Leopard is going to be more scriptable than ever before according to this article from Apple. You’ll be able to use Cocoa to access iChat views and write to them from your applications:

IMAVManager *manager = [IMAVManager sharedManager];
[manager setVideoDataSource:myView]; 

But what really interests me is the enhanced AppleScript access that will allow you to start video chats, send messages, and create iChat event handlers.

Erica Sadun

AddThis Social Bookmark Button

redrawissues.jpg

See that picture? That’s what happens when you attempt to hide Finder.app using releaseAllDisplays. Yes, you can kind of get Finder to hide but then when you launch another application, things get confused as to who is allowed to draw what. This shows me opening what should be a menu and revealing part of Finder.app’s screen saver.

With the help and knowledge of AwkwardTV’s Eric III and Alan_Quartermain, I did manage to create a plug-in that hides Finder but I can’t seem to launch a program successfully and get it to take over the screen. My greatest success involved launching VLC from the command line and having it play back a movie full-screen. Finder stays hidden and VLC’s constant video updates and redraws prevented the issues seen here. Unfortunately, you could not control the video playback at all using the remote control.

In other related news, Alan_Quartermain has posted an advanced Apple TV coding tutorial about creating custom controls that is well worth checking out.

Erica Sadun

AddThis Social Bookmark Button

Lots of new stuff on the Apple TV front today. Here’s a brief rundown of it all:

Elgato released EyeTV 2.4. Download it here. Lots of bug fixes and, best of all, Apple TV export. Here’s a screen cap from Monday’s “Drive”, which I recorded in High Def and then exported to Apple TV format. It automatically loaded into iTunes. Unfortunately, you really do need to sync these things or use 802.11n because streaming playback with this bandwidth nearly killed my 802.11g network. Lots and lots of pauses. Also, the detail looked very soft to my eyes, not nearly as crisp as the High Def original.

http://www.oreillynet.com/mac/blog/images/drive1scaled.jpg

Screen shot from “Apple TV video” exported from EyeTV High Def content. [Click to open at full resolution]

Apple posted a few Apple TV hints in their RSS support feeds. According to Apple, Apple TVs can be stored in media cabinets despite their warmth. Also here’s a doc about Apple TV Standby Mode.

I completely rewrote all my plugins. Here are updated versions of the two I’ve previously talked about and a new one. The URL appliance lets you load video from the Internet by supplying URLs in a text file. The Perl appliance runs any perl file you drop into /Users/frontrow/perlbin. And the new one, Quit, lets you quit form the Apple TV UI. I tried uploading the project sources but I ran into a file size limit with the O’Reilly server. If you want copies of the source, just send me e-mail. The new versions should all run concurrently on Apple TV without interfering with each other the way the earlier prototypes did.

URL Appliance: Download file

Perl Appliance: Download file

Quit from UI Appliance: Download file

Speaking of the URL appliance, readers have asked me if I could mod the plug-in to allow users to label their URL files. You can actually do that right now without any modifications. Just put text labels into your urldata.txt file. If you try to load a label, Apple TV will simply tell you that “no content was found”. The URLs should load normally.

http://www.oreillynet.com/mac/blog/images/URLupdatescaled.jpg

Create your own organization in the urldata.txt file. [Click to open at full resolution]

Erica Sadun

AddThis Social Bookmark Button

Apple just updated a bunch of their high level Developer Notes that provide developers with technical descriptions of Apple products and capabilities. The updated items include Audio (both analog and digital capabilities), Bluetooth, Ethernet, FireWire/1394, Mac Pro, PCI, RAM expansion, USB and video.

Giles Turnbull

AddThis Social Bookmark Button

One nice thing about Mail is the Redirect feature, which lets you forward mail to a particular address so that it does not appear to have been forwarded from you. The final recipient sees the message just as you did when it arrived in your inbox.

One annoying thing about Mail’s Redirect feature is that it cannot be used on more than one message at a time. You can’t select, say, the entire contents of one mailbox and tell Mail to redirect all those messages to your Gmail account. If you select more than one message, the Redirect menu item is unusable.

Erica Sadun

AddThis Social Bookmark Button

Google Data APIs provide a standard interface to access Google-based data stored on Google Base, Blogger, Google Calendar and so forth. Today, Greg Robbins announced that he created a Cocoa-friendly Objective-C API/framework. You can read more at his blog post, which is here.

Erica Sadun

AddThis Social Bookmark Button

I was surprised at how much I enjoyed myself this last week. Since Sunday, I’ve been programming Apple TV plug-ins. They aren’t big programs to work with–more like programming haikus–but it reminds me again how much I adore Cocoa and Core Foundation and all. I spend most of my programming time these days writing scripts to scrape webpages and access web APIs.

I’ve also been rewriting (or to be more correct, rerererewriting) an article about developers adapting sample Cocoa code to a shipping product. I also wrote about adapting sample code here. All this has brought me to the piece I’ve missed talking about, which is the role Google plays in Cocoa programming. The Foundation docs at Apple tell you what’s supposed to work but it’s all the developers out there in searchable google-land that tell you how to get around the known bugs and errors and how the method calls really work.

Thank goodness for Google.

Erica Sadun

AddThis Social Bookmark Button

Devcenter reader Dick Applebaum writes in to report that the URL plug-in works with good results. He’s been able to play several videos including live and archived streamed .wmvs. The files stream properly in that you don’t have to wait for the entire file to load before playback begins.

Unfortunately, some the live streams he’s accessing (as opposed to archived ones) stop playing after 5 minutes. It seems like the live source sends five minute segments. After that time, the plug-in returns to the main menu and he has to select the URL again to get to the next segment.

So all you streaming experts out there: do you know a workaround that I can put into the QT Player part of the plug-in to make it try to keep grabbing video? Or is this a problem at the server end? I posted the code I’m using a few posts back.

Make sure you’ve installed Flip4Mac in your /Library/QuickTime folder if you want to play with WMV files and streaming.

As a final note, Dick mentions that he ported SQLite over to the Apple TV without any trouble.

Erica Sadun

AddThis Social Bookmark Button

So it turned out that my plug-in that I posted about yesterday worked much better than I thought it did. If you feed it a URL and the data can be downloaded (rather than streamed from the server), it will download and play back. Here are some results of testing the plug-in last night.

RocketBoom: I connected to a RocketBoom .mov file. It took a minute or two to download to disk and then played back perfectly. Video was good, audio was good. I could not, however, start playback until the entire file downloaded. For RocketBoom’s relatively small video files that wasn’t a big deal.

http://www.rocketboom.net/video/rb_07_apr_10.mov

http://www.oreillynet.com/mac/blog/images/RocketBoomscaled.jpg

[Click to open at full resolution]

Lots more after the jump…

Erica Sadun

AddThis Social Bookmark Button

So I wrote this plug-in that takes a URL and attempts to connect to it and play it back. To test, I used the recent Apple Keynote (http://stream.qtv.apple.com/events/jan/j47d52oo/m_8848125_350_ref.mov). I get the audio just fine, but the video is all white. I checked out my codecs and they seem fine. So you all QuickTime experts out there, any hints as to where I might be going wrong? A similar test with a Comedy Central FLV stream failed completely. Just a black screen and an infinite wait loop(http://a25.c.akamai.net/n/25/9950/v001/comedystor.download.akamai.com/9951/_!/com/southpark/1011_cake_480.flv?__gda__=1176235556_733620de7b3346f8ad188c52111702d1)

http://www.oreillynet.com/mac/blog/images/tryingtostream3scaled.jpg

My URL test plug-in. [Click to open at full resolution]

http://www.oreillynet.com/mac/blog/images/tryingtostream2scaled.jpg

The QuickTime Keynote streamed audio but not video and displayed this white screen. [Click to open at full resolution]

http://www.oreillynet.com/mac/blog/images/tryingtostreamscaled.jpg

The Comedy Central FLV source did not stream at all. [Click to open at full resolution]

Erica Sadun

AddThis Social Bookmark Button

On Sunday, with a hundred better things to do but no incentive to do them, I put together an Apple TV plug-in that allows you to run any Perl script you place into a folder in your home directory. (/Users/frontrow/perlbin). The idea is this: a lot of people know how to write Perl who don’t want to learn to program Cocoa. And you can add new scripts from your normal office work computer (via ssh) but have them all available from Apple TV. You can do date & time, calendars, stock quotes, weather, and so forth. Scrape web pages, subscribe to RSS feeds, whatever.

The plug-in is here, and here are a few screen shots showing the plug-in in action. You can click each thumbnail to view the shots at full resolution.

http://www.oreillynet.com/mac/blog/images/PerlAppliance1scaled.jpg

The Perl plug-in in the main menu.

http://www.oreillynet.com/mac/blog/images/PerlAppliance2scaled.jpg

The submenu shows all files in /Users/frontrow/perlbin

http://www.oreillynet.com/mac/blog/images/PerlAppliance4scaled.jpg

Perl scripts, which are easy to create, can perform simple tasks like checking the date and time while displaying them in the Apple TV interface.

http://www.oreillynet.com/mac/blog/images/PerlAppliance7scaled.jpg

More complicated scripts can scrape webpages to gather information like this up-to-the-minute weather report.

Erica Sadun

AddThis Social Bookmark Button

You need ssh access to your Apple TV. Drop the plug-in into /System/Library/CoreServices/Finder.app and from there into Contents/PlugIns. You then have to kill and restart Finder.app. (Do a ps -x to find the process id).

What the plug-in does: I wrote it as a proof of concept for testing running command-line utilities through the Apple TV interface. “Weather” gives you a weather report for Denver. (You can modify the zip code in the plug-in bundle in Contents/Resources/Weather.perl.) “Time” tells you the time using /bin/date. There’s also a “Foolery” option that simply displays a static string. Finally, you can “Quit” from the Apple TV UI. (Not very useful unless you’re hacking.)

Use at your own risk. Give feedback. Don’t sue. How-to hopefully to follow.

Download file

Update: Just for the hell of it, I also wrote up an appliance that allows you to run any perl script you stick into your /Users/frontrow/perlbin folder. Feel free to test it:

Download file

Erica Sadun

AddThis Social Bookmark Button

Joost, with its limited beta and coveted invites, has become the next hot thing but unless you’re in on the beta program, there’s not too much information out there about what Joost is. So I thought I’d jump in here with a quick summary.

Joost is from the Skype people. The same people who founded Skype are behind the Joost effort.

Joost offers free streaming ad-supported video. Joost provides fast and efficient video streaming at surprisingly high quality given the actual bandwidth they use.

Joost plays back better than NBC Replay, CBS Innertube, etc. The video is smooth and watchable, far superior to what you find at the network sites.

You can’t skip the commercials. Joost isn’t TiVo.

Joost has premium content. Although the current content on offer is very similar to what you’d find for free on on AOL TV, Joost has obviously penned deals with Comedy Central, MTV, Nickelodeon, and BET, because some of their shows are already available for viewing. These are not the greatest shows, or even the most current shows, but they do provide a proof of concept that robust and watchable ad-supported TV-on-demand can be delivered effectively.

I love Rocky & Bullwinkle. And there are lots of episodes to watch. Plus Mr. Magoo. And, despite the Garnier and Eclipse gum commercials, my kids are learning to love them too.

It’s still beta. So sometimes there are program interruptions, and sometimes parts of some menus don’t display, but all-in-all it’s watchable and fun.

Intel Mac only. Joost does not support PPC. But it does run on Apple TV.

Erica Sadun

AddThis Social Bookmark Button

For the moment (and it’s probably only a moment), two white LEDs illuminate the fronts of two Apple TVs. One poor unit has been hacked so much that it takes several tries, several blesses and several plugging-and-unplugging sessions to get it to start. I think I’ve messed up its recovery partition beyond repair. (This is the one that got attached at one point to the G4.) For the record, I ended up having to bless both the CoreServices folder *and* the boot.efi file inside it. The command was: bless --folder=/Volumes/OSBoot/System/Library/CoreServices --file=/Volumes/OSBoot/System/Library/CoreServices/boot.efi --setBoot

The other unit is newly factory restored (the first won’t factory restore at all any more–it just reboots into the blinking question mark if you try) with spanking fresh hacks, ATVFiles, Perian, and Joost. It’s working great and sits (albeit with its innards still exposed to daylight) in its proud place on a ceramic trivet next to my TV. The other one gives it dirty looks through my office wall and sulks in look-what-you-did-to-me-and-now-I’ll-only-boot-up-if-I-feel-like-it demeanor.

But they live. And for now, that’s going to be enough. I’ve got to head off to CompUSA to swap out a Seagate 120 drive that’s been making horrible clicking noises. It never ends.

Anyone have any requests for AppleTV ports? Any software you’d like to see on it? Ideas for custom plug-ins?

Erica Sadun

AddThis Social Bookmark Button

A bit of good news, a bit of bad news.

The good news is that I brought my bricked Apple TV[1] back to life by blessing its Core Services folder. I then did a complete system restore, and then starting from scratch installed ATVFiles and the latest Perian and I can now play AVI files directly from the Apple TV interface. Woo hoo! They look fabulous and high def. (Take that Peter Svensson of the Associated Press.)

Also running: the latest beta of Joost, but with the SVG font issues other people have reported. (If you go back about 3 or 4 betas, Joost didn’t have the font issues. They’re working on fixing them now. If you’re having problems with Joost, make sure you copy both preferences files from an Intel Mac installation from ~/Library/Preferences (there are two) *and* also the Joost Application Support folder.)

The bad news? I connected my “good” Apple TV disk to my 733 G4 and now it won’t boot. Surely there will be a time when both units are up and running at the same time? Does anyone know a quick and easy “bless” solution without having to rebuild the entire disk from an image? Blessing Core Services didn’t work.

[1] For the curious, the way I bricked it was this. It was about 3 or 4 in the morning. I just got my youngest child back to sleep. Suddenly I had an Idea. (Never trust Ideas at 3 or 4 in the morning.) I decided to put a blank disk into my Apple TV, connect the good disk via USB and then press Menu-Down during boot. It was not a Good Idea. It was a Bad Idea. Hello Question Mark of Doom. The current bricking comes from having connected the other disk to a G4. Frack.

Robert Daeley

AddThis Social Bookmark Button

Spring can officially get started now that the baseball season is underway. And with baseball comes the necessity to keep up on your favorite players and teams, whether you’re a stat-obsessed fantasy player, or just a fan of Your Team.

Michael Calore over at Wired covers a number of utilities that’ll keep you informed all day long, in Let’s Play Two. Or Three. Baseball Widgets for Your Desktop.

Now, you could just download and use the pre-made ones, but as Michael points out, there’s lots of room for customization:

Just want updates about the Mariners? Are you a Yankees-hating Boston girl? The best way to track a single team is to make your own custom widget. All of the official Major League Baseball team pages have RSS feeds. News articles, opinion pieces, player trades and official wrap-ups — basically every bit of news about your favorite team — are served on these feeds. Send them to your RSS reader or your Ajax-powered home page, or use a widget platform like SpringWidgets to build an embeddable widget for your blog.

You can also send RSS feeds directly to your phone via SMS, Google Homepage for Mobile or one of NewsGator’s mobile options — these are great ways to get score updates when the boss calls an emergency meeting in the bottom of the sixth with two men on.

Whatever your druthers, the blessed Internet will keep you in touch.

Erica Sadun

AddThis Social Bookmark Button

This shell scripting primer from Apple has been around since May of last year, but it was new to me when I found it today on Apple’s RSS feed. It introduces basic shell concepts and shows you how to create subroutines, use regular expressions, and perform math. A nice find for pointing people to who are just getting started with scripting.

Erica Sadun

AddThis Social Bookmark Button

Amadeu writes “Hi Erica. One thing I have not yet seen in your series: how does the AppleTV compare with the MacMini, as for output quality? The AppleTV has a better graphics card but does this result in noticeable differences when displaying pictures or movies on the TV?”

I honestly don’t see a quality difference between the two. Both produce crisp watchable pictures. But then again, I’m neither an audio nor video perfectionist so take my opinion with the skepticism it probably deserves.

Also remember that Apple TV works out of the box and is pretty bullet-proof but isn’t meant for general computing. The Mini offers Front Row, but it’s pretty easy to leave that mode. Apple TV is $299 and the Mini costs significantly more.

Erica Sadun

AddThis Social Bookmark Button

Jajah.com provides Internet telephony that uses standard landlines. You enter your phone number into the [#1] field on the Jajah homepage and your party’s number into the [#2] field. Click [#3] Call. Jajah connects to the first number, then to the second, and then connects the two together.

You do not need an account to test out this service. You do not need to enter your own number into the “My Phone Number” field. Jajah will connect any two parties you specify. And you can clear cookies to remove the “remembered” number.

It’s April 1st. And this being O’Reilly, I’m pretty sure you can figure out the rest. Just lay off the poor pizza delivery services and adult bookstores. They have a hard enough time today.

Erica Sadun

AddThis Social Bookmark Button

AppleTVCompositeSized.jpg

Behold. Apple TV using a composite monitor. Thanks to KFM82, who suggested that connecting a standard RCA cable between a TV and one of the three component jacks would produce a monochrome image on a regular composite TV. It did. Not great for TV watching, but excellent for testing out an Apple TV box during modding.

Erica Sadun

AddThis Social Bookmark Button

I’m running out for the weekend, so I have to make this short. Sorry! Earlier, I crashed my Apple TV. (You know, blue screen of death, but Apple style, so there’s a nice Apple logo to look at).

When this happens, you need to run Finder to reboot and restart properly. But I’d swapped Finder out with QuickTime. So I had to take my hard drive back to my mini, switch Finder back to itself, put the drive back into AppleTV and then go through the whole “Select Language”, “Can you see the Apple Logo 720 p” routine. Once this was done, I was able to ssh over to my baby, kill ripstop, dekext Watchdog, and put QuickTime back as my Finder.

Summary: Apple didn’t kill my Apple TV. I’m guessing I did it myself with my relentless testing of software and plug-ins. If you mess up, make sure Finder is available for your reboot. Hopefully soon, someone will come up with a USB flash drive fix that doesn’t require anyone to move hard drives around physically.

Erica Sadun

AddThis Social Bookmark Button

Did it. Finally. This is a screen shot of a live stream from my EyeTV tuner playing back on Apple TV. I’m working on the write-up for Bruce and Mac Devcenter. For the curious, the screen shot was taken as such: /usr/sbin/screencapture -tjpeg ~/sponge.jpg from a ssh session at the Apple TV command line.

vlclivespongescaled.jpg

Giles Turnbull

AddThis Social Bookmark Button

One of my interests is electronic notebooks, and how different kinds of note-taking and note-storing software products appeal to different kinds of users. Scientists, in particular, need something to keep track of, and possibly annotate, all the papers they need to read in the course of their work.

Flip Phillips made two posts to Apple’s Scitech mailing list today, outlining his views on a variety of note-management apps that fellow scientists might put to use.

Part 1 looks at Yep, Papers (itself the subject of intense scrutiny recently), and DEVONthink; Part 2 deals with WorkLife, BibDesk, and EndNote.

If you’re looking at note apps, especially for use in academia, Flip’s brief views are well worth a read.

Erica Sadun

AddThis Social Bookmark Button

CustomIconscaled.jpg
AppleTVKids2scaled.jpg
Update: changed from TIFF to JPEG. Thanks for the tip!

Erica Sadun

AddThis Social Bookmark Button

Dan over at UneasySilence has hacked the raw floating photos Quartz Composer screen saver. Check it out.

Gordon Meyer

AddThis Social Bookmark Button

I’m often looking for ways to improve my home automation system. A few days ago, a post at Hackszine drew my attention to Jesse David Hollington’s article on Bluetooth Proximity Detection on Mac OS X. And more recently, Bruce Stewart wondered how else proximity detection might be used, with Jeff Harrell’s comment about the problematic range of Bluetooth, approximately 40 feet, echoing the problems I’ve had in trying to incorporate Bluetooth into my home automation system.

I quickly learned that using Bluetooth to determine if I am at home (as inferred by the presence of my cell phone) was simply not going work to my satisfaction. The problem was that if I wandered too far from my home office, yet still within my home, the Bluetooth connection would drop and my automation system would decide that I’d left. That’s not such a big deal if all this does is activate your password-protected screen saver; it’s a different story when it causes your home to completely switch operating modes.

Perhaps I should back up a little. One of the cornerstones of my home’s automation is that it behaves differently depending upon who is at home. For example, if someone is home at sunset, inside lights are turned on for them. If the house is empty at sunset, a different set of lights, and the porch light, are turned on instead.

During the middle of the night, if the system detects that someone is walking in the upstairs hallway, the lights in the kitchen are turned on very low, if that’s the direction they’re heading. However, if nobody is at home, and there’s motion upstairs, the house goes into full “intruder alert” mode!

This sort of thing isn’t hard to set up, and it starts to put the smart in “Smart Home,” but it only works correctly if the information about who is currently at home is trustworthy. Yes, it’s “garbage in, garbage out” all over again. I concluded that Bluetooth proximity detection, used for this purpose, would mostly result in “garbage in.”

But after finding out about the intriguing Home Zone application, I was willing to try it again, and this time I had a new idea. Instead of using Bluetooth to figure out if I have departed, I would use it only for determining that I have arrived.

I guess it seems obvious in retrospect, but this realization made all the difference for me. I’ve been playing with the idea for a few days now, and I’m quite pleased so far.

When I leave the house I press a button, located near the front door, that tells the automation system that I’m departing. This is similar to turning on an alarm system and is an easy habit to get into. (In fact, if I’m the last person to leave, it does turn on the alarm system. For full details on how all this works, see “Hack #70-Know Who’s Home” in Smart Home Hacks.)

Normally, when I arrive home I press the button again so the system knows I’m back. Now, I can eliminate that step by using Home Zone (or Salling Clicker , or Proximity, et al). This is accomplished by having the monitoring software execute the following AppleScript when my phone’s Bluetooth signal is detected.


tell application "XTension"

if (status of "Gordon Home") is false then

turnon "Gordon Home"

end if

end tell

This script works by asking XTension, one of the home automation software programs I use, if it believes that I am currently at home. (Represented by the variable “Gordon Home.”) If XTension already knows that I am home, the Bluetooth detection event has offered no new information, so it is ignored.

However, if XTension believes that I am gone, the detection of my phone’s Bluetooth signal is significant, so the variable that tracks my presence is changed. (Which causes other things to happen, depending upon the time of day and other conditions.) When I first got this working it was an almost magical moment; shortly after walking in the front door I heard my computer announce that I had missed four telephone calls while I was gone, and the lights in the entryway turned on by themselves.

For me, the key to successfully using Bluetooth to detect presence, for home automation purposes, is to track only the first appearance of a device, and even then, only in specific contexts. Inferring meaning from the lack of a Bluetooth signal is difficult; there are many reasons why a signal could vanish. But, the arrival of a new Bluetooth device is unlikely to be spurious, and it gives you concrete, actionable information that is easily incorporated into home automation routines.

Erica Sadun

AddThis Social Bookmark Button

There are three partitions. One, disk2s2 (400 MB) cannot be mounted. OSBoot is 900MB and contains a mini-OS X installation. Media (35.8GB) contains the AppleTV data and looks almost identical to the file system on an iPod.

Erica Sadun

AddThis Social Bookmark Button

Details and picures can be found here at the Make Blog. Reader “Dave” wins the “guess the time of warranty violation” sweepstakes and earns eternal bragging rights via this update post. For the curious I cracked the case about 5 hours after receiving it.

More details and experimentation after the jump…

Erica Sadun

AddThis Social Bookmark Button

Hey all you guys in reader land, I could use a hand. I need a 2.5″ disk drive and USB-2 enclosure and I need to get them both quickly and at a reasonable price (i.e. fast, reliable shipping). I need at least 80G for the drive and the enclosure has to be very Macintosh friendly. Any suggestions? Thanks in advance.

(And yes, this is for the Apple TV. And yes, I do not know why I was convinced it was going to have a 3.5″ drive–which I did have all ready but now can’t use.)

Update: I ended up going to CompUSA, paying far too much, and getting a rotten enclosure. I’m having a lot of trouble with my disk duplication and I think it may be the enclosure–or Apple TV may be using some strange error correction. Dunno. Thanks to everyone for the tips!

Erica Sadun

AddThis Social Bookmark Button

This is a work in-progress. I will continue to update it.

Apple TV User’s Guide [PDF, 1.1MB]

Apple TV Safety and Regulatory Compliance Information Manual [PDF, 573 KB]

Networking

Where do I find the Media Access Control address? On the Apple TV, select Settings -> About. You can also find the Wireless and Ethernet network IDs on the UPC label on the Apple TV case.

How do I set the name of my computer for AppleTV? In iTunes, open Preferences, click General, enter the computer name in the “Shared Name” field, and then click OK.

How do I check to see if the AppleTV is properly connected to my network? On the Apple TV, select Settings->Network and make sure that you see an IP address listed for your unit.

What ports are used by AppleTV? TCP 3689 communicates with iTunes. UDP port 5353 finds networked computers via Bonjour. TCP ports 80 and 443 communicate securely with the iTunes Store over the internet.

Can I stream using 802.11b? No. You need 802.11g/n to stream.

Can I sync using 802.11b? Yes. You can sync with 802.11b/g/n and over a wired Ethernet connection.

How do I connect AppleTV to my network? Select the network from Network -> Configure Wireless or Network -> Configure TCP/IP. If you’re not using DHCP for your TCP/IP network, you may have to manually enter your IP address, subnet mask, router and DNS addresses.

More FAQs after the jump…

Jochen Wolters

AddThis Social Bookmark Button

Sometimes, I can’t help playing the “what-happens-if-I-do-this” game on my Mac, and more often than not, there are neat little features to be found that are scarcely documented, if at all. Here a two finds of this kind:

You will already know that command-dragging the title bar of a window that’s in the background lets you move that window without making it active, i.e., without bringing it to the front. However, this also works for re-sizing: by command-dragging the window’s bottom-right corner, you can resize the window while it stays in the background. Very useful alternative to moving the whole window if you need to get a quick view of what’s behind it.

Another well-known feature of OS X’s UI is that you will see the folder hierarchy that leads to a Finder window’s contents when you command-click the title of the window. This works similarly in most document-based applications like TextEdit, Preview, etc., but some apps use this feature in unusual ways: command-click on the title of a Safari window, and you will see the URL’s hierarchy, instead.

CmdClick_URL.png

Do you know any applications that do unusual things when command-clicking on their windows’ titles?

Gordon Meyer

AddThis Social Bookmark Button

Interest in the messaging service Twitter is clearly on the rise (see this Wall Street Journal article if you’re not already familiar with it), and while most people are figuring out how to use Twitter for its intended purpose–social networking–I’d like to share a few notes on my more prosaic experiment of using it as part of my home automation system.

Home automation enthusiasts, particularly those of the hobbyist bent, have come up with several clever methods of having their systems send them notifications of household events when they’re away from home . For example, the home automation system might send a message to their cell phone when the kids arrive home after school, or when the UPS delivery person has left a package at the front door. (For more about the usual methods for doing this, and other examples, see my MacDevCenter article: Macintosh Home Monitoring. )

Why Twitter?

I’ve been experimenting with using Twitter for automated notifications, and so far I really like the advantages it provides over other techniques.

First, Twitter supports several methods of delivering messages (which are called “tweets” in Twitter-speak). A tweet can be received via SMS to your cell phone, via several instant messaging services, by visiting a web page, or by using specialized apps such as the terrific Twitteriffic.

The best thing about this flexibility is that the recipient chooses how they want to receive their tweets, and changing this setting is easily done “on the fly.” The sender of the message doesn’t need to know which delivery mechanism is currently active, it’s all handled by Twitter. This simplicity is a boon for home notifications which typically either take a shotgun approach and send notifications to several places at once (home, office, and cell phone email), or try to guess (based on time of day or other data) what the best destination might be. Letting the recipient determine where they want to receive messages, at any given moment, makes delivery much simpler and more reliable.

Finally, Twitter has a simple HTTP-based interface for sending messages. Instead of having to script an email program, or an SMS utility, sending a tweet is as easy as having your home automation system open a URL.

My First Implementation

This is an example of a notification sent to me, from my XTension-based home automation system, indicating that someone has been on my front porch.

Here’s how the same message appears on my personal Twitter web page:

When I’m away from a computer, I change my Twitter preferences to send tweets to my phone, instead. Twitter can also relay messages using iChat (AIM), GoogleTalk, LiveJournal, and Jabber but I’ve had mixed success with the reliability of delivery over IM systems, so I don’t use those options.

Getting Started

You’ll need two Twitter accounts. A personal account, for yourself, which you’ll use to receive the messages sent by your home. If you want to receive messages via SMS and IM, you’ll have to configure, and confirm, those details in your Twitter account settings.

The second Twitter account is for your home automation to use when sending the notifications. When you create this account, you will probably want to select the “protect my updates” option so that your notifications aren’t available to the public at large. Then, add your personal account as a “friend” of the home’s account so that you can receive the messages.

Implementation Details

Here’s how I currently have this working. Some of these details are specific to XTension, one of the home automation applications I use, but the concept is adaptable to other systems. (See Hacking the Hack, below.)

When a visitor comes to my front door, XTension receives a signal from a motion detector. (Readers of Smart Home Hacks will find the full details about how the visitor is detected beginning on page 271.)

The motion detector activity causes XTension to run a script that constructs a message telling me what happened, and copies the message to the Description field of a unit called “Notify Twitter.” (This is one method of passing variables in XTension.)

In the example below, which shows XTension’s Master List window, the Description of the Notify Twitter unit has been set by this script to “Somebody is at the front door!”

Next, the motion detector’s script sets the value of Notify Twitter to “On,” which causes the script attached to the Notify Twitter unit to execute. This script does the following:

  1. Retrieves the message text from the Description field.
  2. Formats the message and Twitter login information.
  3. Sends the message and login info to Twitter’s status API.

Here’s the script, which borrows some code from Tilman for using curl to send a Twitter status message:

set theMessage to description of me

set TwitterID to "yourID"
set TwitterPassword to "yourPassword"

set TwitterLogin to TwitterID & ":" & TwitterPassword

set TwitterStatus to quoted form of ("status=" & theMessage)

set results to do shell script "curl --user " & TwitterLogin & " --data-binary " & TwitterStatus & " http://twitter.com/statuses/update.json"

You’ll need to enter the login and password for your home’s Twitter account, as noted in the script.

Shortly after running this script, the message is delivered via Twitter, as illustrated earlier. It’s a simple as that.

Hacking the Hack

There are several ways in which this script can be used and adapted. For example, I’m using a variant of it with PhoneValet, to send CallerID information when someone calls my office phone. (See Growling PhoneValet for a starting point if this interests you.)

If I had a security camera on my front porch, it’s easy to imagine including a URL, in the tweet, that would lead to a snapshot taken at the time the motion was detected. Although, depending on the length of your URLs, you might need to utilize something like TinyURL to shorten it before sending. Twitter limits the size of tweets to 140 characters.

If you use Indigo, another Mac-based home automation application, the above script will work just a few modifications. Instead of passing the message text using the Description field, use an Indigo global variable.

If you use MisterHouse, an open source home automation application for Mac, Linux, and Windows, you’ll need to adapt this technique only slightly, replacing the AppleScript portions with Perl.

I’m continuing to tweak and adapt the basic idea here to new applications, if you have a suggestion or enhancement, please let me know what you come up with. Thanks, and have fun tweeting!

Erica Sadun

AddThis Social Bookmark Button

If video exported from your iPod is playing on your PAL TV in black & white, you probably need to set your video output settings to PAL instead of NTSC. For whatever reason, I’ve been contacted by several different people about this problem in the last month.

Hope this helps.

Giles Turnbull

AddThis Social Bookmark Button

A friend called the other day. She works at a web development company where most things are done on Windows, but a lonely eMac is kept sitting in a corner to ensure that the sites they produce look good in Mac browsers.

My friend had downloaded a new version of Firefox for OS X and was trying to install it.

“I don’t understand,” she said.

“I’ve downloaded it and got a dmg file on the desktop. I opened that but now I’m really confused.”

What my friend was looking at was this:

firefox-dmg.jpg

Erica Sadun

AddThis Social Bookmark Button

So I decided to give the new QuickTime 7.1.5 AppleTV export format a whirl. I wanted to find out what kind of size and bitrate would be produced by this QuickTime preset and see what kind of conversion times we’d be talking about.

I needed something pretty high quality to begin with so I started off in EyeTV with a relatively small (7 minute, 760 MB) High-Def recording. As you might recall from earlier articles in this series, EyeTV stores video as raw MPEG-2 transport streams. You cannot read these directly into QuickTime Pro, so you need a good quality intermediate format particularly because you cannot export directly to AppleTV in the current (2.3.3) version of EyeTV. I decided to export to 720p HDVideo as a first step and then use QuickTime to convert for AppleTV. For the curious, EyeTV’s 720p HDVideo is 1280×720-pixels at 29.97 fps.

I then imported the several gigabyte result into QuickTime Pro and chose File -> Export and choose Movie to AppleTV from the Export pop-up. There are no further options or settings to customize the output. (The Options button is disabled and you can only use Default Settings.) Enter a name and click Save to perform your conversion. The conversion for this clip took over a quarter-hour on my 1.66 GHz Intel Core Dual with 1GB RAM. I gave up and hit “cancel” long before it finished on my aging 733 G4, but we were at over an hour at that point.

The resulting video looked very nice indeed. Clocking in at just under 200MB (about a quarter of the size of the original HD video, and way, way smaller than the intermediate HDVideo video), the quality was excellent. (You can download sample screenshots here.)

Details:

Format. H.264, AAC, 44.1kHz, 29.97fps

Data Rate. 3884.70 kbits/sec

Frame Size. 960 x 540 pixels

Erica Sadun

AddThis Social Bookmark Button

So I asked the question: is AppleTV going to be a new kind of iPod? Chuq Von Rospach, replying by e-mail, suggested that as an iTunes-slaved appliance, AppleTV will be similar to but in a different class from the iPod. Neither one is meant to be a central processing hub and both serve stored data but they’re used in very distinct ways.

Robert Daeley

AddThis Social Bookmark Button

Cool tip discovered just now whilst watching a video podcast in iTunes.

Robert Daeley

AddThis Social Bookmark Button

“Colors and Prompts in BASH” is a quick how-to on putting some color and utility into the otherwise austere command line prompt for the popular shell.

Bourne Again Shell offers a lot of power, flexiblity and fun. Many new Unix users do not realize the flexibility of the shell environment; indeed; many new Unix users regard the shell as primitive and too restricted: nothing could be further from the truth. With very little time investment a new Unix user can learn how not to just make their work environment in the shell more productive but even a little fun.

Since bash has been the default shell on Mac OS X for at least a couple of cats now, this guide does the trick for us as well.

At the end, the post links to the mother of all prompt articles, the aptly named “Bash Prompt HOWTO” at faqs.org. Coming in at 140KB and over 17,000 words, this awesome guide will enable you to make all kinds of useful tweaks.

Most Linux systems have a default prompt in one colour (usually gray) that tells you your user name, the name of the machine you’re working on, and some indication of your current working directory. This is all useful information, but you can do much more with the prompt: all sorts of information can be displayed (tty number, time, date, load, number of users, uptime …) and the prompt can use ANSI colours, either to make it look interesting, or to make certain information stand out….

While you’re messing around on the command line, go grab a download of the “new” iTerm beta, version 0.9.5. I say “new” since it was released at the beginning of February, but I didn’t come across it until yesterday. :) Unfortunately, I kinda got distracted and otherwise occupied right about then, so I missed the update. Only been a day, but it seems to be operating better already. I did trash the old 0.9.0 preference and Application Support files before launching, but I don’t know if that was strictly necessary.

(Via rootprompt.org)

Erica Sadun

AddThis Social Bookmark Button

I apologize in advance for disjointed nature of this post. I’ve been thinking a lot over the last few weeks about how Apple intends you to use AppleTV and my time spent going over the new AppleTV strings in iTunes 7.1 has made me explore some new areas of thought.

It all comes down to this. Apple seems to think that AppleTV is an iPod:

  • They display it as part of the iPod store:
    iPodStoreimage.jpg
  • The AppleTV strings in iTunes 7.1 show functionality that’s very close to the standard iPod strings: playlists, syncing, movies, songs, photos, etc.
  • It’s only got a 40 GB hard drive! For video. Even presumably high-quality video. That’s iPod-levels of space, not media center-levels of space.

More after the jump…

Jochen Wolters

AddThis Social Bookmark Button

In what is easily the most concise tutorial I’ve seen on this topic so far, Melvin Rivera explains how to enable support for email signing and encryption in Mail.app. All that’s required for basic encryption is to request a personal security certificate and add this to your Mac’s keychain. No need to install additional software or configure anything, as Mail and Address Book support these features out of the box.

Its underlying basics like the concept of public-key cryptography haven’t changed, but email encryption has come a long way in terms of usability: add that certificate to your keychain, and encrypting your emails is as easy as clicking a button. That’s a big change from the early command-line tools, and it makes encryption accessible even to less experienced users. Why, then, is it that so few people actually encrypt their emails?

Consider this: as you may know, standard email is sent along the Internet as plain text, so that anyone with access to one of the computers along which that email travels from sender to recipient could theoretically read what you’re sending. The often-used comparison between an email and a postcard is very appropriate. In the analog world, though, we tend to prefer mailing a letter in a sealed envelope unless we send greetings from our far-away vacations, in which case postcards come in handy to make even the postman envious…

“Postcards” in the digital realm, envelopes in the real world. Where does this discrepancy come from? How about you, dear reader: do you use email encryption? If so, what kind of encryption (i.e., PGP, GPG, S/MIME, …) are you using, and which kinds of messages do you encrypt? And how many of your friends use encryption, too? If you do not use email encryption: is there a specific reason — like difficulty-of-use, lack of trust in the system, etc. — that keeps you from doing this?

Let’s find out what it takes to make email encryption more popular. Or is it already more popular than I think?

P.S.: I learned about Melvin’s article via Hawk Wings.

P.P.S.: For a much more detailed look at encryption and certificates, have a look at FJ de Kermadec’s article “How to Set Up Encrypted Mail on Mac OS X“.

Erica Sadun

AddThis Social Bookmark Button

Here is a list (in PDF format) of the localizable AppleTV strings from the 7.1 update of iTunes. There is a whopping amount of stuff (10 pages worth) added to iTunes that’s AppleTV specific. Highlights include support for AppleTV games (presumably along the same lines as iPod games), mounting and ejecting AppleTV, manual versus automatic synching, voice memos, photo album support (Aperture, Photoshop Elements, more), support for the Nike + iPod voice kit (how is that going to work with AppleTV?), calendars & contacts, and AppleTV-compatible video (same as iPod): Download file

Erica Sadun

AddThis Social Bookmark Button

Picture 1.png

Last year, I talked briefly about iPodcasting, by which I mean hooking up an iPod to an A-to-D converter and using iChat AV to broadcast a video over the Internet. Over the last few months, I have found this is something I do pretty regularly and one of the nice tricks I’ve discovered along the way involves sending video to someone who does not have a camera hooked up at their end.

By control-clicking (right-clicking) a buddy’s name, a contextual menu pops up offering the option to invite that person to a one-way video chat. This means that they can watch your video but will not send video back to you in return.

Probably one of the nicest things about a one-way video chat is that when you’re playing a video off your iPod, you don’t have to watch the other person watching your video. You don’t have to see them adjusting their hair, performing nasal maintenance, or any of the other unconscious things people do when they get involved in watching TV as opposed to engaging actively in a social situation. If you plan to iPodcast video, I suggest that your buddy switches off their camera. Do a one-way chat instead.

Update: Brian Sawyer over at HackZine thinks one-way video is a great match to teaching skills like knitting. Thanks Brian!

Giles Turnbull

AddThis Social Bookmark Button

One of the myths about OS X that pervades among Windows users is “There’s no right-click options, because you can’t right-click on a Mac.”

Well, of course you can right-click on a Mac, if you just plug in a standard USB mouse. Or you can Control-click, or use any of the default clicking-and-tapping arrangements on offer in those new-fangled Mighty Mice. Whatever means you use, a contextual menu is never very far away.

Windows users have all sorts of options to expand what the computer offers them when they right-click, and might think that the same expandability is not available in OS X. It’s easy, though, thanks to Automator.

Ever since Tiger was released, I’ve tinkered with ideas for Automator-based contextual menus. None of the workflows I’ve created has ever been very complex (most of them are just two or three actions long), but several have been incredibly useful. Especially because they can be saved as Finder plugins, and therefore made available in every right-click contextual menu that appears.

David Battino

AddThis Social Bookmark Button

Ah, interruptions. These days, when the phone rings or someone butts in, I hit the F13 key on my Mac. If music is playing, iTunes smoothly fades it down to silence and pauses itself. After the coast is clear, I hit F13 again and the Mac asks what volume I’d like playback to resume at. Hit Return and the music fades back up. The effect is more pleasing than simply stabbing the Mute key, and it means I don’t lose my place. Further, being able to enter a volume directly is often nicer than messing with the volume up/down keys.

itunes-stop-shadow.jpg

Launch the script when iTunes is playing, and you’re prompted to enter a new volume level. The default is 0, creating a fadeout.

It’s all done through this AppleScript I assembled from snippets at OSX Hints and Doug’s AppleScripts, plus some experimentation. I mapped it to the F13 key using the no-longer-available LumaCode Key Xing, but it should work fine from other AppleScript launchers.

Giles Turnbull

AddThis Social Bookmark Button

Cocoalicious is a neat open source app for posting links to a del.icio.us account, and browsing through your del.icio.us library (pun intended) outside of your browser.

Sadly, for some users recently, Cocoalicious has been broken. For some reason it simply wouldn’t connect properly to del.icio.us accounts. Old links were stored just fine, but new ones couldn’t be added. At least, that’s how the problem manifested itself to me.

Anyway, the good news is that there appears to be a work-around. Take a look at the very final comment on this blog post and you’ll find simple instructions for amending the Keychain item for your account in Cocoalicious - doing this seems to get things working once again.

David Battino

AddThis Social Bookmark Button

With all this podcasting I’ve been doing (iTunes link), my G5 tower’s 250GB hard drive is almost full. Perhaps not coincidentally, this ol’ Mac has been rather cranky lately. I remember reading that once the free space on your system drive dips below ten percent of its capacity, OS X starts to exact revenge, crashing randomly and forgetting things. That sure sounds familiar.

Be that as it may, I just ordered a 500GB internal drive to start offloading some of the detritus like audio sample libraries and disk images for DVDs I hope to watch someday.

The last time I installed a secondary drive, I was so awed by its relative size (20 times bigger than my stock Mac drive!) that I partitioned it into five slices. After a while, that just became a hassle.

So this time, I’m wondering: What would you recommend? One partition for a basic system backup and the rest for files? One big partition? Seven little partitions named after short men with pointy hats? Leave a comment and let us know what works for you.

250GB gone
GrandPerspective says, “You’re outta room!”

UPDATE, 2007-03-03: The drive arrived today and, keeping all of your comments in mind, I set it up with just one big partition. Using Grand Perspective, I found that the biggest space-sucker on the old drive was ripped DVDs, so I transferred all of them to the new drive—regaining 95GB in the process! Kinda embarrassing to realize I’m that far behind in my movie-watching.

Erica Sadun

AddThis Social Bookmark Button

Now that I own my own HDTV, I decided to see how the widescreen movies I encoded for my iPod played back in high def. I connected my iPod to my new TV. In Videos -> Video Settings I set both Widescreen and TV Out to “On”. Then I selected a video and played it.

There are a couple things you need to take into account when connecting to your HDTV from the iPod:

First, you are creating a standard definition signal from your iPod. To the best of my knowledge the current generation of iPods doesn’t do HDMI or anything like that. So you’re going to want to compare your video quality to the way DVDs play back on your TV and not, say, a true High Definition signal.

Second, you’ve got to use your most optimal compression for that big screen and that means QuickTime Pro. It allows you to bypass the published iPod 768 kbps limits and produce 624×352 video at 1600+ kbps. Obviously, you can produce better video quality than that, and you can even watch it in iTunes or Front Row, but it won’t sync to your iPod.

More after the jump…

Robert Daeley

AddThis Social Bookmark Button

Thanks to a post on Lifehacker, I found out about the It’s All Text Firefox plugin that lets you edit any text area in your favorite editor.

From the comments on the plugin page, some Mac users have had issues with getting it to find their editing applications, and it is still in beta, so your YMMV.

What I did as a workaround was point the plugin at the /usr/bin/open utility. This will open the field’s content in a document in whatever app you have as your default text-file opener — as man open says,

The open command opens a file (or a directory or URL), just as if you had double-clicked the file’s icon. If no application name is specified, the default application as determined via LaunchServices is used to open the specified files.

Hopefully they will get this working properly soon.

Erica Sadun

AddThis Social Bookmark Button

Apple just released a nice support doc detailing AirPort Extreme (802.11n) USB drive support. Looks like you can use HFS+, FAT16, or FAT32 with a 512-byte block size. (Apple notes that not all USB storage devices use 512-byte blocks.) No RAID volumes and no partitions allowed. (Update: At least that’s the official word. In the comments below, Jason reports that he’s had no problems using a 2-partition disk with his new AirPort Extreme.)

David Battino

AddThis Social Bookmark Button

My G5 tower crashed today, so I thought I’d reboot it from the Disk Warrior CD and clean out the demons. But first I had to get sneaky.

Holding down the mouse button so the CD tray would open on reboot, I hit the Mac’s power button. I heard the glorious startup sound, then…nothing. So I powered off again, slid the CD drive cover down with my finger, and poked a straightened paper clip in the tiny hole under the drive to open it. (It sounds ridiculous just reading this back.)

Plopping in the CD, I started up again while holding down the C key so the Mac would boot from the CD drive. And…nothing. Hmm. Had I damaged the drive by forcing it open?

Erica Sadun

AddThis Social Bookmark Button

Remember Bruce’s post a few weeks ago about storing his iTunes Library on S3. He said he’d be willing to spend $75 a year to be able to back up his data and access it from anywhere in the world. He was all ready to sign up until the realities of S3 costing dropped into his lap. At $0.20 per GB transfer and $0.15 per GB per month storage, it would end up costing him a lot more that $75/year.

Well, there may now be a solution. Bandwagon (formerly Xacktunes) will offer unlimited S3 storage for your iTunes for only $69/year (at least as an introductory price). No, this isn’t a “take it with you anywhere” scheme, but rather a back-it-all-up so you don’t lose your purchases when your Mac dies: music, videos, audio books, plug-ins, everything. It doesn’t matter whether you rip it yourself or you buy it from iTunes.

More after the jump…

Erica Sadun

AddThis Social Bookmark Button

Over at pbs.org, the “I, Cringely. The Pulpit” column takes on AppleTV, particularly asking why the Mac Mini, Airport Extreme and AppleTV share the same stackable footprints: “There is simply no imaginable situation where you would want to stack together these three components that are clearly made to be stacked. Unless what you want to do is somehow connect the Apple TV to the Mac Mini through the AirPort at a range of three inches just to take advantage of 802.11n, which the Apple TV and the AirPort Extreme have but the Mac Mini doesn’t. Well that’s just crazy.”

The columnist suggests that perhaps Steve Jobs is just messing with us–or that the seeds of a peer-to-peer movie distribution network can be found within the AppleTV’s always-on state. A Peer-to-peer system, he suggests, could reduce the network costs for iTunes, “making the network costs effectively free. Hello HDTV!”. Except of course, for that wonky DRM stuff.

Cool article. Read it all.

Erica Sadun

AddThis Social Bookmark Button

If you haven’t gone over to play with the new Yahoo!Pipes yet, you just might want to give it a try. It’s kind of like a Quartz Composer/Tinker Toy-inspired layout system for information and it’s tons of fun. Pipes allow you to collect and filter information to create custom information feeds.

To get started, visit Yahoo Pipes via Firefox. (Pipes works a lot better with Firefox than Safari.) Click “create a new pipe” and log into your Yahoo account.

More after the jump…

Erica Sadun

AddThis Social Bookmark Button

Apple just posted a fabulous article which does exactly what the name of this post suggests. If you’re interested in QC and/or Widget building, pop right on over and read it.

I haven’t tried this yet, but with Dashcode, “you can simply drop your Quartz Composer composition in the widget without writing a single line of code. Note that Dashcode is going to ship with Leopard, but is available now as Beta software”.

Erica Sadun

AddThis Social Bookmark Button

After Sunday’s big wipe-the-Mac-Mini-and-reinstall-Tiger exercise, I took a look at my collection of recently-installed disk images to see what items turned out to be the most critical for getting back up to speed. Admittedly, I’m using the Mac Mini for recording and playing back TV so these images skewed heavily video. There are many titles I use daily on my main Mac (like Photoshop and Microsoft Word) that would never show up on my test unit. And there are some items, like MPEG Streamclip that are seeing a lot of use these days on the mini, which wouldn’t get all that much day-to-day use on the primary Mac. Hopefully there might be someone out there in readerland who will get a kick out of the following list.

Erica Sadun

AddThis Social Bookmark Button

So I spent all of yesterday reformatting my Mac Mini, repartitioning and reinstalling Tiger. Why, you ask me, would you bother reinstalling Tiger? Because, my dear readers, I made two (count ‘em) backups of my developer operating system partition and none of the Tiger one.

Stupid me.

[more after the jump]

Erica Sadun

AddThis Social Bookmark Button

Not all is perfect in High Def land. As you may recall, I purchased an EyeTV Hybrid to accessorize my Mac Mini in anticipation of the release of AppleTV. I’m trying to build a high def streaming media center to be able to bypass TiVo and enjoy HDTV recording on my Mac. Today’s post is the complaint post. It’s about all the little bits that are bothering me about my setup with EyeTV and the Hybrid. All these problems occur under normal EyeTV/Hybrid operation running under a standard installation of Tiger. I’m ignoring any flaky behavior I observe while running EyeTV under developer preview operating systems.

The channel listings don’t always update. Having channel listings that you can browse and select for recording is one of the key selling points of the EyeTV software. Unfortunately, those listings are not consistent. Although I have not had any problems downloading standard analog cable listings, I’m running into repeated problems keeping digital over-the-air broadcast listings up to date. No amount of restarting the computer, restarting the program or selecting “Update TitanTV Guide” has worked in terms of updating the program guide. Right now, I’m trying to see if I can fake the program out by messing with the global Application Support folder, but so far no luck. Instead, I have to launch a browser, navigate to TitanTV and download “tvpi” files from the TitanTV site. I can then load these schedules into EyeTV for future recording. This is a complete pain.

Don’t “touch” the computer while recording. My 1.66 GHz Intel Core Duo with 1GB RAM is “underpowered” when it comes to HDTV recording. Any interaction with the system taxes it beyond what it can handle, producing breaks and interrupts in the recorded data. To produce a clean recording, I have to set the schedule and then leave the computer alone until the recording completes.

The program can get confused. The other day, my iPod export of an EyeTV show finished just as another show was due to start recording. Guess what happened? Nothing. The program missed the recording and never started, instead getting hung up in an odd “about-to-start-recording” mode. I have owned a TiVo since 2000. It has never gotten so confused between playback and recording that it missed a show.

The iPod output tags are confused. For whatever reason, when EyeTV exports video to iTunes, the episode name is set as the “Artist” and the TV show is the “Name”. This results in episodes of SpongeBob being called “SpongeBob Squarepants” as part of a TV Show called (for example) “King Krusty”.

In-program export is fracking slow–and incompatible. Using MPEG Streamclip to convert video is approximately an order of magnitude faster than EyeTV. It’s insanely and unnecessarily slow. And the iPod video it produces often doesn’t even sync to my iPod without reconverting through iTunes or QuickTime.

Erica Sadun

AddThis Social Bookmark Button

The Husband: “What’s wrong with the new HDTV? Every time they show the game, it gets all fuzzy and gray.”

Me: “That would be because it’s raining.”

The Husband: “Oh. Right.”

It actually looks fabulous and the TiVo-like replay buffer built into the EyeTV software for High Def reception worked beautifully. Especially when 14 seconds into the game you realize you just missed a touchdown.

Update: So Superbowl finishes, and I start taking down all the computer equipment to move it back to the office. Husband asks: “The HDTV was great but isn’t there a better way to do this where you don’t have to move the computer into the living room for us to watch?” “Yes,” I reply. “It’s called AppleTV and it will be here in just a few weeks.” Can’t wait!

Erica Sadun

AddThis Social Bookmark Button

Just a few brief updates this afternoon before I start getting ready for the weekend–and for (da da dummmm) Superbowl Sunday.

First, my decision to load Tiger into a new partition has worked amazingly well. I’m running EyeTV 2.3.3 and it seems bypass all the bugs I had under my nonstandard OS. Both remote controls–Apple and EyeTV–work exactly as advertised with the EyeTV software, which means I can hide the mini’s keyboard and mouse in a drawer. I was delighted to find that a button on the EyeTV remote allows me to turn closed captions on and off without having to use a menu. Very convenient! I can now understand what Milo Ventimiglia is saying in his scenes. (For whatever reason, I had no problem understanding Christopher Eccleston.)

More after the jump…

Robert Daeley

AddThis Social Bookmark Button

Via macosxhints.com comes this cool article, “Display Flickr collections as desktop backgrounds”, which describes subscribing to RSS feeds as Photocasts via iPhoto.

Have a friend or family member who posts images to Flickr that you continuously visit? Are you a member of a Flickr group and want to see what’s new? This hint uses the RSS feeds from Flickr and Photocasting in iPhoto to display images as your desktop background….

Of course, you could also subscribe to your own photo feed, or tag-based feed — like, say, ATHF, so you can keep up on the latest in the Global War on Error.

Erica Sadun

AddThis Social Bookmark Button

I have until now dedicated my Mac Mini to a WinXP partition (via BootCamp) and another partition to test out a certain nonstandard version of OS X, of which I cannot say more due to nondisclosure and Apple’s Men in Black. Having decided to use the Mini for all my High Def experimentation with EyeTV, etc, it’s been a bit of a pain using this configuration. I haven’t been able to upgrade to the latest version of EyeTV because it goes crashy crashy under the nonstandard OS, and previous EyeTV versions which are more stable will not export video from the program itself.

More after the jump…

Erica Sadun

AddThis Social Bookmark Button

TVPlaybackSo the new replacement HDTV set arrived yesterday, and all seems to be well. It’s so many lightyears of wonderfulness beyond anything we had with our old Quasar–and it’s very, very flat. My husband, about whom I shall shortly say more, kept pointing out to my youngest guy how if you look at the TV set sidewise that it’s so thin that it practically disappears.

More after the jump…

Erica Sadun

AddThis Social Bookmark Button

So last night I recorded Heroes in High Def, without incident. It seems as though my EyeTV Hybrid likes certain channels (like NBC) and hates others (like CBS). I live inside the city, very close to most of the transmission towers, which are all compass-wise in the same direction, so I cannot guess why some channels beat others for receptions.

The recording occupied about 7 gigabytes of MPEG-2 transport stream data. I attempted to load it into MPEG Streamclip, but Streamclip could not handle the 7 gigabytes on my 1 GB 1.66 GHz Intel core duo mini. It coughed, it gagged, it wheezed, it gave up the ghost. So I decided to edit the show in EyeTV instead.

This turns out to have been a horrible decision.

(More after the jump…)

Todd Ogasawara

AddThis Social Bookmark Button

Visio 2007 running in Parallels Coherence modeReader J.H. asks: When you use Visio on the Parallels Desktop, is operation of Visio as good, smooth and fast as using it on Windows XP? I tried Visio once on Virtual PC and found it unsatisfactory. Visio is the main reason my office
is not a Mac office.

J.H., out of courtesy, asked for a simple yes/no answer. Unforunately, I wanted to provide a bit more detail :-).

Virtual PC for the Mac was slow for a couple of reasons. First, it is an emulation solution. It actually had to emulate an Intel CPU to run the Windows code and application code installed on top of it. Second, it is pretty clear that the PowerPC G4/G5 processors were definitely slower than the Core Duo and Core 2 Duo commonly found in most Intel Macs out in the wild today.

Parallels has the advantage of being a true virtualization option that works directly on an x86 architecture. Moreover, the Core Duo and Core 2 Duo (and Xeon Woodcrest) have the Intel-VT virtualziation assistance built into the hardware. Basically, virtualized OSes including Windows XP and Linux fly on it an Intel Mac running Parallels Desktop for Mac.

The, BUT…, comes into play if you bought an Intel Mac early in the release cycle and didn’t bump RAM up to 1GB or more. I would hesitate to run Windows as a Guest OS on a 512MB MacBook, for example. However, if you have 1GB or more of RAM, set Windows XP SP2 with at least 512MB RAM for its virtual machine and Visio and other apps seem to run pretty fast to me. Combine that with Parallels Coherence mode that lets you run Windows applications in what looks like its own window under Mac OS X, and the experience feels nearly seamless (Windows apps menus always are Windows-like vs. Mac-like, of course).

So, if you have at least 1GB RAM on a Core Duo or Core 2 Duo (not so sure about a Core Solo in the original low-end Intel Mac mini), you should be able to run Visio and other Windows applications comfortably using Parallels Desktop for Mac.

Erica Sadun

AddThis Social Bookmark Button

So I’m still working on figuring out how to streamline the process of exporting from EyeTV into iTunes. Yes, in theory, you should only have to click iPod or Export let EyeTV do all the work. A few problems though: (1) I’m running EyeTV under a nonstandard version of the operating system (of which, I cannot say more without the Apple death squad visiting) and the Export/iPod functions simply do not work; and (2) EyeTV exports H.264/AVC 320×240, MPEG-4, which is not nearly the resolution I want to display on my upcoming AppleTV. So that leaves me working with things in a much more roundabout fashion.

So I thought, well, I’ll just use MPEG Streamclip to export my video. Normally I use QuickTime Pro to create my iTunes video. So I opened up a video I’d recently converted, made sure I matched all the settings between the Streamclip output and the QuickTime output–same bitrates, audio, frame size, etc. I dove into the EyeTV bundles, created an alias for the raw MPEG-2 transport stream data, loaded it into Streamclip, converted it, and loaded it into iTunes, where it played fine.

And then I tried to sync my iPod. Bzzzzzzzzzt. No go. No luck. No how. Even though I kept every setting the same, even though everything seems to play identically in QuickTime, I apparently created a file that wasn’t “blessed” enough to sync to my iPod. So I googled a lot. And I found out it wasn’t just me. QuickTime just seems to be able to exceed the 768 kbps, 320×240 official specs, but Streamclip can’t. See this video info? It syncs perfectly to my 30GB video iPod. And that’s 1655.78 kbits/sec. By my reckoning (checks on fingers a few times) 1655 is bigger than 768. But when I try to sync a non-QuickTime file on iTunes, I get the dreaded “Your video cannot be played on this iPod” message. Grrrr!

RecentVideoQTime.jpg

So I decided to try converting with QuickTime instead. And this is a good example of barrelling forth with things about which you know better, but you get into a wrong thinking groove and then have a simpsonesque D’oh moment after. I decided to use Streamclip to convert the transport stream into a normal MPEG-2 file. It’s fast and it’s easy, even though it takes up extra disk space. I loaded it into QuickTime, I exported to “iPod”. And there was no sound. D’oh! Damned multiplexed audio. I should have known better.

Now, it’s not as if I can’t export directly from Streamclip, keeping the settings to 320×240 and under 768 kbps and it will (in fact it did during my tests) sync to the iPod, but what’s the point of playing 320×240 video on a 720p display–which is the intended endpoint of this exercise? So here’s what I ended up doing for now:

Standard Def video: Open the EyeTV transport stream file in MPEG Streamclip and export to standard 320×240 iPod video.

High Def video: Open the EyeTV transport stream in MPEG Streamclip, export to a reasonably sized 16:9 format like 720×405 or 640×360. Open the converted video in QuickTime Pro and export using iPod settings.

Clearly, I’ve still got a ways to go here. I’m really hoping that the upcoming versions of QuickTime and iTunes hinted at in the AppleTV specs offer better video conversion and syncing capabilities to take better advantage of homebrew video resolution.

I’m also looking forward to some real highdef content over at the iTunes Store, but that’s a whole ‘nother matter.

Robert Daeley

AddThis Social Bookmark Button

Most users who’ve been using their Macs for a goodly amount of time know about the ability to “print” pages to PDF files, whether for simple preview, storage, or whatever else. There are a few other options available, though, that can be quite handy.

Like this morning, when I came across this recipe for Cherry tomato soup with basil, which looks simple enough to make and sounds quite tasty, especially on these frigid Southern California winter days where the temperature is plunging into the low 70s and the blue skies are kind of hard to look at due to the gorgeous mountains distracting you in the distance. Ahem.

Anyhow, like many newspaper sites, the San Jose Mercury News has an option to view a “print this” page, as well as “email this.” The recipe sounded like something a couple of different friends of mine would enjoy. Rather than submit my buddies’ email addresses to unknown processing potential, I clicked on “print this,” since it’s often nicer to email that link, or even copy and paste from the simpler layouts.

It occurred to me looking at the print-this page (since ingredient lists often get screwy in copy-paste) that I could probably email small PDF files just as easily. So I hit Command-P. As I did, I thought — hey, it would be nicer to email a PDF automagically rather than finding a saved file somewhere in the filesystem.

Sure enough, clicking on the “PDF” popup menu revealed this spiffy list,

screenshot of PDF print menu in OS X

including “Mail PDF” — score! Selecting the command results in a Workflow Action being called, then a new mail opens with the PDF attached.

And dig all those other PDF options! Looking back at that menu, though, check out the last command. “Edit Menu…” brings up this palette,

screenshot of Edit PDF Menu palette in OS X

The + button summons a navigation dialog box to choose your own scripts.

This suggests to me all kinds of possibilities, from automatically sending PDFs to your blogging software, to creating a web clipping service, to faxing online account statements to your tax people, to writing shell scripts that could do just about anything else you can think to do with PDFs.

And all that from cherry tomato soup with basil.

Now if you’ll excuse me, I think I need to close the window blinds — the sunshine is getting kind of bright in here. ;)

Robert Daeley

AddThis Social Bookmark Button

From the opening chime to the login window, there is quite a bit of activity going on behind the scenes during the Mac OS X boot process. Nowadays with newer versions of the OS, that process takes hardly any time at all. Old timers will remember the slow march of system extension icons in the paleolithic age, pre-OS X.

This page at kernelthread.com, “Mac OS X System Startup” uncovers the after-hitting-the-power stuff. A sample from the beginning:

  • Power is turned on.
  • Open Firmware code is executed.
  • Hardware information is collected and hardware is initialized.
  • Something (usually the OS, but also things like the Apple Hardware Test, etc.) is selected to boot. The user may be prompted to select what to boot.
  • Control passes to /System/Library/CoreServices/BootX, the boot loader. BootX loads the kernel and also draws the OS badges, if any.

(via rootprompt.org)

David Battino

AddThis Social Bookmark Button

I’m back from America’s largest musical instrument and software trade show, where the big software surprise was…the Pause button.

There were no major updates from Apple (Logic/GarageBand) or MOTU (Digital Performer). Ableton (Live), Digidesign (Pro Tools), Steinberg (Cubase), and Sony (Acid) were showing revs they released last year. Cycling ’74 had an unmanned kiosk. And Spectrasonics, a NAMM fixture for its powerful demos, stayed home.

NAMM 2007 Propellerheads

No new Reason, but Propellerheads did play sounds from its upcoming Thor “polysonic synth.”

Of course, there were still acres of cool new music gear to fondle, and I’ll be sharing my favorites over on the O’Reilly Digital Media blog. But when I asked several developers privately about the dearth of new DAW software, they all said they’d been struggling with porting their code to Intel Macs. (The Windows developers, of course, have their own challenges with Vista, although Cakewalk did score a hit by announcing Sonar would be Vista-compatible this month.)

By all accounts, music software performance on Intel Macs is much improved; several musicians said their MacBook Pros outran even quad G5s. But as one programmer told me, “Everyone used a lot of workarounds to make things run in OS X, and those don’t work anymore on the Intel chips.” He predicted that within the next year or two, we’d see some major advancements.

Personally, I hope those advancements are in usability. At the annual Grammy Soundtable, it was striking how many of the top producers on the panel used multiple parallel DAWs to make their music. More than a decade after Opcode merged MIDI and digital audio in a single program, we’re still searching for the best flow.

Erica Sadun

AddThis Social Bookmark Button

S3 Browser offers a free open-source tool that allows you to connect to Amazon’s Simple Storage Service. With it, you can upload and download data to this online storage service as well as set your access control restrictions for that data.

s3-screenshot-thumb.pngS3 Browser screen shot from the developer. Click to open at full resolution.

More after the jump…

Erica Sadun

AddThis Social Bookmark Button

We finally did it. We’re going to replace our 10-plus-year-old bargain-basement Quasar (got it refurbed over at the Panasonic outlet when they were still in business here) with HDTV. We’re getting this 32-incher HDTV from Costco. I put the order in last night.

I’ll be honest: the purchase had more than a little to do with the AppleTV timing but we’ve also been looking for a better TV for a few years now. For my shopping list, it had to have a built-in ATSC and QAM tuner. It had to have 720p and 1080i. It had to have HDMI and component inputs. (As a bonus, this one also has VGA and composite-in.)

Of course, larger might have been better, but this unit kind of hit the sweet spot of what we could afford versus size. It also had lots of happy reviews, free shipping and Costco’s generous return policy.

So here are my questions to the readers: are there any requirements we’ve messed up on or totally missed? (Just want to make sure before the thing actually ships!) I’m planning to hook up my Intel mini to it directly and use VLC, and later switch over to the AppleTV when it ships in February. Other than the HDMI cable, what else will I need to buy? We’re not going to wall mount the thing (at least for now) because it’s going to sit on an existing side table.

Any thoughts or insights or even “you bought what!!!??”’s will be greatly appreciated, especially from those of you who are using your minis as media centers.

Erica Sadun

AddThis Social Bookmark Button

Wow. All the negativity. Even our own Jochen isn’t impressed. Me? I can’t wait for AppleTV. The way I see it, AppleTV is a boatload of hackable fun just waiting to be played with. Think of it as a $299 Mac Mini with a smaller form factor and no power brick. Yeah, it has just a 40GB disk and an underpowered processor but do you think that those limitations are going to stick around for more than a few minutes after we geeks get our hands on it? How much do you want to bet that it’s running some familiar code on that underclocked Intel chip? How long until we can upgrade to a bigger disk? How much do you want to bet that we can get that “diagnostics only” USB port working? Yes, I am excited about AppleTV and can’t wait to start playing with my Lil’ Bastard Consumer Electronics Dissection and Torture Kit.

Chris Stone

AddThis Social Bookmark Button

As promised, here’s quick listing of some of the storage related vendors spotted on the MacWorld show floor, with a focus on inexpensive RAID solutions:

Chris Stone

AddThis Social Bookmark Button

Apple announced its new Airport Extreme Base Station (AEBS) this week with a bit less fanfare than enjoyed by its other two new products. Sure, the new AEBS won’t change the world, but it does have one new feature that will bring joy to quite a few households. Apple calls it AirPort Disk, and it provides cheap, Apple-simple network storage to home networks.

Chris Stone

AddThis Social Bookmark Button

Just a few quick things that caught my eye as I strolled the MacWorld show floor:

1. The crew at the EVDOinfo.com booth looked like a great resource for anyone wanting to use one of the EVDO cards from Verizon or Sprint with their Macs. They also carry several EVDO/WiFi routers, which include a slot for the EVDO card, allowing you to share its broadband connection with several computers at once.

2. XtremeMac has a new line of great-looking and very inexpensive A/V cables, designed to go with the Apple TV (though would work with any A/V device). The line includes HDMI, DVI, HDMI to DVI, and Component cables, all with 24-caret gold connectors and rubber overmolding, and all are priced at $19.95 for 2 meters. That’s about a third of what you might pay at a big box store. You can get other cheap cables online (and they look it), but you’ll be able to pick up the XtremeMac cables from the Apple store when you buy your Apple TV in Feburary.

3. I saw at least a half dozen external RAID vendors on the floor, most of whom are here for the first time. Prices on these units have dropped a lot, and they are available in dizzying combinations of interface and drive types. I haven’t had time yet to talk to them all, but if you’re in the market for a cheap RAID (for DAS, SAN or NAS), then it looks like there’s lots to choose from. I’ll post a listing before the show’s over.

Chris Stone

AddThis Social Bookmark Button

I’ve been looking for details on Apple’s plan for 802.11n adoption, and found some good info now on their site

No suprise that the the 802.11n enabler will work only for the Core 2 machines, which include the hardware to allow it.

Also, I learned from an Apple representative at their booth that the enabler will be part of an upcoming software update for those Core 2 Macs.

Erica Sadun

AddThis Social Bookmark Button

I’ve spent a lot of time between yesterday and today going through the AppleTV specs, watching videos of the AppleTV and so forth. Here’s a basic functionality wrap-up. Feel free to let me know what I’ve messed up on. Follow the jump for the details. Updated Thursday with more details.

Giles Turnbull

AddThis Social Bookmark Button

I’ve been asking myself this question for weeks now, and so far I’ve failed to come up with any answer that makes long-term financial or common sense. Maybe you can help me.

It’s one of the earlier Minis, a 1.42GHz G4 PowerPC with 1GB RAM, 80GB disk, and Airport. Various thoughts have occurred to me: music server, household file server, some sort of media thingy for the TV… but I don’t know. I can’t help thinking there’s something I haven’t thought of.

So what would you do?

Matthew Russell

AddThis Social Bookmark Button

Up until recently, I had always used GMail by typing http://gmail.com into my browser. At some point, however, I started asking myself questions about security and wondered if an https flavor was available. It turns out that it had been there all along and so began the era of more secure GMail for me.

Given that it’s so darn easy to sniff packets these days with tools like ethereal, I recommend you folks update your bookmarks and remember that last ’s’ as well. It’s just plain silly not to.

Erica Sadun

AddThis Social Bookmark Button

ZFSDataHealing.jpg

Here’s a PDF overview of ZFS by Jeff Bonwick of Sun Microsystems. The 128-bit ZFS file system will apparently be used in Leopard to provide multi-disk data pools as well as to create data snapshots for backups. ZFS provides fast data access with lots of data integrity features. It’s a nice, easy-to-follow overview that’s well worth a look if you have any interesting in learning more about ZFS.

Erica Sadun