Hi,
I want to start a stream automatically when a HLS request is made.
For this, I wrote a server side module with the following code:
public class LiveModule extends ModuleBase {
public void onHTTPSessionCreate(IHTTPStreamerSession httpSession)
{
IApplicationInstance appInstance = httpSession.getAppInstance();
String streamName = httpSession.getStreamName();
appInstance.startMediaCasterStream(streamName, "rtp");
}
}
I use VLC for playing the HLS stream from Wowza. So, when I acces this url in VLC http://wowza-ip:1935/live/appInst/sample.stream/playlist.m3u8 it happens the following:
-
the stream starts (I see it in the Wowza log and also in the StreamManager web interface)
-
the VLC starts to play but it stops after 3-4 seconds
-
if I press play button in VLC one more time, the video plays nicely in VLC without any problems
What should I do in order for the video to play properly in VLC from the first attempt? I guess there is some kind of delay I should implement somewhere. But I don’t know where: server side (in some config files or in the code) or at the player (VLC) level.
Thanks,
Ciprian