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

Push-stream stability problem

New Here ,
Nov 04, 2012 Nov 04, 2012

Copy link to clipboard

Copied

I have created the client-server application to switch streams and republish them as single continious stream to the remote server. I republish additional stream (myStream) by NetStream.publish() methode In the server-side script (main.asc).
This is fragment of the long script:



nc = new NetConnection();

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

ns = new NetStream(nc);

ns.onStatus = function(info) {

trace("Stream Status: " + info.code)

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

trace("The stream is now publishing");

}

}

ns.setBufferTime(2);

ns.attach(myStream);

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

Unfortunately, republishing push-stream "livestream" vanishes soon in some minute after start.

Is it possible to make push stream more stable one?

Are there any methodes?


Views

862

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
Nov 04, 2012 Nov 04, 2012

Copy link to clipboard

Copied

I will investigate and get back to you.

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
Nov 04, 2012 Nov 04, 2012

Copy link to clipboard

Copied

I used the follwoing server side code.

test1 application has the following main.asc and test2 is a blank application.

test1 - main.asc

application.onConnect = function(clientObj){

          trace("application.onConnect");

          application.acceptConnection(clientObj);

}

application.onPublish = function(clientObj,streamObj){

          trace("application.onPublish");

          nc = new NetConnection();

          nc.onStatus = function ( obj ){

                    trace("NC : >>>>> "+obj.code);

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

                              ns = new NetStream(nc);

                              ns.attach(streamObj);

                              ns.onStatus = function(statusObj){

                                        trace("NS : >>>>> "+statusObj.code);

                              }

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

                    }

          }

          nc.connect("rtmp://localhost/test2");

}

> I published a stream named "livestream" to test1. It republished to "test2" with stream name "livestream".

> I played back the "livestream" from "test2" application.

> After a while I stopped publishing to test1 and the playback stopped from "test2".

> When I did republish ( i.e started publishing again with same stream name ) to "test1", "test2" playback resumed.

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
New Here ,
Nov 05, 2012 Nov 05, 2012

Copy link to clipboard

Copied

I did it too, but my push-stream disappear on the romote server in some minutes after start without any messages in my local server logs.
Is there any diagnostics and stable republishing mode for this case?

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 ,
Nov 05, 2012 Nov 05, 2012

Copy link to clipboard

Copied

In your second application - you can have handlers application.onPublish() and application.onUnpublish() defined and put some trace statements - this will help you identify if stream is getting unpublished at second application because of some reason. In addition - you can onConnect handlers too so that you can see if application is getting disconnect or something.

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
New Here ,
Nov 21, 2012 Nov 21, 2012

Copy link to clipboard

Copied

LATEST

I've got the same problem.

Any sollution??

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