« Reading List: Voyage à reculons en Angleterre et en Écosse | Main | Backhoe 3, Internet 0 »

Saturday, April 8, 2006

Linux: Take-Out from the Diner

For fans of the prolific work of humorist James Lileks, Friday means another broadcast from “The Diner”, a grab-bag of memories, music, and images from the bottomless dumpster of American popular culture. These are primarily audio programs, but starting in 2006, MP4 editions embellished with still images have been available. If you have one of those stylish pocket deafness appliances, it's said that you can just click the link without pausing to think but, if as I do, you play these programs on a Linux machine, it's rather difficult to download the MP4 files, which are hosted on the web.mac.com site that insists upon the presence of a QuickTime browser plug-in unavailable for Linux systems. You can download an audio-only MP3 edition, but then you miss the album covers, movie stills, and other graphics from the full version.

Digging into the HTML source code for the download page, it turns out there's an embedded object which specifies the MP4 file as a parameter interpreted by the QuickTime plug-in. If you extract this file name and cobble up a URL containing it, you can download the MP4 file and play it on your Linux system. After doing this manually several times, I bashed together a little Perl program to automate the process, which is now available for download. Extract the “Diner” program from the archive and fix the path to Perl in the first line if necessary. Then you can download the MP4 file for a broadcast to the current directory by pasting the URL of its download page on a command line which invokes the Diner program. The program also works with other video features occasionally posted by James Lileks and hosted on mac.com . You can try the Diner program with the following links, whose target URLs should be copied and pasted onto its command line, not clicked directly (unless you have the requisite QuickTime plug-in, of course, in which case you don't need the program in the first place):

In addition to Perl, the Diner program requires GNU Wget to download files from the Web; this program is included in most modern Linux distributions. Once a file has been downloaded, the Diner program's mission is accomplished. Then it's up to you to find a compatible media player application and figure out how to play the file. If you can't manage to play it, this is not my problem—it wasn't I who littered the multimedia landscape with five or six thousand mutually incompatible ways to store video and audio in computer files! I play these files with MPlayer/GMPlayer, but this may or may not work for you depending on which version you're using and the complement of audio and video CODECs you have installed. If you can't get it to work, I offer you only condolences, not consulting.

Posted at April 8, 2006 15:51