<?xml version="1.0" encoding="utf-8"?>
<audio-profiles>
  <profiles>
    <profile id="lame-mp3">
      <_name>MP3 (LAME Encoder)</_name>
      <_description>A proprietary and older, but also popular, lossy audio format that produces larger files at lower bitrates.</_description>
      <output-file-extension>mp3</output-file-extension>
      <mimetype>audio/mp3</mimetype>
      <mimetype>taglib/mp3</mimetype>
      <mimetype>audio/mpeg3</mimetype>
      <mimetype>audio/x-mpeg-3</mimetype>
      <mimetype>audio/x-mpeg</mimetype>
      <mimetype>audio/mpeg</mimetype>
      <mimetype>application/x-id3</mimetype>
      <mimetype>audio/x-mp3</mimetype>
      <pipeline>
        <process id="gstreamer">
        <![CDATA[
            (gst-construct-pipeline
                "audioconvert"
                (gst-construct-element "lame"
                    (if (= vbr_mode -1)
                        ("preset" preset)
                        ("mode" 4
                         (if (= vbr_mode 0)
                             ("bitrate" bitrate)
                             ("vbr" vbr_mode "vbr-quality" (- 9 vbr_quality))))))
                (if (and 
                    (!= vbr_mode 0) 
                    (gst-element-is-available "xingmux")) 
                        "xingmux" 
                        "")
                (if (gst-element-is-available "id3v2mux")
                    "id3v2mux"
                    "id3mux"))
        ]]>
        </process>
        <variable id="vbr_mode">
          <_name>VBR Mode</_name>
          <control-type>combo</control-type>
          <default-value>0</default-value>
          <possible-values>
            <_value value="0" disables="vbr_quality,preset" enables="bitrate" >Constant Bitrate</_value>
            <_value value="4" disables="bitrate,preset" enables="vbr_quality">Variable Bitrate</_value>
            <_value value="3" disables="bitrate,preset" enables="vbr_quality">Average Bitrate</_value>
            <_value value="-1" disables="bitrate,vbr_quality" enables="preset">Preset</_value>
          </possible-values>
        </variable>
        <variable id="vbr_quality">
          <_name>VBR Quality</_name>
          <control-type>slider</control-type>
          <min-value>0</min-value>
          <_min-label>Worst</_min-label>
          <max-value>9</max-value>
          <_max-label>Best</_max-label>
          <step-value>1</step-value>
          <default-value>5</default-value>
        </variable>
        <variable id="bitrate">
          <_name>Bitrate</_name>
          <control-type>combo</control-type>
          <default-value>128</default-value>
          <possible-values>
            <value value="64">64 Kbps</value>
            <value value="96">96 Kbps</value>
            <value value="128">128 Kbps</value>
            <value value="160">160 Kbps</value>
            <value value="192">192 Kbps</value>
            <value value="256">256 Kbps</value>
            <value value="320">320 Kbps</value>
          </possible-values>
        </variable>
        <variable id="preset">
          <_name>LAME Preset</_name>
          <control-type>combo</control-type>
          <default-value>standard</default-value>
          <possible-values>
            <_value value="medium">Medium</_value>
            <_value value="standard">Standard</_value>
            <_value value="extreme">Extreme</_value>
            <_value value="insane">Insane</_value>
          </possible-values>
        </variable>
      </pipeline>
    </profile>
  </profiles>
</audio-profiles>
