Tips for encoding a live stream to IIS Media Services (or Azure Live Media Services) with FFMPEG?

1.3k Views Asked by At

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?

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.

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 :)...

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)
1

There are 1 best solutions below

0
On

Your command works for me streaming to localhost with IIS Media Services.

ffmpeg -y -re -i big_buck_bunny_480p_h264.mov -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://localhost/smooth/test.isml/Streams(video)

Remember to restart the publishing point each time before you start ffmpeg and also create clientaccesspolicy.xml and crossdomain.xml files in the root of your webserver to get a Silverlight player working.