Results 1 to 6 of 6

Thread: Is there a way to switch the input live stream?

  1. #1
    Join Date
    Jul 2012
    Posts
    19

    Default Is there a way to switch the input live stream?

    I have more than one input live stream from other source.
    Is it possible to set only 1 output stream from wowza server and when it is needed I can switch between the input live streams to publish the selected one to the output stream?

  2. #2

    Default

    If I remember correctly, yes, it is possible, but it requires some development work.

    I would start with implementing the IServerNotify interface, override public void onServerInit(IServer) and use something along those lines (far from functional example

    List VirtualHosts = VHostSingleton.getVHostNames(); // ... list of virtual hosts
    IVHost vhost = VHostSingleton.getInstance(VHostName); // get vhost instance
    Stream s = Stream.createInstance(vhost, AppName, StreamName); // create stream name (this is your "1 output stream")
    s.play(FileName, 0, -1, true); // just play something, in my case its a video clip

    I'm sure there are better examples if you search around the forums. All I'd have to do with above is figure out how to stream live stream sources and how to control the streaming. That, I hope, should be possible

    The most important function for this is Stream.play. You will probably call this when ever you want to change the input for this output stream that is created.
    Last edited by Tit Petric; 07-10-2012 at 01:56 AM. Reason: Emphasis on Stream.play as most important in example

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

    Default

    Right, use Stream class streams. Here are a couple of other examples to look at:

    http://www.wowza.com/forums/content....-class-streams

    http://www.wowza.com/forums/content....-class-streams

    Richard

  4. #4
    Join Date
    Jul 2012
    Posts
    19

    Default

    Thanks you all
    but i still have a few questions(i am a noob:<).
    the example use ActionScript to switch the stream,does that mean the switch action is controlled by the user?or if the switch action is done all user will see the switched stream?

    What I want to achieve is the server side control the switch and the client side would think it as a normal single live stream.
    Last edited by shadowlin; 07-10-2012 at 07:36 PM.

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

    Default

    If you know exactly what sequence you want to stream, you can just use the scheduler, the first link. If you want to be able to switch dynamically in any way you will have to have a controller of some type, most likely a Flash RTMP application that one person will operate to modify the stream that everyone can see. That is quite involved but there is a starting place in this example:

    http://www.wowza.com/forums/content....-class-streams

    Richard

  6. #6
    Join Date
    Jul 2012
    Posts
    19

    Default

    Thanks for the reply, I will look into it

Similar Threads

  1. Input Live-Stream switch support
    By SilentBob in forum General Forum
    Replies: 1
    Last Post: 07-18-2013, 06:53 AM
  2. Stream video file with cuepoints as live and then switch to live stream
    By notreemedia in forum Live Streaming and Encoder Discussion
    Replies: 4
    Last Post: 02-28-2012, 08:23 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
  •