• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Pull external RTMP stream as live source.

Participant ,
Oct 23, 2012 Oct 23, 2012

Copy link to clipboard

Copied

Is it possible to pull in an external rtmp link and use it as live source. Instread of using FME as the live source, I would like to re-stream another RTMP link.

I've done this with ease in another rtmp streaming server, it's been while since I've done something like this using FMS/AMS.

Thank you in advance.

Views

8.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 24, 2012 Oct 24, 2012

Copy link to clipboard

Copied

This is the code I have thus far. I see this in my logs;

Connected to Akamai : NetConnection.Connect.Success

Publish??? : NetStream.Connect.Success

application.onAppStart = function(){

          nc = new NetConnection();

          nc.connect("rtmp://cpxxxxx.live.edgefcs.net/live/xxxxxxxxxx");

          nc.onStatus = function(infonc){

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

                              trace("Connected to Akamai : " + infonc.code);

                              ns = new NetStream(nc);

                              ns.setBufferTime(1);

                              ns.attach("mylivestream");

                              ns.publish("mylivestream", "live");

                              ns.onStatus = function(infons){

                                        trace("\nPublish??? : " + infons.code);

                                        if(info.code == "NetStream.Publish.Start"){

                                                  trace("\nPublished : " + infons.code);

                                        }

                              }

                    }

          }

}

I also have application.onConnect for the client and see my client connect, but nothing plays.

Thank you in advance.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 24, 2012 Oct 24, 2012

Copy link to clipboard

Copied

Yet another update.

I have enabled IDENT on my AMS server, allowing me to use the Akamai flash test page.

When the client connects I see in my server application log:

Sending error message: Method not found (getStreamLength).

Also the client reports ERROR STREAM NOT FOUND.

Which allows me to confirm the publish of the stream is not working.

Any guidancewould be great, thanks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Oct 24, 2012 Oct 24, 2012

Copy link to clipboard

Copied

Hey Adrian,

You need to use the Stream.play() method in order to play a live stream on server.

This method accepts the remote NetConnection apart from the stream name.

SSAS will look something like this,

application.myRemoteConn = new NetConnection();

application.myRemoteConn.onStatus = function(info)

{

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

application.myStream = Stream.get("foo");

if (application.myStream)

{

//play the stream from remote server once connection is successful

application.myStream.play("Movie1", 0, -1, true, application.myRemoteConn);

}

};

//connect to remote server where stream is already published

application.myRemoteConn.connect(rtmp://movie.com/movieApp);

If successful, this is like a client (e.g. FMLE) publishing a live stream to the server.

Once this is done, you then need to use the NetStream object on server (similar to the code snippet that you provided in comment above) to attach to that live stream and start publishing to another remote server.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 24, 2012 Oct 24, 2012

Copy link to clipboard

Copied

Thank you very much, I shall try it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 24, 2012 Oct 24, 2012

Copy link to clipboard

Copied

I don't want to publish it to another server, this is my desired work flow

Has to be all within SSAS.

1) connect to akamai

2) pull in stream from akamai

3) make stream available on the same fms server that pulled in the Akamai stream.

Is this possible? I managed to do it in 30 minutes on WOWZA. I am on my second day so far with AMS.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Oct 25, 2012 Oct 25, 2012

Copy link to clipboard

Copied

In that case you can skip the suggestion related to NetStream.

Only the first step is required for your solution.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Oct 25, 2012 Oct 25, 2012

Copy link to clipboard

Copied

Isn't the script shared by Vijay working for you. This does the same

1. Create a netConnection. Connect to remote net connection.

2. Create a local stream foo.

3. Play a remote stream "movie1" into foo. That means foo is getting data from remote stream Movie1.

Let us know, if this doesn't work..

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 25, 2012 Oct 25, 2012

Copy link to clipboard

Copied

Yes, after reading up more on publish, I do not need it, thanks for the guidence.

This is my new code. I can only get it to load if I wrap the server I am connecting to in quotes, like this "remoteservername".

application.onAppStart = function(){

          trace("Starting Live Service...");

          nc = new NetConnection();

          nc.connect("rtmp://REMOTESERVERNAME/live");

          nc.onStatus = function(info){

                    trace("Connection to remote server status " + info.code + "\n");

          }

          mystream = Stream.get("foo");

          mystream.play("REMOTESTREAMNAME@NUMBERS", 0, -1, true, nc);

}

When I connect I get the message: stream name "foo" was not found on the server. I think I am very very close. Thanks again for the help.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 25, 2012 Oct 25, 2012

Copy link to clipboard

Copied

I have added some debugging traces, here is what I get.

myStream: NetStream.Publish.Start

myStream: NetStream.Play.Reset

myStream: NetStream.Play.StreamNotFound

myStream: NetStream.Play.Stop

I know the live stream I am pulling is good, as it works within the Akamai support flash test page. Stuck again

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Oct 25, 2012 Oct 25, 2012

Copy link to clipboard

Copied

My bad…I suggested and you wrote the script with mystream.play("REMOTESTREAMNAME@NUMBERS", 0, -1, true, nc);

It should actually be mystream.play("REMOTESTREAMNAME@NUMBERS", -1, -1, true, nc);

With starttime as zero, it will look for a VOD stream. Instead use -1 to play a live stream.

Hope it works this time.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 25, 2012 Oct 25, 2012

Copy link to clipboard

Copied

Thats ok. I am sure I checked it aswell.

Many thanks for the update.

myStream: NetStream.Publish.Start

myStream: NetStream.Play.Reset

myStream: NetStream.Play.Start

myStream: NetStream.Play.PublishNotify

Looks better, however I can still not connect to rtmp://myFMSSERVER/myAPP/foo

UPDATE: my appname has to be live, same as the remote server I am pulling from.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Oct 25, 2012 Oct 25, 2012

Copy link to clipboard

Copied

Try this and let me know what do you see,

http://www.osmf.org/dev/2.0gm/debug.html?src=rtmp:///foo

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 26, 2012 Oct 26, 2012

Copy link to clipboard

Copied

Thanks. My server is not hosted locally,so I just updated the source.

Akamai test player works, however our one does not and my solution has to fit.

Server Console

Unloaded application instance live/_definst_

Starting Live Service...

netconnect status: NetConnection.Connect.Success

Sending error message: Method not found (onBWDone).

myStream: NetStream.Publish.Start

myStream: NetStream.Play.Reset

myStream: NetStream.Play.Start

myStream: NetStream.Play.PublishNotify

Sending error message: Method not found (onFCSubscribe).

Accepted a connection from IP:x.x.x.x, referrer: http://x.x.x/x.swf, pageurl: http://x.x.x/x

Sending error message: Method not found (FCSubscribe).

Wireshark dump

fmsVer...FMS/5,0,1,1076..capabilities.@o........mode.?.............level...status..code...NetConnection.Connect.Success..description...Connection succeeded...objectEncoding...........data.......version..

5,0,1,1076......B.....

..............a...........createStream.@........C.....g....FCSubscribe............Lfoo..............._result.@.........?.............y........onStatus.............level...error..code...NetConnection.Call.Failed..description...Method not found (FCSubscribe)

My asc is copied from samples/live with the changes to pull in an external source. I know I'm freaking close.

Thanks once again for your help.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Oct 26, 2012 Oct 26, 2012

Copy link to clipboard

Copied

Seems you are using an OSMF based player.

Please check out these forum posts on OSMF. They had the same problem like yours. You might get some help here.

http://forums.adobe.com/message/4236547

http://forums.adobe.com/thread/749212

http://forums.adobe.com/thread/967854

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 26, 2012 Oct 26, 2012

Copy link to clipboard

Copied

Thanks, I have already looked at this and am completely lost.

http://www.therealtimeweb.com/index.cfm/2011/12/20/fcsubscribe-with-osmf

Regarding this code, where do I put it?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 29, 2012 Oct 29, 2012

Copy link to clipboard

Copied

I have finally figured it out and its all working correctly, thank you for the guidence.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 19, 2014 Feb 19, 2014

Copy link to clipboard

Copied

Hi Adrian,

We have same requirment, something like this.

1. FMLE is streaming to AMS1.

2. Need to feed same FMLE stream to AMS2, AMS3.

3. finall we will have same streaming getting pulled/pushed to all AMS in my cluster.

Can you help me to do this? seems this was your requirment.

you are pulling stream from  Akamai and feeding same to server where you are running you NetConnect().

Thanks,

SJ

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 19, 2014 Feb 19, 2014

Copy link to clipboard

Copied

LATEST

This is possible using multipoint publishing mechanism provided by Adobe.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines