How to download photos and movies from the Palm Centro to a Linux desktop

Posted by Tom Moertel Fri, 02 Nov 2007 19:32:00 GMT

I recently got a Palm Centro smartphone, and so far I love it. Like most modern cell phones, it has a built-in camera and takes decent snapshots and even records short movies. It’s great for spur-of-the-moment shots when I don’t have my real camera. The trick – and there’s always a trick when it comes to cell phones – is getting the photos off the camera and onto my computer.

To get at my pictures, Sprint would prefer that I sign up for their ludicrously expensive “PictureMail” service. Leave it to weasely telecom execs to come up with another way to squeeze money from teenagers: charge them $5 each month for the “privilege” of sharing their pictures with friends. This fee, of course, is in addition to the fee for “unlimited” mobile Internet use. I guess picture bits are somehow more expensive to move over the air than other kinds of bits.

In any case, my next goal after getting my Centro to hotsync with my Linux workstation was to figure out how to download my photos and movies.

After a bit of hacking, I figured out that the Centro stores images in a typical digital-camera-image (DCIM) hierarchy. For example, I have a 4-GB microSD card installed in my Centro, and I store my photos in the “Palm” album on it. This album ends up stored in the /DCIM/Palm directory on the card.

Using the pilot-xfer program from the pilot-link project, I was able to find the directory and its contents. The trick was to use the sparsely documented –D flag to work with the Centro’s virtual filesystem. Here, for example, is how I list the contents of the Palm album:

$ pilot-xfer -p usb: -D /DCIM/Palm -l

   Listening for incoming connection on usb:... connected!

   Directory of /DCIM/Palm...
        652 Fri Nov  2 08:17:06 2007  Album.db
     292053 Fri Nov  2 09:04:20 2007  Photo_110207_001.jpg
      78493 Fri Nov  2 08:17:06 2007  Video_110207_001.3g2
         20 Wed Oct 31 12:09:20 2007  Thumbnail.db

   Thank you for using pilot-link.

Here, you can see that I have one photo and one movie in the album. (Movies are stored in .3g2 files that contain MPEG4 video.)

To download the files, I again turned to pilot-xfer, this time using the –f (fetch) flag to fetch a list of files. Here, for example, I’ll fetch the image from the listing above:

$ pilot-xfer -p usb: -D /DCIM/Palm -f Photo_110207_001.jpg

   Listening for incoming connection on usb:... connected!

   Fetching '/DCIM/Palm' ... (292053 bytes)   285 KiB total.

   Thank you for using pilot-link.

So that’s the process. It’s kind of clunky, so I wrote a small Python program to automate it. (I’m learning Python. If you’re a Pythonista, please consider critiquing my code. I would be especially thankful if you could point out any helpful idioms that I may have overlooked.)

Here’s how to use the program:

$ get-pilot-photos.py --help
Usage: get-pilot-photos.py [options]

Options:
  -h, --help            show this help message and exit
  -s SRCDIR, --srcdir=SRCDIR
                        VFS dir on Palm device from which to fetch images
  -d DESTDIR, --destdir=DESTDIR
                        Where to save the images on your computer

Both the —srcdir and —dstdir options are optional. If you omit the first, the program will download photos and movies from the /DCIM/Palm album. If you omit the second, the program will save the downloads to a new, timestamped directory within your home directory.

That’s it. The code is below.

Read more...

Posted in
Tags , , , , , ,
15 comments
no trackbacks
Reddit Delicious

Netflix vs. Amazon Unbox: Netflix still wins

Posted by Tom Moertel Sat, 07 Apr 2007 16:20:00 GMT

When Amazon.com announced its its Unbox video-download service, I was skeptical. Compared to the reigning champion – the DVD – Unbox looked like a loser:

  • Unbox burdened its customers with DRM and the annoyances that come with DRM
  • Unbox required the use of a Windows-only player application
  • Unbox movies lacked “standard” DVD features such as surround sound, alternative audio tracks, commentaries, and bloopers

The first two points were deal-breakers, so I wrote off Unbox and did my best to ignore it.

And then Amazon hooked up with TiVo. Beaming movies directly into my TiVo box eliminates the need to deal with DRM and Windows annoyances. My two big concerns sidestepped, I decided to give Unbox another look. I still wouldn’t want to buy Unbox-to-TiVo movies because they lack the typical DVD extras and would tie up storage space on my TiVo, but Unbox might be a decent way to rent the occasional movie – if the price were right.

Is the price right?

