Results 1 to 9 of 9

Thread: stream not exist redirect vod

  1. #1

    Default stream not exist redirect vod

    Hi this is possible to replace a stream that not exist by a vod file?

    Example:

    i create a video player with this data: rtmp://127.0.0.1/live/NOSTREAMEXIST

    And the wowza play a rtmp://127.0.0.1/vod/mp4:sample.mp4


    Thanks for your help

  2. #2

    Default

    The easiest solution to this would probably be to use this module to loop a video until a live stream is available:
    How to loop a pre-roll until a live stream starts

    Salvadore

  3. #3

    Default

    Quote Originally Posted by salvadore View Post
    The easiest solution to this would probably be to use this module to loop a video until a live stream is available:
    How to loop a pre-roll until a live stream starts

    Salvadore
    Hi i installed this module and receive this logs:

    Original stream: mary

    Loop stream: Stream1 (working i can play using wowza flash player) (rtmp://127.0.0.1/live/Stream1)

    INFO server comment - ModuleLoopUntilLive.StreamListener.onPublish Swapping to live [mary]

    INFO server comment - ModuleLoopUntilLive.StreamListener.onPublish Swapping to playlist [mary]

    When i try to play mary stream appear this error in wowza player (rtmp://127.0.0.1/live/mary)

    Failed to play mary; stream not found.


    <Property>
      <Name>loopUntilLiveStream</Name>
      <Value>mary</Value>
    </Property>
    <Property>
     <Name>loopUntilLiveOutStream</Name>
      <Value>Stream1</Value>
    </Property>


    INFO server comment - MediaStreamMap.removeLiveStreamPacketizer[live/_definst_/diogopms]: Destroy live stream packetizer: sanjosestreamingpacketizer
    INFO server comment - Item Stopped: mp4:sample.mp4on Stream: Stream1
    INFO server comment - Stream.switch[live/_definst_/stream1]: index: 0 name:mp4:sample.mp4 start:0 length:60
    INFO server comment - Item Started: mp4:sample.mp4on Stream: Stream1
    INFO server comment - Item Stopped: mp4:sample.mp4on Stream: Stream1
    INFO server comment - Stream.switch[live/_definst_/stream1]: index: 0 name:mp4:sample.mp4 start:0 length:60
    INFO server comment - Item Started: mp4:sample.mp4on Stream: Stream1
    INFO server comment - Item Stopped: mp4:sample.mp4on Stream: Stream1
    INFO server comment - Stream.switch[live/_definst_/stream1]: index: 0 name:mp4:sample.mp4 start:0 length:60
    INFO server comment - Item Started: mp4:sample.mp4on Stream: Stream1
    INFO server comment - Item Stopped: mp4:sample.mp4on Stream: Stream1
    INFO server comment - Stream.switch[live/_definst_/stream1]: index: 0 name:mp4:sample.mp4 start:0 length:60
    INFO server comment - Item Started: mp4:sample.mp4on Stream: Stream1
    INFO server comment - Item Stopped: mp4:sample.mp4on Stream: Stream1
    INFO server comment - Stream.switch[live/_definst_/stream1]: index: 0 name:mp4:sample.mp4 start:0 length:60
    INFO server comment - Item Started: mp4:sample.mp4on Stream: Stream1
    Last edited by MARY2006; 01-23-2014 at 09:10 AM.

  4. #4

    Default

    If you have configure the application correctly, while there is no live stream being published, "Stream1" will play sample.mp4, then when you publish a live stream, you will publish to "Stream1" and the live stream will override sample.mp4.

    There is no stream named "mary"

    Salvadore

  5. #5
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    The Stream class stream, which is named "Stream1" in the example setup, is a live stream that playback clients stream.

    The source of a Stream class stream ("Stream1") can be files or other live streams. The Stream class can switch from one file to another, and to a live stream and back to a file, etc. These are in turn the source of Stream1, but the player will continue to play Stream1.


    Richard

  6. #6

    Default

    Quote Originally Posted by rrlanham View Post
    The Stream class stream, which is named "Stream1" in the example setup, is a live stream that playback clients stream.

    The source of a Stream class stream ("Stream1") can be files or other live streams. The Stream class can switch from one file to another, and to a live stream and back to a file, etc. These are in turn the source of Stream1, but the player will continue to play Stream1.


    Richard

    Hi rrlanham but in this site (http://www.wowza.com/forums/content....-stream-starts) says that i publish to myStream and if this stream (myStream) is not live play Stream1, but if the stream myStream exist so it plays the content??

    Right?

    Thank's

  7. #7
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Yes, that is true. If you use an RTMP live encoder to publish a live stream named "myStream" you can play that directly, of course. But it is not what you are wanting to do when you are wrapping that live stream in a Stream class stream to use the loop-before-live example. You want to play the Stream class stream that wraps the live stream.

    Richard

  8. #8

    Default

    Ok, i will try this solution, but imagine that you have more 1 milion streamnames.. This is not a viable solution do write all the streamname and create a playlist with all the streams.

    This is possible to do a generic solution to map all streamame that not playing play a vod.

    Like this (every stream redirect to a playlist):
    	public void onConnect(IClient client, RequestFunction function,
    			AMFDataList params) {
    		getLogger().info("onConnect: " + client.getClientId());
    		swapToPlaylist("Stream1");
    	}
    
    
    	public void onConnectAccept(IClient client) {
    		getLogger().info("onConnectAccept: " + client.getClientId());
    		getLogger().info("onConnectAccept: " + client.getClientId());
    		swapToPlaylist("Stream1");
    		
    	}

    or this:

    <smil>
        <head>
        </head>
        <body>
            <stream name="*All streams  who are not playing "></stream>
    
    
            <playlist name="pl1" playOnStream="Stream1" repeat="true" scheduled="2013-09-25 16:30:00">
                <video src="mp4:sample.mp4" start="0" length="-1"/>
            </playlist>
    
    
        </body>
    </smil>

  9. #9
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Mary,

    I considered some possible approaches to accomplishing that, but they all fall apart as I think them through.

    For reference, the source for ModuleLoopUntilLive is included in the collection download, but I don't think there is way to extend this to accomplish what you describe. You can have multiple loopUntilLiveSourceStreams as long as you have the same number of loopUntilLiveOutputStreams, and each the members of both lists have to be unique or you will probably have strange behavior, i.e. you can't share the same loopUntilLiveOutputStreams for different loopUntilLiveSourceStreams

    Richard

Similar Threads

  1. Verifying a stream is running/exist or not
    By tuncay-rbm in forum Wowza Streaming Server Java API
    Replies: 4
    Last Post: 02-21-2014, 12:04 PM
  2. VOD - Redirect a user from a url to a new path
    By staubina in forum Video On Demand Streaming Discussion
    Replies: 16
    Last Post: 05-30-2012, 10:30 AM
  3. Live Stream doesn't exist?
    By nkordyjaka in forum Live Streaming and Encoder Discussion
    Replies: 1
    Last Post: 05-03-2012, 06:03 AM
  4. Redirect unauthorized clients from LIVE to VOD
    By lokki7 in forum Server-side Modules and Code Samples Discussion
    Replies: 9
    Last Post: 11-09-2011, 07:45 AM

Posting Permissions

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