title: Tips for encoding a live stream to IIS Media Services (or Azure Live Media Services) with FFMPEG?
body: <p>We're trying to encode assets, either live or static, in a live stream to IIS Media Services using ffmpeg.  Can anyone provide pointers for exactly what kinds of parameters we should be using and setting?</p>
  
  <p>As part of our test, just to see if we can get things to work, we have a standard plain-old MP4 video static asset that we're trying to stream to the server.  It seems to work on the client side, but when we try to view the video on the receiving end, we get nothing.</p>
  
  <p>Here's an example of the command we're using, where gg.mp4 is the static MP4 video (obviously (hostname) is the name of our host and not the actual word in parenthesis :)...</p>
  
  <pre><code>ffmpeg -y -re -i gg.mp4 -movflags isml+frag_keyframe -f ismv -threads 0 -c:a libvo_aacenc -ac 2 -b:a 64k -c:v libx264 -preset fast -profile:v baseline -g 48 -keyint_min 48 -map 0:v -b:v:0 477k -s:v:0 368x152 -map 0:v -b:v:1 331k -s:v:1 288x120 -map 0:v -b:v:2 230k -s:v:2 224x92 -map 0:a:0 http://(hostname)/ingest.isml/Streams(video)
  </code></pre>