Python Multimedia Application Beginner’s Guide

By Ninad Sathaye

Amazon

Packt

I received this a review copy of this book in ebook format from Packt Publishing. I like free books, but I won’t let that cloud my judgment about whether or not this is a worthy book for you to spend your hard earned money on. Packt Publishing does more niche Python books then any other publisher and I think that’s pretty cool. Unfortunately, they don’t seem to spend nearly enough time polishing the books before publishing them, so their books tend to be hit or miss. For example, their Python 3 book was quite good. Alas, this one tends to lean more towards the mediocre.

Now don’t get me wrong. The content of the book has inspired me to write about some of the topics that this book covers, so it’s not all mediocre. The problem lies mostly in the fact that the author’s native language is obviously not English and the fact that Packt’s editing process didn’t smooth out the “un-English” sounding prose to such an extent that it’s just painful to read from time to time. Here are a couple examples:

  • A simple PyGame application with a circle drawn within the Surface (window).
    The image on the right side is a screenshot taken after maneuvering the position
    of the circle with the help of arrow keys (pg 17)
  • If a 4-tuple box is specified, the size of the image to be pasted must be same as the size of the region. (pg 40)

And here is a Packt editing mistake:

  • The box argument can be a 4-tupleError: Reference source not found or a 2-tuple.

Oops…they did this weird find and replace mistake twice in this text.

Anyway, I don’t really want to bash the book too much. Writing books is hard (writing blog posts all the time is hard too!). Criticizing is easy. Let’s take a look at what the book’s eight chapters cover:

  • Chapter 1 – Python and Multimedia: an introductory chapter to the various modules you can use to play and edit music, video and image files
  • Chapter 2 – Working with Images: a fast-paced tour of the Python Imaging Library (PIL) that shows how to resize, rotate, and flip images, among other things
  • Chapter 3 – Enhancing Images: more recipes involving PIL, such as how to adjust an images brightness and contrast, swap colors, blend photos, smoothing effects, sharpening, blurring, edge sharpening, embossing and more
  • Chapter 4 – Fun with Animations: an intro to Pyglet 2D animation
  • Chapter 5 – Working with Audios: this chapter shows you how to use GStreamer with Python 2.6 only to play audio, convert audio between formats, record audio and more. This chapter also butchered the use of the word “audio” repeatedly, saying such things as “playing an audio”, “extracting an audio” etc.
  • Chapter 6 – Audio Controls and Effects: more GStreamer tips and tricks such as how to add echo and fading to your audio files, mixing audio files and adding some visualization effects
  • Chapter 7 – Working with Videos: how to use Python 2.6 + GStreamer to manipulate videos
  • Chapter 8 – GUI-based Media Players Using QT Phonon: use the PyQt GUI framework to create a media player

I think the most frustrating part of the book was chapters 5-7. For some reason, the only semi-recent Python bindings for GStreamer are for only Python 2.6! The installation directions in the book versus the links provided in the book were confusing, so I didn’t give this a try. I did find some GStreamer bindings for 2.4 and 2.5, but they were for an ancient version of GStreamer. There were no bindings whatsoever for the latest GStreamer version (at least, I couldn’t find them). Thus, while these chapters can be useful, if you use the bleeding edge Python or need to use an older version, you’re screwed.

I didn’t manage to get the last chapter read, so I don’t have any comments on it.

The PIL chapters were my favorite and I plan to use them for a project of my own. The Pyglet chapter inspired me once again to look into figuring that framework again…but I haven’t done that yet. And I suspect that the PyQt Phonon chapter will be interesting on a technical level.

By this time, you’re probably wondering: what’s the verdict? I think you should try to find a free chapter or find the book in a book store and read some of it before you buy it. The list price is almost $45 USD after all, so use your money wisely.

UPDATE (10/15/2010) – Here’s a link to chapter 2, Working with Images

Print Friendly