Sorting MP3s on a Sony Walkman NWZ-B152 player

I bought an MP3 player yesterday for the kids, for bedtime music. They’re currently using an old Nokia phone, but it’s a bit broken and hard to navigate and the internal speaker isn’t that great. The new plan is to wire a line in socket to an old CD/radio and attach the MP3 player to that.

I got a Sony Walkman NWZ-B152 from Tesco because it was on special and they have a Double Points deal (though that took some negotiation in the end!). The documentation all assumes you’re using the latest OS from Microsoft. I’m using Ubuntu Linux, but I figured that shouldn’t be a problem.

The device supports USB Mass Storage, but when I copied some MP3s onto it, the tracks in each album came up in random order. I tried adding ID3 track number tags with eyeD3, and they still came up in random order – but a different random order this time. Bizarre.

Finally this morning I worked it out. The Sony player sorts on the ID3v2.3 track tag only – if there’s an ID3v1.0 track tag, it ignores it. And eyeD3 sometimes uses one flavour and sometimes another.

Simple fix: in my encoder script, add --id3v2-only. Or if, as in my case, you’ve already copied loads of MP3s across and don’t want to repeat it, in your fixup script add --to-v2.3. Et voilĂ , track sort order works at last!

Archiving RockYou slideshows

Aidan’s amazing primary 2 teacher keeps a class blog, which is full of lovely slideshows of pictures of the class and what they’re up to (mostly taken by the kids themselves – the “media team”!). It’s fabulous, but I’m really worried about how long it will stay up once the year is over. I decided to do some digging, and work out how to archive the slideshows.

Of course, they’re in Flash – courtesy of RockYou. And saving a Flash to your computer (even if you can do it) doesn’t get you very far – it downloads all the images from the internet as it goes.

Thanks to the fab (and free in both senses) WebScarab (like Fiddler, but it works on Linux too), I was easily able to watch what happens when a slideshow is played on a browser with an empty cache. Here’s what I found:

The blog source contains an <embed> link to a URL like this:

http://apps.rockyou.com/rockyou.swf?instanceid=<NNmmmDDDD>&ver=102906

This Flash app loads some more apps and a few beacons and things, but the most important thing is this:

http://data.rockyou.com:80/xml/<NN>/<mmm>/<NNmmmDDDD>.xml

This is a nice little XML file with a /rockmyspace/gallery element that has basic style, colour, and transition information as attributes, and as content has a list of slide elements.  Each of these has an image element – the URL to the image – and a text element – the caption.  Here’s an example:

<slide>
  <image path=”http://img<YYY>.rockyou.com/<NNm>/<NNmmmD>/<NNmmmDDDD>/<NNmmmDDDD>_<xxxxxxxxxxxxxxxxxx>.jpg” />
  <text text=”Isn’t this a cool photo?” />
</slide>

And that’s all you need!

To summarise:

  • Determine the instanceid of the slideshow.
  • Download the corresponding XML file.
  • Read the XML file, looking for /rockmyspace/gallery/slide/image elements.  (May not always be gallery – I’ve seen other values here).
  • Download the images.
  • Read the captions from the corresponding text elements.

Obviously you have to work out how to display them yourself, and how to recreate the transitions.  But this way you can get at and archive the content that’s been shared by the slideshow author, so it can be enjoyed for years afterward.

Transferring calendar and contacts from Nokia to Google

I recently upgraded my lovely but old-fashioned Nokia N73 to a shiny new Android – the HTC Desire. It’s a great phone, but I have hundreds of events, contacts, tasks, and notes in the N73. How to get them across?

Well, there are a few ways *not* to:

  • Don’t follow Google’s advice and install Mail for Exchange on the old phone, pointing it to your Google account. This didn’t work for me – ‘connection failed’.
  • Don’t follow Orange’s advice and put your new SIM in your old phone and save your contacts too it. Good stop-gap, but all entries are truncated and case-smashed.
  • Don’t try registering for Orange Sync.  The website hung for me at the registration screen.

Instead, do the following.

  • I used Nokia PC Suite 7.0.9.2 on Windows Vista.
  • Do a full phone backup before you start! It’s too easy to sync the wrong way and wipe everything.
  • In PC Suite, make sure your phone is not set to auto-sync on connection.
  • In Windows Calendar (not Windows Live Messaging calendar), create a new calendar and deselect all the others.
  • Choose the Contacts menu option, which dumps you in Explorer with some shell extension running.
  • Delete any contacts that are here already (if you care about them, save them first).
  • In PC Suite, create a new sync setting. Sync calendar and contacts, to Windows Vista Calendar and Contacts, choosing the calendar you named earlier. Choose ‘advanced’, and set conflicts to prefer phone and one-way sync from phone to PC.
  • Do a sync.
  • Go to Windows Calendar, make sure only your new calendar is selected, and export it as an .ics file.
  • Choose the Contacts menu option, select all contacts, and save as a folder of vCard files.
  • In the command prompt, go to the folder and type

    for %f in (*.vcf) do type %f >>all
    ren all all.vcf

  • On your PC, log into Google and go to Calendar. Go to Settings, Calendar Settings, Calendars, Import Calendar.  Click Browse and choose the .ics file you saved earlier.
  • Now go to GMail.  Go to Contacts, Import.  Click Browse and choose the all.vcf file you saved earlier.
  • On your phone, go to Settings, Accounts and Sync, Google, and sync your contacts and calendar.

That’s it!

I haven’t yet worked out how to move my tasks or notes across.