Results 1 to 8 of 8

Thread: Publish and play a live stream from API

  1. #1
    Join Date
    Oct 2011
    Posts
    6

    Default Publish and play a live stream from API

    Hello,

    I would like to know how to do this: http://www.wowza.com/forums/content.php?38
    In an automatized way. I mean I'll have to create that kind of live streaming on-the-fly so I need a way to do that part where you access the http://[wowza-address]:8086/streammanager and start the stream but using the API.
    I have checked the documentation but its so big (a great thing ) but idk where to start if someone can give me a hint it would be appreciated.

    Thanks!

  2. #2
    Join Date
    Dec 2007
    Posts
    22,013

    Default

    You can use the MediaCaster API in a Wowza module or HTTProvider or ServerListener:

    http://www.wowza.com/forums/content....-stop-a-stream

    And there is another approach that might work for you here:
    http://www.wowza.com/forums/showthre...-.stream-files)

    Richard

  3. #3
    Join Date
    Oct 2011
    Posts
    6

    Default Thanks

    Quote Originally Posted by rrlanham View Post
    You can use the MediaCaster API in a Wowza module or HTTProvider or ServerListener:

    http://www.wowza.com/forums/content....-stop-a-stream

    And there is another approach that might work for you here:
    http://www.wowza.com/forums/showthre...-.stream-files)

    Richard
    Omg, this second approach is amazing, I would never find it if wasnt for you, tyvm.
    I wonder if it works for Wowza Media Server 3?

  4. #4
    Join Date
    Dec 2007
    Posts
    22,013

    Default

    Cool, you're welcome. Glad that was right for you.

    Richard

  5. #5

    Default programmatic control

    Hey Richard,

    What you posted there looks very helpful to me for my application (which is a enterprise java app that will be used to programmatically control wowza). I had stumbled across the MediaCaster API and it looks like exactly what I need.

    What I don't understand is how I would get a reference to my applications (my IApplicationInstance implementations) to begin with? Thanks in advance.

    - Adam

  6. #6
    Join Date
    Dec 2007
    Posts
    22,013

    Default

    Here is a HTTProvider example with MediaCaster API usage:
    http://www.wowza.com/forums/content....post-variables

    In a Module you might have a IClient or IMediaStream or other parameter, and you can always get to the application instance somehow.

    public void doSomething(IClient client, RequestFunction function,
    		AMFDataList params) {
    	
    	IApplicationInstance appInstance = client.getAppInstance();
    }
    Richard

  7. #7

    Default IModuleOnApp

    Richard,

    Thanks for the reply. It looks like access to the applications is readily available when implementing a module. I'm going to start looking into the HTTPProvider interface next.

    In regards to working with an implementation of IModuleOnApp: events are fired when an App starts and stops and thats when the onAppStart() and onAppStop() methods are called, correct?

    When does Wowza consider an app to have 'started'? 'Stopped'? Does the app have to be actively streaming? Or is it simply that by virtue of being one of the defined/configured in the 'conf' directory it is 'started' when Wowza Media Server is started?

    Is there a case when an app would be started after the server is running or stopped before the server is stopped?

    Thanks in advance.

    - Adam

  8. #8
    Join Date
    Dec 2007
    Posts
    22,013

    Default

    Adam,

    A Wowza application starts when it is used in some way then will unload after a minute of inactivity, by default. You can increase Application.xml /ApplicationTimeout, or set it to "0" to never timeout once it is started, and you can use this method to start an application when Wowza starts:

    http://www.wowza.com/forums/content....an-appInstance

    Richard

Similar Threads

  1. Publish live streams using server side API (without .stream files)
    By AlexeyTs in forum Wowza Streaming Server Java API
    Replies: 9
    Last Post: 07-23-2014, 05:02 PM
  2. Replies: 0
    Last Post: 01-03-2012, 09:28 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
  •