-2

I'm publishing a multibitrate stream with adobe live media encoder to flash media server and i have to duplicate it to two different urls within one domain. Maybe it's possible by configuring apache or maybe there's another way. Any help'd be appreciated. Thx in advance.

www0z0k
  • 4,444
  • 3
  • 27
  • 32

1 Answers1

1

If anyone needs this info:
* create a folder in Flash Media Server 4\applications (i called it 1) and copy all files from Flash Media Server 4\applications\live there.
* in Flash Media Server 4\applications\live\main.asc (if there's no such file - copy one from Flash Media Server 4\samples\applications\live) add the following code:
+ to application.onAppStart = function():

conn = new NetConnection();
conn.connect("rtmp://server_ip/1");//ip/new application folder name


application.onPublish = function (clientObj, streamObj){
    trace("got a stream : " + streamObj.name);
    if(conn.isConnected){
        ns = new NetStream(conn);
        ns.attach(streamObj);
        ns.publish(streamObj.name);
        trace("publishing through other app");
    }else{
        trace("connection not ready");
    }
}
www0z0k
  • 4,444
  • 3
  • 27
  • 32