Free Sample
+ Collection

Python Multimedia

Ninad Sathaye

Learn how to develop Multimedia applications using Python with this practical step-by-step guide
RRP $26.99
RRP $44.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781849510165
Paperback292 pages

About This Book

  • Use Python Imaging Library for digital image processing.
  • Create exciting 2D cartoon characters using Pyglet multimedia framework
  • Create GUI-based audio and video players using QT Phonon framework.
  • Get to grips with the primer on GStreamer multimedia framework and use this API for audio and video processing.


Who This Book Is For

This book is for Python developers who want to dip their toes into working with images, animations, audio and video processing using Python.

Table of Contents

Chapter 1: Python and Multimedia
Multimedia processing
Built-in multimedia support
External multimedia libraries and frameworks
Time for action – a simple application using PyGame
Chapter 2: Working with Images
Installation prerequisites
Reading and writing images
Time for action – image file converter
Time for action – creating a new image containing some text
Time for action – reading images from archives
Basic image manipulations
Time for action – resizing
Time for action – rotating
Time for action – flipping
Time for action – capture screenshots at intervals
Time for action – cropping an image
Time for action – pasting: mirror the smiley face!
Project: Thumbnail Maker
Time for action – play with Thumbnail Maker application
Time for action – generating the UI code
Time for action – connecting the widgets
Time for action – developing image processing code
Chapter 3: Enhancing Images
Installation and download prerequisites
Adjusting brightness and contrast
Time for action – adjusting brightness and contrast
Tweaking colors
Time for action – swap colors within an image!
Time for action – change the color of a flower
Time for action – blending two images
Creating transparent images
Time for action – create transparency
Making composites with image mask
Time for action – making composites with image mask
Project: Watermark Maker Tool
Time for action – Watermark Maker Tool
Applying image filters
Time for action – smoothing an image
Time for action – detecting and enhancing edges
Time for action – embossing
Adding a border
Time for action – enclosing a picture in a photoframe
Chapter 4: Fun with Animations
Installation prerequisites
A primer on Pyglet
Animations with Pyglet
Time for action – viewing an existing animation
Time for action – animation using a sequence of images
Time for action – bouncing ball animation
Time for action – a simple bowling animation
Time for action – raindrops animation
Project: drive on a rainy day!
Time for action – drive on a rainy day!
Chapter 5: Working with Audios
Installation prerequisites
A primer on GStreamer
Playing music
Time for action – playing an audio: method 1
Time for action – playing an audio: method 2
Converting audio file format
Time for action – audio file format converter
Extracting part of an audio
Time for action – MP3 cutter!
Time for action – recording
Chapter 6: Audio Controls and Effects
Controlling playback
Time for action – pause and resume a playing audio stream
Time for action – MP3 cutter from basic principles
Adjusting volume
Time for action – adjusting volume
Audio effects
Time for action – fading effects
Time for action – adding echo effect
Project: combining audio clips
Time for action – creating custom audio by combining clips
Audio mixing
Time for action – mixing audio tracks
Visualizing an audio track
Time for action – audio visualizer
Chapter 7: Working with Videos
Installation prerequisites
Playing a video
Time for action – video player!
Video format conversion
Time for action – video format converter
Video manipulations and effects
Time for action – resize a video
Time for action – crop a video
Adding text and time on a video stream
Time for action – overlay text on a video track
Separating audio and video tracks
Time for action – audio and video tracks
Mixing audio and video tracks
Time for action – audio/video track mixer
Saving video frames as images
Time for action – saving video frames as images
Chapter 8: GUI-based Media Players Using QT Phonon
Installation prerequisites
Introduction to QT Phonon
Project: GUI-based music player
Time for action – generating the UI code
Time for action – connecting the widgets
Time for action – developing the audio player code
Project: GUI-based video player
Time for action – generating the UI code
Time for action – developing the video player code

What You Will Learn

  • How to develop utilities for some frequently needed image processing operations such as resizing, brightness and contrast adjustment, flipping and rotating images, and so on.
  • How to digitally enhance images using image filters.
  • How to blend images together, creating watermarks, thumbnails, and so on.
  • How to write audio and video file format conversion utilities.
  • How to combine two or more audio tracks, 'mixing' audio and video tracks.
  • How to develop an 'MP3 file cutter tool' to extract a portion of audio.
  • How to separate audio and video tracks.
  • How to develop programs to record sound, 'visualize' audio tracks, add special audio effects such as fading , echo, and so on.
  • How to save video frames as still images.


In Detail

Multimedia applications are used by a range of industries to enhance the visual appeal of a product. This book will teach the reader how to perform multimedia processing using Python.

This step-by-step guide gives you hands-on experience for developing exciting multimedia applications using Python. This book will help you to build applications for processing images, creating 2D animations and processing audio and video.

Writing applications that work with images, videos, and other sensory effects is great. Not every application gets to make full use of audio/visual effects, but a certain amount of multimedia makes any application a lot more appealing. There are numerous multimedia libraries for which Python bindings are available. These libraries enable working with different kinds of media, such as images, audio, video, games, and so on. This book introduces the reader to the most widely used open source libraries through several exciting, real world projects. Popular multimedia frameworks and libraries such as GStreamer,Pyglet, QT Phonon, and Python Imaging library are used to develop various multimedia applications.


Read More

Recommended for You

Learning Python Data Visualization
$ 28.99