Results 1 to 5 of 5

Thread: IMediaStreamNameAliasProvider2 LiveMediaStreamReceiver.connect: failure

  1. #1

    Default IMediaStreamNameAliasProvider2 LiveMediaStreamReceiver.connect: failure

    Okay I have a working liveedge and want to add in support for stream aliasing. I added an implements line to my module:

    extends ModuleBase implements IMediaStreamNameAliasProvider2

    Put in all the necessary public String resolvePlayAlias methods leaving them to just return back the name w/o any changes (for now). However, as soon as I register the alias provider streams stop working. Removing setStreamNameAliasProvider line and everything works fine again:

    public void onAppStart(IApplicationInstance appInstance) {
    appInstance.setStreamNameAliasProvider(this);

    I see these WARN entries in the logs:
    - - - - -
    INFO server comment - onAppStart: liveedge/_definst_
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    INFO server comment - ModuleIdleDisconnect.onAppStart idleDisconnectFrequency: 500
    INFO server comment - ModuleIdleDisconnect.onAppStart idleDisconnectTimeout: 60000
    INFO server comment - IdleDisconnectWorker.start: liveedge/_definst_
    INFO application app-start _definst_ liveedge/_definst_
    INFO server comment - Resolve Play: 4/1/2000_720.stream
    INFO stream create - -
    INFO server comment - Resolve Stream Mediacaster: 4/1/2000_720.stream
    WARN server comment - LiveMediaStreamReceiver.connect: failure
    INFO server comment - VHost.startStartupStreams: Stream successfully started [liveedge/_definst_]: flv:4/1/2000_720.stream
    INFO server comment - Resolve Play: 4/1/2005_720.stream
    INFO stream create - -
    INFO server comment - Resolve Stream Mediacaster: 4/1/2005_720.stream
    WARN server comment - LiveMediaStreamReceiver.connect: failure
    INFO server comment - VHost.startStartupStreams: Stream successfully started [liveedge/_definst_]: flv:4/1/2005_720.stream
    INFO server comment - Resolve Play: 4/1/2010_720.stream
    INFO stream create - -
    INFO server comment - Resolve Stream Mediacaster: 4/1/2010_720.stream
    WARN server comment - LiveMediaStreamReceiver.connect: failure
    INFO server comment - VHost.startStartupStreams: Stream successfully started [liveedge/_definst_]: flv:4/1/2010_720.stream
    INFO server comment - Resolve Play: user/2_720.stream
    INFO stream create - -
    INFO server comment - Resolve Stream Mediacaster: user/2_720.stream
    WARN server comment - LiveMediaStreamReceiver.connect: failure
    INFO server comment - VHost.startStartupStreams: Stream successfully started [liveedge/_definst_]: flv:user/2_720.stream
    INFO server comment - Server.startShutdownHook: Start server shutdown hook
    INFO server comment - Wowza Media Server is started!
    Last edited by hockey_dave; 06-01-2012 at 07:47 AM.

  2. #2

    Default

    Hi,

    Using IMediaStreamNameAliasProvider2 in your module will override the aliasing system for .stream files. When using IMediaStreamNameAliasProvider2 you need to also add in any logic relating to .stream files.

    Shamrock

  3. #3

    Default

    Hey Shamrock.

    Thank you for the reply. If I understand you clearly, you are saying that my liveedge (.stream) file contains a URL pointer to the origin-edge. Instead of returning "name" of the .stream back from resolveStreamAlias:
    public String resolveStreamAlias(IApplicationInstance appInstance,
    String name) {
    getLogger().info("Resolve Stream: " + name);
    return name;
    }
    I need to return back a String (fully qualified URL) pointing to the origin edge server instead. Is that correct?

    Okay, I guess if that's the black magic that I have to do...

    Can I for a moment get up on my soap box and state that this is a rather annoying implementation? For Flash, I can simply replace the streamName within the play() method:
    params.add(PARAM1, newName);

    However, doing the same thing for iOS doesn't work. In onHTTPCupertinoStreamingSessionCreate, doing a
    httpCupertinoStreamingSession.setStreamName(newName);
    doesn't work. Instead we have to mess around with this stream name alias Interface instead. Annoying enough as it is... However, now I cannot even use the .stream mechanism any more?.....??

    Airgh.

    Anyway, I'll get off my soap box now and get back to work. Thank you.

  4. #4

    Default

    Changes:
    public String resolvePlayAlias(IApplicationInstance appInstance, String name) {
    getLogger().info(name + " Resolve Play: " + originEdgeBaseUrl + name);
    return originEdgeBaseUrl + name;
    }

    public String resolvePlayAlias(IApplicationInstance appInstance,
    String name, IHTTPStreamerSession httpSession) {
    getLogger().info("Resolve Play HTTPSession: " + name);
    return originEdgeBaseUrl + name;
    }
    public String resolvePlayAlias(IApplicationInstance appInstance,
    String name, IClient client) {
    getLogger().info(name + " Resolve Play Flash: " + originEdgeBaseUrl + name);

    return originEdgeBaseUrl + name;
    }

    This seems odd. Is this not going to cause the client to serve directly from the origin-edge when we want it to stream from the live-edge for scalability?

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

    Default

    For an edge, it would be better to use resolveStreamAlias, then use StreamManager or /conf/StartUpStreams.xml to start the stream with MediaCaster type "liverepeater". The alias you use to start the stream could be the origin stream name, then you just have to concatenate the rtmp url:
    public String resolveStreamAlias(IApplicationInstance appInstance,
    			String name, IMediaCaster mediaCaster) {
    		getLogger().info("Resolve Stream Mediacaster: " + name);
    		return "rtmp://[wowza-address]:1935/liveorigin/" + name;
    	}
    Richard

Similar Threads

  1. LiveMediaStreamReceiver.connect: failure
    By catdude in forum Wowza Media Server 3 for Amazon EC2 Discussion
    Replies: 1
    Last Post: 03-06-2012, 08:32 AM
  2. Errors with LiveMediaStreamReceiver
    By grantk in forum Server-side Modules and Code Samples Discussion
    Replies: 2
    Last Post: 01-27-2012, 08:39 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
  •