Archive for December, 2011

The Forgotten E-Book Reader: OLPC

Monday, December 26th, 2011

With the plethora of e-book reader devices available these days, it’s easy to overlook perhaps one of the better choices for mobile e-reading: the OLPC.

While it’s a bit heavier than most tablets (but still relatively light at just over 3 pounds), and lacks the “instant-on” feature of other devices (the OLPC is technically a netbook computer, so it needs time to boot), the built-in Read Activity (app) supports several types of file formats, including text, tiff, djvu, pdf, and epub.

At 6 inches x 4.5 inches, the OLPC’s color screen is bigger than most dedicated e-book readers, and almost as large as the iPad. The screen folds flat, which hides the keyboard and makes reading easier, and the screen also remains easy to read, even in sunlight.

So why isn’t it more popular as an e-book reader?

One problem is that it’s not clear how to add new content for the Read app to find.

By default, the Read app can open e-book files in the Journal, but the documentation doesn’t fully explain how to copy new files into the Journal.

In theory, you can drag-and-drop files from a mounted usb stick or external drive, but I found the graphical environment choppy and unreliable.

Fortunately, there’s a built-in Terminal script called copy-to-journal created just for this purpose.

Here’s an example of how to copy a pdf file from a memory stick to the Journal:

copy-to-journal "/media/my-usb-stick/My Book.pdf" -m application/pdf -t "My Book"

The first parameter is the full path to the file (wrapping in quotes is good practice, since it will work for files with spaces in their names and without), the second parameter (-m) specifies the mimetype, and the third parameter (-t) defines the title of the book as it appears in the Journal (it can be completely different from the filename).

Epub files work the same way, except the mimetype is different:

copy-to-journal "/media/my-usb-stick/My Book.epub" -m application/epub+zip -t "My Book"

The script can also attempt to guess the mimetype, using the -g switch instead of -m:

copy-to-journal "/media/my-usb-stick/My Book.epub" -g -t "My Book"

 

A quick guide to DIY animated videos

Friday, December 9th, 2011

Now that TeamWork.io is out in public beta, I wanted to see how difficult it would be to make an intro video, similar to what Google did for its Voice service.

The idea is based on the observation that most people don’t read web pages and would rather watch a video than skim even a brief description.

So with no background in video animation (and no cash to pay anyone to do it for me), I set out to see how far I could get on my own, using free software tools.

I wrote a script consisting of a few frames of stop-motion animation, which I thought would be the simplest to do.

The script starts with someone planning a project, surrounded by a few gantt charts and similar project management paraphernalia. Soon, though, the various charts and forms he needs to process multiply until he’s overwhelmed, and the screen fades to black.

From out of the darkness, a bright light emerges, and the TeamWork.io logo emerges.

That’s just part one. The next step would be to explain how it works, but part one was enough on its own to keep me busy for a while.

Fortunately, there are several free tools available for this kind of production.

Free as in Beer

I started with GIMP, the GNU community’s answer to PhotoShop.

GIMP let me create all the images I needed for part one: the charts and forms smothering our hero are easily done incrementally, by just adding more junk on top and saving each edit as a separate file.

Going from dark to light was also fairly simple, since GIMP has a nice selection of effects filters, one of which, Supernova, let me create a small sunburst in the middle of the black field, then expand it slowly, until the field was white.

Looking back at the first draft, I see that I rushed it a bit too much, but that is a problem with stop-motion: updating changes frame-by-frame is tedious, and there’s always the risk of jumping ahead too much in any given snapshot.

Next, I used Pencil to put the individual frames together with sound and create a single movie file.

Pencil is capable of exporting to QuickTime’s .mov format at a default 851×715 screen resolution, so to keep things simple, I made all my GIMP images 851 pixels wide by 715 pixels tall.

It’s not an ideal aspect ratio for YouTube, though, and I noticed black filler bands on both sides after uploading, but it doesn’t get in the way of comprehending the video.

Pencil also let me add a soundtrack and preview the entire composition of moving frames and sound, but somewhat annoyingly, it didn’t export with sound.

This is a long-time bug, apparently, but I was able to get around it using MEncoder (more on that later).

Finally, I used the speech synthesizer built in to Mac OSX to produce the voice-over.

Say, a free tool for capturing the Mac’s Text-to-Speech output as a file, was invaluable for this task.

Say produces .aiff format sound files, which can be imported as-is into Pencil.

As nice as it is to write a script and have it turned into speech immediately, the sound of a computer-generated voice-over is less than ideal.

“Alex”, by far the best-sounding of the synthesized voices, still came out clunky and awkward.

It seems for the final video I need to bite the bullet and use a real human voice.

The Final Draft Cut

Once I was happy with the sequence of still frames in Pencil, and I made sure the sound synched (more or less) with the video, I created a .mov file of the project.

I could play the .mov file in QuickTime, but, as noted earlier, there was no sound.

That’s where MEncoder comes in, since it’s able to add a sound layer to any video file, using a single command line instruction:

$ mencoder pencil-output.mov -o final.avi \
  -ovc copy -oac copy -audiofile sound.mp3

The only hitch is that it didn’t work with my .aiff file, so I had to convert it to .mp3 format first.

Fortunately, ffmpeg makes this easy:

$ ffmpeg -i sound.aiff -f mp3 -ab 192 \
  -ar 44100 sound.mp3

Here’s the first draft in all its (10 seconds of) glory: