O'Reilly logo

Python Multimedia Beginner's Guide by Ninad Sathaye

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - creating custom audio by combining clips

Let's develop an application where we will combine multiple audio clips into a single audio file.

  1. Download the file CombiningAudio.py. This file contains all the code necessary to run this application. As done earlier, we will discuss only the most important methods in this class.
  2. Write the following code.
    1 import os, sys, time 2 import thread 3 import gobject 4 from optparse import OptionParser 5 6 import pygst 7 pygst.require("0.10") 8 import gst 9 10 class AudioMerger: 11 def __init__(self): 12 pass 13 def constructPipeline(self): 14 pass 15 def addFadingEffect(self): 16 pass 17 def setupFadeBin(self): 18 pass 19 def addGnlFileSources(self): 20 pass 21 def gnonlin_pad_added(self, gnonlin_elem, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required