Results 1 to 2 of 2

Thread: API call behind stream manager

  1. #1
    Join Date
    Nov 2012
    Posts
    12

    Default API call behind stream manager

    Hello,

    I want to automate stream creation process. Basically the same thing as I do manually using wowza stream manager.
    Here is my manual configuration:

    Application: live/_definst_
    MediaCaster Type: rtp
    Stream Name: mp4:andrei.stream
    I have the file andrei.stream with rtsp://192.168.1.3:8086

    Everything works if I manually start a stream.

    I tried the following code to automate the proces:

    public class Server implements IServerNotify2 {
    public void onServerInit(IServer server){
            IVHost vhost = VHostSingleton.getInstance(VHost.VHOST_DEFAULT);
    
            String applicationName = "live";
            IApplication app = vhost.getApplication(applicationName);
            IApplicationInstance appInstance = app.getAppInstance("_definst_");
    
            String liveStreamName = "mp4:andrei.stream";
    
            Publisher publisher = Publisher.createInstance(vhost, applicationName);
            publisher.publish(liveStreamName);
    ...
    }
    When I start the server, the console log says the stream is published, but in fact the video stream is not started.
    And I don't see it beeing published on the streammanager page.
    Do I misunderstand something in API?

    -- log when I manually start a stream --
    INFO application app-start _definst_ live/_definst_
    INFO server comment - sortPackets[1]: sortBufferSize:250
    INFO stream create - -
    INFO stream publish andrei.stream -
    INFO server comment - Wowza Media Server is started!
    INFO server comment - RTPMediaCaster.create[1578022692]
    INFO server comment - RTPMediaCaster.init[1578022692]
    INFO server comment - RTPMediaCaster.Reconnector[1578022692:live/_definst_:andrei.stream]: start: 1
    VS

    -- log when the module starts --
    INFO server comment - Server.startShutdownHook: Start server shutdown hook
    INFO application app-start _definst_ live/_definst_
    INFO server comment - sortPackets[1]: sortBufferSize:250
    INFO stream create - -
    INFO stream publish andrei.stream -
    INFO server comment - Wowza Media Server is started!

    Thanks,
    Andrei
    Last edited by dr.gigabit; 01-08-2013 at 03:48 AM.

  2. #2
    Join Date
    Nov 2012
    Posts
    12

    Default

    I found the solution myself,

    this code was required to actually start a stream

    appInstance.startMediaCasterStream("mp4:andrei.stream", "rtp");

Similar Threads

  1. Replies: 1
    Last Post: 07-09-2014, 02:34 AM
  2. Wowza Streaming Engine Manager & REst API
    By gary4gar in forum Wowza Streaming Engine REST API
    Replies: 3
    Last Post: 03-05-2014, 02:52 PM
  3. stream manager
    By matanf in forum General Forum
    Replies: 4
    Last Post: 05-30-2012, 08:32 AM
  4. control receive stream(stream manager) programmatically?
    By sktniran in forum Live Streaming and Encoder Discussion
    Replies: 2
    Last Post: 11-22-2011, 12:07 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
  •