Chaining streams between 2 media server

Ask a Question related to Macromedia Flash Flashcom, Design and Development.

  1. #1

    Default Chaining streams between 2 media server

    Hi i'm trying to setup a stream chaining between 2 flash media servers.

    Basically I have an swf that streams my camera to FS Server 1. In FS Server
    1, i have the following code in the main.asc


    application.onConnect = function(client, username){
    gFrameworkFC.getClientGlobals(client).username = username;
    application.acceptConnection(client);
    }

    application.onConnectAccept = function(client, username){
    application.myRemoteConn.connect("rtmp://10.0.0.23/myapp"); // Connect to FS2
    application.myRemoteConn.onStatus = function(info){
    if (info.code == "NetConnection.Connect.Success" &&
    application.myRemoteConn.isConnected){
    application.myStream = Stream.get("foo");
    if (application.myStream) {
    application.myStream.play("me_live", 0, -1, true,
    application.myRemoteConn);
    }
    }
    }
    }

    The stream is created in FS1, and I can view it if I connect to it with an SWF
    client. On the FS2 server (the server FS1 does a NetConnection to), I can see
    a client connection in the Clients tab but thats about it. If I try to connect
    to the FS2 server, there is no stream displaying on the SWF client. (The SWF
    client just contains a Video object which connects to the FS stream.)

    Any ideas please? This may sound like a silly question, but I'm fairly new to
    server side action script.

    Does any one have any sample code? Is there an alternate method of chaining a
    stream? I've thoroughly searched the docos but no luck.

    Thanks again.

    ninjateapartyover Guest

  2. Similar Questions and Discussions

    1. Flash Media Server 2 - Protecting RTMP Streams...
      Hello, I'm working on a project involving Flash Media Server 2 and streaming videos using RTMP. At first I thought I could just use the...
    2. I?ve got a problem writing files on the server side withFlash Media Server 2.0.2 and 2.0.3.
      Hello, I?ve got a problem writing files on the server side with Flash Media Server 2.0.2 and 2.0.3. The same code was working fine with an older...
    3. Media Streams thru one NetConnection or more?
      Hello buddies, In a rather heavy media communication app (with about 500 concurrent users), is it better to use more than one NetConnection for...
    4. Can you detail How create an application use StreamingMedia Server (Flash Media Server) for me?
      Can you detail the way to create an application use Streaming Media Server (Flash Media Server) for me? I installed Flash Media Server 2,...
    5. Need to create a multi-threaded component that streams file from remote server to asp.net
      I'm a dotnet newbie and have been developing some web applications in asp.net. I have a requirement to load files from a remote file cache server...
  3. #2

    Default Re: Chaining streams between 2 media server

    What you want to do is have FC2 subscribe to the stream on FC1. Let's have a look at your SSAS for the app on FC2.
    JayCharles Guest

  4. #3

    Default Re: Chaining streams between 2 media server

    hi jay,

    Thanks for your prompt reply. Yes I was actually trying that method aswell,
    obviously incorrectly. My AS code on the FS2 was this:

    application.onAppStart = function(){
    trace("application start called. create server side connection");
    application.remConn = new NetConnection();
    application.remConn.connect("rtmp://10.0.0.77/myapp"); // this connects to
    the FS1 server where a stream

    // called me_live is
    being published
    application.remConn.onStatus = function (info) {
    trace("info is "+info.code);
    }
    application.myStream = Stream.get("me_live"); // this stream is being
    streamed by the SWF client with a camera.

    // the stream is correctly being published. i
    could view this with

    // another SWF client that just retrieves the video
    if (application.myStream){
    trace("playing stream");
    application.myStream.play("me_live", -1, -1, false, application.remConn);
    }
    }


    I know that theres quite a number of errors on the above code. I would've
    figured though that the the Stream class has a method to retrieve a remote
    stream, or even in the NetConnection object (something like
    application.remConn.Stream.get("streamname")) - but of course it can't be that
    easy!! Is there way of doing this? Thanks again for your help.

    ninjateapartyover Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139