That depends on how the price of Unbox compares with the price of my current rental option of choice, Netflix. Both services offer immediate access to good movies: Unbox by on-demand downloads, Netflix by ensuring that I almost always have a DVD or two in the house.

To compare Unbox with Netflix, I had to figure out how much a rental costs me with each service. With Unbox the figuring was easy because each rental has its own price tag, typically $3.99.

With Netflix, it’s a bit trickier because the rental price depends upon how many DVDs I rent in a month. I pay a monthly fee of $17.99 and can rent as many DVDs as I want, at least until the infamous Netflix rate throttle kicks in. To determine how many DVDs I rent during the typical month, I had to download my rental history. (If you’re a Netflix subscriber, you can get your history from the Returned Rentals page.) After downloading my history, massaging it into the desired form, and loading it into R, I generated a stem-and-leaf plot to visualize the number of DVDs I have rented during each of the 76 months I have been a Netflix subscriber:

> stem(monthly.rental.counts, scale=2)

  The decimal point is at the |

   1 | 0
   2 | 000
   3 | 0000000
   4 | 00000000000
   5 | 000000000000
   6 | 000000000000000
   7 | 0000
   8 | 000000
   9 | 00000
  10 | 0000
  11 | 0
  12 | 00
  13 | 00
  14 | 00
  15 | 0

It looks like I have rented as few as one and as many as fifteen DVDs in a month. Most months, however, I rent between three and ten DVDs. On average, I rent about 6.4 DVDs per month:

> summary(monthly.rental.counts)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
  1.000   4.000   6.000   6.408   8.000  15.000

Thus my average rental price is about $2.80 per DVD:

> 17.99 / 6.4
[1] 2.810937

Now I can make my Unbox-vs-Netflix price comparison. For me, it looks like Unbox is about 40 percent more expensive than Netflix:

> 3.99 / 2.81
[1] 1.419929

So the price of Unbox is not right, at least for me.

Testing Unbox-to-TiVo rentals

Because Amazon is offering free $15 credits to TiVo owners, I decided to give Unbox a test drive. My test rental was The Illusionist. Renting the movie was easy (just one click), and shortly thereafter Unbox automatically downloaded the movie to my TiVo box. When I played the movie, however, I was disappointed with the video quality. I easily noticed banding artifacts, which were distracting at times. On the whole, the viewing experience was inferior to watching a DVD.

Netflix still beats Unbox

For me, then, Unbox is still a loser. It costs more and delivers less than DVD rentals via Netflix.

A note to my friends at Amazon.com

I would be happy to give you my business, but right now you’re not earning it. If you want me as an Unbox customer, here is the recipe for winning me over:

  • Let me easily download movie rentals to my TiVo. (Check.)
  • Offer true DVD quality or better. (You’re not there yet.)
  • Sell the rentals for less than $2.80. (You’re not there yet.)

Until then, I’ll have to give my money to Netflix.

Cheers,
Tom

Update: edits for clarity; added tags.

Posted in
Tags , , , , , , ,
2 comments
no trackbacks
Reddit Delicious

The IMDB Movie Rating Decoder Ring: updated w/ 2 March 2007 data

Posted by Tom Moertel Fri, 09 Mar 2007 22:40:00 GMT

If you want to get more out of IMDB movie ratings, check out my IMDB Movie Rating Decoder Ring, now updated with fresher data (as of 2 March 2007).

Posted in
Tags , , , , , ,
1 comment
no trackbacks
Reddit Delicious

Mining gold from the Internet Movie Database, part 1: decoding user ratings

Posted by Tom Moertel Wed, 18 Jan 2006 01:59:00 GMT

The Internet Movie Database (IMDb) is a rich source of online movie information. The problem is, the true gold is buried deep beneath the site’s user-friendly exterior and hidden within the database itself. With a little digging, however, we can extract the gold, nugget by nugget, and learn about fun statistical tools for data analysis.

Today, in the first part of our analysis, we will put our intuition about rating systems to the test. We will decode IMDb “user ratings,” those numbers such as 6.1 and 7.8 that summarize how the registered users of the IMDb rated movies on a scale from 1 to 10, typically depicted as a series of stars on the screen:

sample user rating

We will extract the collective wisdom of registered IMDb users in order to convert a movie’s user rating into the movie’s standing within the database. This gives us a good indicator of how the movie stacks up against other movies in general, and that’s good information to have when deciding which movies to see in the theater or add to your Netflix list.

Ready to start digging? Let’s go!

Read more...

Posted in ,
Tags , , ,
9 comments
no trackbacks
Reddit Delicious