mad: GStreamer Ugly Plugins 1.0 Plugins Reference Manual

## mad mad |

## Properties

gboolean | half | Read / Write
gboolean | ignore-crc | Read / Write

## Types and Values

struct | GstMad

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstElement
                    ╰── GstAudioDecoder
                        ╰── GstMad

## 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 ]

## Functions

## Types and Values

### struct GstMad

    struct GstMad;

## Property Details

### The `“half”` property

      “half”                     gboolean

Generate PCM at 1/2 sample rate.

Flags: Read / Write

Default value: FALSE

### The `“ignore-crc”` property

      “ignore-crc”               gboolean

Ignore CRC errors.

Flags: Read / Write

Default value: TRUE

## See Also

lame