I'm trying to do a live stream of video captured by my webcam and host it on IIS using Live Smooth Streaming. Here are the steps I'm taking:
- In the IIS manager's MIME Types add a new extension:
.isml
with type:application/atom+xml
- In the IIS manager add a publishing point (filename:
myStream.isml
). - Start the publishing point.
- Run the following command:
ffmpeg -hide_banner -y -f dshow -rtbufsize 100000k -i video="Lenovo EasyCamera":audio="Microphone (Realtek High Definition Audio)" -movflags isml+frag_keyframe -s 854x480 -f ismv http://localhost/myStream.isml/Stream(video)
- Play the stream from the location
http://localhost/myStream.isml/manifest
using VLC.
The problem is that the playback stops a few seconds before the moment in which I opened the stream with VLC. If I reopen the stream again, it will play from around the moment the first playback stopped to the moment the second playback started.
What I'm trying to achieve is to make the clients see the video from the moment they open the stream to the moment they disconnect. A delay up to a few seconds is acceptable. Obviously, the playback should not end regardless of the connection moment.
How can I do this? Should I change something in the FFMPEG's command or in the IIS?
Note: A solution using tools other than FFMPEG is acceptable, as long as they are free (as in beer).
EDIT: Changed the description of problematic playback.