This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configure our elements. | |
audio_source.set_property('location', 'myfile.mp3') | |
equalizer.set_property('band1', -24.0) | |
equalizer.set_property('band2', -24.0) | |
# Add our elements to the pipeline. | |
pipeline.add(audio_source, decode, convert, equalizer, audio_sink) | |
# Link our elements together. | |
if (not gst.element_link_many(audio_source, decode, convert, equalizer, audio_sink)): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gst | |
# Create the pipeline for our elements. | |
pipeline = gst.Pipeline('pipeline') | |
# Create the elements for our project. | |
audio_source = gst.element_factory_make('filesrc', 'audio_source') | |
decode = gst.element_factory_make('mad', 'decode') | |
convert = gst.element_factory_make('audioconvert', 'convert') | |
equalizer = gst.element_factory_make('equalizer-3bands', 'equalizer') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
""" | |
GStreamer Tutorial 1: Simple Project | |
In this tutorial we will receive an mp3 file from our harddrive, manipulate | |
with an equalizer element, and output that to our speakers. | |
------------------------pipeline------------------------- | |
| | | | | |
NewerOlder