|
|
Links
These are a few of my favourite links.
My previous LiveJournal
kript.net
My Del.icio.us bookmarks
Flavours
There's more than one way to view this weblog; try these flavours on
for size.
index
RSS
About
The Kriptonomicon, Dont read everything you believe
John's contact details:
blog@kript.net
Subscribe
Subscribe(RSS) to a syndicated feed of my weblog,
brought to you by the wonders of RSS.
or by
Atom..
|
|
|
Podcasting Tools
I've been listening to a fair number of podcasts recently - mostly from the
BBC trial,
but also from a few other places (
MacCast,
IT Conversations).
I use
shrook
as my RSS reader, but I have to download each mp3 individually, and I don't like the way Shrook stores then in the ~/Library folder. Also, being mp3's mean I can't take advantage of the AAC format's bookmarking feature, where you can pause the track, go and listen to something else and come back where you left off - very useful for the longer features such as
"In Our Time"
(45 mins). So, I've been converting each mp3 to AAC via iTunes. The problem is that this then stores the converted file locally.
What I really wanted, was a way to download each track from a RSS feed, and then convert them to AAC, ready to import into iTunes as just a pointer to the network store.
So, I decided to write one.
The only command line based AAC encoder I could find was the excellent
FFmpeg
(I found that most distributions only packaged the decoder. I had to download the FAAC encoder from its home
here.)
some experimenting with invoking this from perl gave me the converter I wanted. Unfortunately, it seems the iPod has a bug when playing non-iTunes encoded AAC mono files. It took me a week of googling to find this, cursing Apple for (as I thought) introducing proprietary incompatibilities into their products (even though they'd created and documented the standard). I finally found other people with the problem in the forums at ipodlounge - fortunately, they'd found that converting the AAC file from mono to stereo would allow it to play, and sure enough, when I made the appropriate changes to the script, the resulting files played just fine. The threads for reference;
Guide 6. Convert to Stereo to avoid 4G & Mini Lockup on NEW or EXISTING Mono m4b file
.m4b files cause iPod to lock up after I listen to them.
and
this
was the thread that put me on the right track.
It seems that AAC files dont have the same rich metadata that can exist in MP3's, so I wasn't able to transfer all the information that well-put together mp3's (such as the BBC's) contain - the script keeps as much information as it can (title, author, copyright and description), but I ended up putting together an
Automator
plugin to add the extra tags I use to manage the playlists in iTunes (genre, and year, usually). Talking of which, I have to say that Automator hasn't proved very useful for me, despite wanting to script several processes. I've been able to use it for very simple GUI scripting stuff, though, and it means I can put off learning Applescript for a while longer, so I guess I can't complain too much.
Once I'd had the conversion script working, I then put together a script to parse a RSS feed. So far, only RSS 2.0 has support for included files (enclosures), so I didn't worry about coding something for multiple variants of RSS and Atom. Unfortunately, as Ben Hammersley wrote in his excellent "Developing Feeds with RSS and Atom" (which is the source I got all my understanding of all of this, plus some skeleton for the start of the script, from), Perl support for RSS is extremely variable. It can generate superb RSS, but parsing it is another matter. Most of the RSS parsers in perl don't deal well at all with RSS 2.0 feeds, and I had to resort to using the plain XML parser instead, which worked well, but took me a day of playing with different modules to arrive at the solution. Once I had the feed, I had to extract the enclosure tag and its contents manually, and write a simple database that kept track of feeds it had seen and downloaded - not too complex a task, but it took me the best part of a day, with assorted blind alleys.
So, I present here for your use and entertainment;
mp3ToAAC.pl
GrabRSSEnclosures.pl
I'm going to create an individual directory for each feed and run the parser into it via cron. Once a day is needed for some, but twice a week should be more than enough for the weekly based ones.
Do let me know if you find them useful!
Posted at: 21:27:03 12 Jun 2005
[/code]
permanent link
|
|