title: How to capture iOS camera and publish RTMP live stream?
body: <p>I have completed an RTMP player on iOS, using FFmpeg to decode <code>flv1</code> video and <code>speex</code> audio. Now I want to capture iOS camera and decode H.264 video and AAC audio, then publish video and audio stream to RTMP server, Red5 server as the player programe used before. I know that I should recompile FFmpeg, adding <code>libx264</code> and <code>libaacplus</code> to support iOS video and audio decoding. But then how to publish RTMP live stream? Using <code>RTMP_Write()</code>? <code>RTMP_SendPacket()</code>? Please just tell me some thoughts or solutions, or it's very generous of you to show me some code. Thanks!</p>
  
  <p>Reference: <a href="https://stackoverflow.com/questions/23629913/capture-camera-and-publish-video-with-librtmp">capture camera and publish video with librtmp</a></p>