Results 1 to 5 of 5

Thread: liverepeater-edge | How to return "stream not found" if streamName doesn't exist

  1. #1
    Join Date
    Feb 2013

    Default liverepeater-edge | How to return "stream not found" if streamName doesn't exist

    How do I return any errors to the client in a liverepeater setup if a stream is not found on the origin? I'm trying to return a NetStream.Play.StreamNotFound if a broadcast is not live.

    Right now it doesn't work because the edge tries to reconnect to the origin in an endless loop, while the origin doesn't return anything.

    Origin(origin is live , stream from Webcam , user publish):
    INFO session connect-pending -
    INFO session connect -
    INFO stream create - -
    INFO stream destroy fcbf77f19fa2241gg -
    INFO session disconnect 21753457 -
    WARN server comment - LiveMediaStreamReceiver.doWatchdog: streamTimeout: Resetting connection
    INFO server comment - LiveMediaStreamHandler.resetConnection: (SOCKET, R: ip:1935, L: /xx.xx.xx.xx:47382, S: ip:1935)
    INFO server comment - CupertinoPacketHandler.resetStream[live/_definst_/rtmp://ip:1935/live/_definst_/fcbf77f19fa2241gg]
    INFO server comment - LiveStreamPacketizerSmoothStreaming.resetStream[live/_definst_/rtmp://ip:1935/live/_definst_/fcbf77f19fa2241gg]
    INFO server comment - LiveMediaStreamHandler.sessionClosed:
    INFO server comment - LiveMediaStreamHandler.sessionClosed: reconnect: isCurrentSession:false tryConnect:true
    i want on Origin:
    if (client.isLiveRepeater())
    	//notify repeater clinet not reconnection!!
    	client.   //??????
    		"[" + this.appInstance.getVHost().getName()
    	        + "]live stream " + streamName
    		+ " not found in LiveServer.");
    	String code = "NetStream.Play.StreamNotFound";
    	String description = "user not publish...";
    	sendClientOnStatusError(client, code, description);

  2. #2



    It is not possible with the standard configuration as the mediacaster system is designed to continuously try to reconnect to the origin. The stream not found information is not propagated to the clients.

    It may be possible to do with custom coding but would require an out of band request from the edge to the origin before the mediacaster is created to determine if the origin has the stream. This request could easily be done with a http provider on the origin and some code on the edge that makes the request.

    On the edge, you would have a custom module that implements one of the IStreamNameAliasProvider[2] interfaces. These interfaces have resplvePlayAlias methods that are called for every stream play. In this method, you would check if the stream is being published locally, and validate the origin stream if not, before returning the name. If you return null, a stream not found error will be returned to the player.

    The other methods on the interfaces are resolveStreamAlias. These methods resolve the actual url for the stream on the origin server. These must return the origin url for the stream. If the resolvePlayAlias method returns a name then resolveStreamAlias will be called.


  3. #3
    Join Date
    Feb 2013


    Yes, I tried. But wasting bandwidth

    For example:
    A server with server B in a LAN. C as the publishing server on the WAN

    Client -> A -> C
    Client -> B -> C


    Client -> A -> B -> C
    This can Client -> B -> C

    Always a single stream on the B, A do not increase the downlink bandwidth to the C

    A so-called I think should always be obtained in the B stream

  4. #4


    Any solution for this problem?

    I don't want to do a request to origin server by http to check if the streamname exist or not?

    This is a good feature for the future.

  5. #5
    Join Date
    Dec 2007


    Mary, I made suggestions in this thread


Similar Threads

  1. Replies: 4
    Last Post: 07-11-2012, 06:29 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