Results 1 to 2 of 2

Thread: How to set ModuleLoopUntilLive properly for pre-roll video

  1. #1
    Join Date
    Mar 2014
    Posts
    10

    Default How to set ModuleLoopUntilLive properly for pre-roll video

    Hi,
    I'm trying to set pre-roll video with ModuleLoopUntilLive (http://www.wowza.com/forums/content....-stream-starts), 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.

    1. attempt without ServerListenerStreamPublisher (http://www.wowza.com/forums/content....Publisher%29):
    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?

    2. 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

  2. #2
    Join Date
    Jun 2012
    Posts
    723

    Default

    Hi Dominik,

    It looks like you are on the right track with your configuration attempt #2. The only problem is that you are using your encoders to push their streams using the ame stream names you have configured the ServerListenerStreamPublisher to use the same stream names for the internally generated streams.

    You should change your "loopUntilLiveSourceStreams" property from the /Root/Application block so that it is using encoderStream1, encoderStream2 values. Also, you will need to configure your encoders/external devices to publish their streams to rtmp://server:1935/live/encoderStream1 and rtmp://server:1935/live/encoderStream2

    You should also use different playlist names for the two different streams generated by the ServerListenerStreamPublisher.

    Zoran

Similar Threads

  1. Pre-Roll Video Ad
    By TheSTN in forum Integrating Wowza into your workflow
    Replies: 3
    Last Post: 12-16-2013, 01:50 PM
  2. Pre-Roll Video
    By atcontact in forum Integrating Wowza into your workflow
    Replies: 1
    Last Post: 05-15-2013, 01:11 AM
  3. Pre-Roll Video Ad
    By TheSTN in forum Live Streaming and Encoder Discussion
    Replies: 3
    Last Post: 03-18-2013, 03:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •