Skip to main content
Participant
May 18, 2019
Question

Adobe flash media server 4.5 streaming to multiple RTMP

  • May 18, 2019
  • 2 replies
  • 1128 views

Hello everyone,

I'm sorry to bother but I have this question that some might find it simple but I have no clue how to figure it out.

so I'm a beginner at it so as my friend who uses fms 4.5, so the thing is he want to stream to his local IP and also to Youtube at the same time through rtmp. so is that possible ? and if so then how to achieve that?

If its still not clear ...

So its like that he streams using adobe flash media encoder to rtmp://localhost/live/StreamName and it will be also sent /stream to youtube.

I hope I made it clear.

Thanks in advance.

This topic has been closed for replies.

2 replies

Graeme Bull
Community Expert
Community Expert
May 22, 2019

I thought Flash media encoder had the ability to stream to two different servers at the same time. I'd look at that first. Pushing out streams from AMS can be tricky, especially when sending it over to YouTube as you have to include the hash I think.

Robert Mc Dowell
Legend
May 19, 2019

you just need to grab the stream and broadcast it from AMS side wherever you like in main.asc script

Participant
May 19, 2019

Thank you Mr. Dowell for replying the thing is idk how to write that in the main.asc script. how should i tell it to make a new connection and to republish my local stream into the other connection, in my case how to stream into my localhost and stream into youtube same time.

Robert Mc Dowell
Legend
May 19, 2019

First when you need something you need to learn and avoid to ask to someone else to do the job for you, so

AMS server-side ActionScript language reference

There are many ways to do it, and there are examples if you search on internet.

for example, when you publish from Media Encoder to your server app, on the main.asc

you can create an automatic stream dispatching as soon as it's published, like

applications.onPublish = function(client,stream){

     var nc = new NetConnection();

     nc.onResult = function(info){

          ....   

     }

     nc.onStatus = function(info){

          if(info.code == "NetConnection.Connect.Success"){

               var ns = new NetStream(nc);

               ns.attach(stream);

               ns.publish("whatever_name or stream.name");

          }

     }

     nc.connect("rtmp://xxxx.xxxx.xxxx/xx/xx");

}