title: How to live stream on facebook via ffmpeg?
body: <p>I am trying live streaming on facebook via ffmpeg but I get one error. As the error, I must use AAC instead of mp3. But I don't know how to do it.</p>
  
  <p>Error: <code>Bad audio codec 2 (MP3). Accepted audio codecs: AAC</code></p>
  
  <p>Normally, I can run command below for youtube succesfully. </p>
  
  <p><code>ffmpeg -i "rtmp://..." -deinterlace -vcodec libx264 
  -pix_fmt yuv420p -preset medium -r 30 -g 60 -b:v 2500k 
  -acodec libmp3lame -ar 44100 -threads 6 -qscale 3 -b:a 
  712000 -bufsize 512k -f flv "rtmp://a.rtmp.youtube.com/live2/key"</code></p>
  
  <p>But when I run command below with facebook rtmp, error gets.</p>
  
  <p><code>ffmpeg -i "rtmp://..." -deinterlace -vcodec libx264 
  -pix_fmt yuv420p -preset medium -r 30 -g 60 -b:v 2500k 
  -acodec libmp3lame -ar 44100 -threads 6 -qscale 3 -b:a 
  712000 -bufsize 512k -f flv "rtmp://rtmp-api.facebook.com:80/rtmp/key"</code></p>
  
  <p>I am user of Ubuntu 14.04.</p>
  
  <p>Thanks in advance.</p>