Book Image

Python Multimedia

By : Ninad Sathaye
Book Image

Python Multimedia

By: Ninad Sathaye

Overview of this book

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.
Table of Contents (13 chapters)
Python Multimedia Beginner's Guide
Credits
About the Author
About the Reviewers
Preface

Time for action – MP3 cutter from basic principles


Let's create an MP3 cutter from 'basic principles'. That is we won't be using gnonlin to do this. In this project, we will apply knowledge about seeking a track playing, pausing the pipeline along with the basic audio processing operations.

This utility can be run from the command line as:

$python AudioCutter_Method2.py [options]

Where, the [options] are as follows:

  • --input_file: The input audio file in MP3 format from which a piece of audio needs to be cut.

  • --output_file: The output file path where the extracted audio will be saved. This needs to be in MP3 format.

  • --start_time: The position in seconds on the original track. This will be the starting position of the audio to be extracted.

  • --end_time: The position in seconds on the original track. This will be the end position of the extracted audio.

  • --verbose_mode: Prints useful information such as current position of the track (in seconds) while extracting the audio. By default, this flag is...