title: FFmpeg streaming using H.264 (with audio) - Red5 media server (Ubuntu OS)
body: <p>I'm trying to stream my webcam with FFmpeg to my Red5 server using RTMP. I've done this successfully using FLV format with the following line:</p>
  
  <pre><code>ffmpeg -f video4linux2 -i /dev/video0 -f flv rtmp://localhost/live/livestream
  </code></pre>
  
  <p>I'm new to FFmpeg and live streaming, and I've tried to stream using H.264/MPEG-4. But my knowledge is a bit limited with the FFmpeg options (which I did find here: <a href="http://man.cx/ffmpeg%281%29" rel="nofollow">http://man.cx/ffmpeg%281%29</a>).</p>
  
  <p>So, my questions would be:</p>
  
  <ol>
  <li><p>How can I use H.264/MPEG-4 to stream to my Red5 server?</p></li>
  <li><p>What are the options to stream audio as well?</p></li>
  <li><p>And one final issue is:</p></li>
  </ol>
  
  <p>I'm having a delay of about 5 seconds when I play the content with JWPlayer in Mozilla Firefox (on Ubuntu). Can you please help me out to solve this problem? Any suggestions why this might be?</p>
  
  <p>Many thanks</p>