Hi,
I’m trying to set pre-roll video with ModuleLoopUntilLive (https://www.wowza.com/docs/how-to-loop-a-pre-roll-until-a-live-stream-starts-loopuntillive), but I have some problems there.
My use case is that we have 2 incomming live streams from external device (named Stream1, Stream2) and I want to add pre-roll video in loop (sample.mp4) before live stream is available.
I’m using url rtmp://server:1935/live/Stream1 (rtmp://server:1935/live/Stream2) in player.
- attempt without ServerListenerStreamPublisher (https://www.wowza.com/docs/how-to-schedule-streaming-with-wowza-streaming-engine-streampublisher
I have set properties in my live app:
/Root/Application loopUntilLiveSourceStreams String liveStreamPreRoll.stream,liveStreamPreRoll.stream
/Root/Application loopUntilLiveOutputStreams String Stream1,Stream2
And I have added stream file liveStreamPreRoll.stream and connect it to my live app through MediaCaster as liverepeater. So, now I see liveStreamPreRoll.stream in incomming streams and this stream is working.
I expect that live stream (rtmp://server:1935/live/Stream1 or rtmp://server:1935/live/Stream2) will work now, but it doesn’t. What’s wrong? Could this work?
- attempt with ServerListenerStreamPublisher:
I have added Stream publisher module and streamschedule.smil:
<?xml version="1.0" encoding="UTF-8"?>
<smil>
<body>
<stream name="Stream1"></stream>
<stream name="Stream2"></stream>
<playlist name="livePreRollPlaylist" playOnStream="Stream1" repeat="true" scheduled="2015-01-01 12:00:00">
<video src="mp4:sample.mp4" start="0" length="20"/>
</playlist>
<playlist name="livePreRollPlaylist" playOnStream="Stream2" repeat="true" scheduled="2015-01-01 12:00:00">
<video src="mp4:sample.mp4" start="0" length="20"/>
</playlist>
</body>
</smil>
Now both live streams (rtmp://server:1935/live/Stream1 and rtmp://server:1935/live/Stream2) work well and play sample.mp4. If external device starts streaming streams (named Stream1 and Stream2) to wowza server, player stops playing sample.mp4 and after aprox. 10 seconds starts playing live stream content. Why there is that delay and could it be minimized?
Second thing, I want to start playing sample.mp4 again after live stream ends, but live stream is closed and disappers from incoming streams. How could it be set?
Streams with pre-roll video are started again after app restart.
I’m using module collection jar file downloaded from wowza site and wowza 4.1.2 (build 13947). JWPlayer is used as player.
Thanks for help!
Dominik