mad

mad

Synopsis

struct              GstMad;

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GstObject
               +----GstElement
                     +----GstAudioDecoder
                           +----GstMad

Properties

  "half"                     gboolean              : Read / Write
  "ignore-crc"               gboolean              : Read / Write

Description

MP3 audio decoder. Note that while the mad plugin code is licensed under the LGPL, the libmad library itself is GPL licensed, so the effective runtime license of using the mad element is GPL.

The mpg123audiodec and avdec_mp3 decoder elements are LGPL licensed and also tend to use less CPU for decoding.

In general it doesn't matter which MP3 decoder you use, the main advantage of the mad decoder is that it also supports so-called 'freeform' mp3s which are mp3s with a bitrate higher than what the standard usually allows.

Example pipelines

1
gst-launch-1.0 filesrc location=music.mp3 ! mpegaudioparse ! mad ! audioconvert ! audioresample ! autoaudiosink
Decode and play an mp3 file

Synopsis

Element Information

plugin

mad

author

Wim Taymans <wim.taymans@gmail.com>

class

Codec/Decoder/Audio

Element Pads

name

sink

direction

sink

presence

always

details

audio/mpeg, mpegversion=(int)1, layer=(int)[ 1, 3 ], rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 }, channels=(int)[ 1, 2 ]

name

src

direction

source

presence

always

details

audio/x-raw, format=(string)S32LE, layout=(string)interleaved, rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 }, channels=(int)[ 1, 2 ]

Details

struct GstMad

struct GstMad;

Property Details

The "half" property

  "half"                     gboolean              : Read / Write

Generate PCM at 1/2 sample rate.

Default value: FALSE


The "ignore-crc" property

  "ignore-crc"               gboolean              : Read / Write

Ignore CRC errors.

Default value: TRUE

See Also

lame