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 - fading effects

Let's add fade-out effect to an input audio. We will use the same source file as used in the Adjusting volume section.

  1. If you haven't already, download the file AudioEffects.py that has the source code for this example.
  2. In the __init__ method of this class, you will need to do one small change. Set the flag self.fade_example to True so that it now runs the code that adds fade-out effect.
  3. We already reviewed the self.constructPipeline() method in Adjusting volume section. It calls the method self.setupVolumeControl().
    1 def setupVolumeControl(self): 2 self.volumeControl = gst.Controller(self.volume, 3 "volume") 4 self.volumeControl.set("volume", 0.0*gst.SECOND, 5 self.volumeLevel) 6 self.volumeControl.set_interpolation_mode("volume", ...

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