title: how to begin streaming while ffmpeg is still transcoding the file in PHP
body: <p>I want to transcode an AVI video to mp4 with ffmpeg, but while is still transcoding, I would like to watch the video transcoded on a flash video player in realtime , Im using jwplayer , I made some test with mp4 and works great , but Im not able to make it work while is transcoding</p>
  
  <p>I made a php script to run the command in background</p>
  
  <p><strong><code>ffmpeg.exe -threads 1 -y -i "a.avi" -s 1280x720 -f mp4 -vcodec libx264 -b 2000000 -ab 128000 -ar 44100 "a.mp4"</code></strong></p>
  
  <p>on the jwplayer i have as source "a.mp4" </p>