title: Ffmpeg how to encode mpg into 2 channel aac?
body: <p>This command will of course work:</p>
  
  <pre><code>avconv -i input.mpg -c:v libx264 -s 852x480 -c:a libfaac output.mp4
  </code></pre>
  
  <p>But that encodes the mpg into a file with these audio settings:</p>
  
  <pre><code>    {
          "index": 1,
          "codec_name": "mp2",
          "codec_long_name": "MP2 (MPEG audio layer 2)",
          "codec_type": "audio",
          "codec_time_base": "1/48000",
          "codec_tag_string": "mp4a",
          "codec_tag": "0x6134706d",
          "sample_fmt": "s16",
          "sample_rate": "48000",
          "channels": 2,
          "bits_per_sample": 0,
          "r_frame_rate": "0/0",
          "avg_frame_rate": "0/0",
          "time_base": "1/48000",
          "start_time": "0.000000",
          "duration": "60.000000",
          "nb_frames": "2500",
          "tags": {
              "language": "und",
              "handler_name": ""
          }
      }
  </code></pre>
  
  <p>This is what I need:</p>
  
  <pre><code>Resolution: 480p
  Ratio: 1.78
  Audio: 2 channel AAC
  Video Bitrates: 600 / 800 / 1200 / 2000
  Audio Bitrates: 96
  Codec: H.264 - High
  </code></pre>
  
  <p>I tried:</p>
  
  <pre><code>avconv -i input.mpg -c:v libx264 -s 852x480 -c:a libfaac output.mp4
  </code></pre>
  
  <p>But I get error:</p>
  
  <pre><code>Unknown encoder 'libfaac'
  </code></pre>
  
  <p>Even after I installed libfaac-dev like this:</p>
  
  <pre><code>sudo apt-get install libfaac-dev
  </code></pre>