title: What Codec to use for decode and encode the audio data for webrtc with ffmpeg?
body: <p>I want to use ffmpeg to decode the audio data received from webrtc and encode audio and send it to client side webrtc.</p>
  
  <p>With ffmpeg, how can I find the right arguments for those ???</p>
  
  <pre><code>    AVCodecContext* m_encontext=NULL;
      AVCodecContext* m_decontext=NULL;
  
      AVCodec* encoder = avcodec_find_encoder(???);
      if (encoder != NULL)
      {
          AVCodecContext* context = avcodec_alloc_context3(encoder);
          if (context != NULL) 
          {
              context-&gt;sample_fmt = ???;
              context-&gt;bit_rate = ???;
              context-&gt;sample_rate = ???;
              context-&gt;channels = ???;
              int res = avcodec_open2(context, encoder, NULL);
              if(res != 0)
                  m_encontext = context;
          }
      }
      AVCodec* decoder = avcodec_find_decoder(???);
      if (decoder != NULL)
      {
          AVCodecContext* context = avcodec_alloc_context3(decoder);
          if (context != NULL) 
          {
              context-&gt;sample_fmt = ???;
              context-&gt;bit_rate = ???;
              context-&gt;sample_rate = ???;
              context-&gt;channels = 1;
  
              int res = avcodec_open2(context, decoder, NULL);
              if(res == 0)
                  m_decontext = context;
          }
      }
  </code></pre>