Skip to main content
niteshkumar
Inspiring
September 16, 2010
Answered

Proxy server issue with rtmpt(Very Urgent)

  • September 16, 2010
  • 2 replies
  • 8767 views

Hi,

In my netwrok rtmp is not supported,so i am not able to make rtmp connection.

I tried with rtmpt(ports 80,443)and able to get connected and publish the live stream to FMS(using AS3).

But with in 5 to 6 minutes my proxy server block the streaming.Reason,my proxy can allow only 600 http request per minute from a particular computer(client machine),but while publishing through rtmpt after  some time http post request coming form client machine increase the limit of 600 per minute,so proxy block the connection.

I am making my connection like this "rtmpt://xx.yy.zz.kk:80/Training" where xx.yy.zz.kk represent internet IP.

Please suggest some turnaround so that in case of rtmpt(http tunelling) http post request will not increase periodically.

Regards

Nitesh kumar

    This topic has been closed for replies.
    Correct answer niteshkumar

    The problem got resolved by using connecting FMS using rtmps with port 443.

    2 replies

    New Participant
    October 8, 2010

    Which version of FMS are you using?

    niteshkumar
    Inspiring
    October 8, 2010

    Hi,

        we have checked for FMS developer 3.5 and 4.0 both

    Thanks

    niteshkumar
    niteshkumarAuthorCorrect answer
    Inspiring
    May 29, 2013

    The problem got resolved by using connecting FMS using rtmps with port 443.

    Adobe Employee
    September 16, 2010

    I don't think there is any possible workaround to get around this problem because traditionally publish is done via rtmp. But what i want to understand from you that whether you are saying that every minute http request keeps on increasing, i mean it can be case that when publish stops for that minute it crosses 600 request limit. I mean if its keeps on increasing for every minute then its real issue which i dont think might be the case - but do let me know

    niteshkumar
    Inspiring
    September 17, 2010

    Hi SE,

        Thanx for reply. I want to say that when I publish video to the server. The request message is more than 600 per minute for every minutes, which lead to block of http request by the ISA. I think I must be doing some mistake, which leads to such problem. There should be one request for the connection and then for every data frame there should be continuation of that but it should not be new request. I calculated when I publish the video using wireshark is around 15-24 request per second. I have compared the request count with one of the application "openmeeting" which is also using rtmp connection but in our proxy it fails to make connection. Then it tries to make connection using rtmpt and get connected. In this case the request is only ones in a second to our proxy which leads to freely flow of video to the server.

    I'm trying to give the architecture of my server and api used to publish the video below.

    Architecture:

    Tomacat server at port 8080 on same PC with FMS at port 80,1935.

    Code snippet to publish at client side is:

    serverIP = "rtmpt://59.162.23.65:80/live";

    private function onNetStatus(event:NetStatusEvent):void

    {

         switch (event.info.code)

         {

              case "NetConnection.Connect.Success" :

                   publishCamera(camName,micIndex);

                   break;

         }

    }

    private function publishCamera(camName:String,micIndex:int):void
      {
       m_cam=Camera.getCamera(camName);
       switch(m_resolution)
       {
        case "160x120" : m_cam.setMode(160,120,15);
         break;
        case "320x240" : m_cam.setMode(320,240,15);
         break;
        case "640x480" : m_cam.setMode(640,480,15);
         break;
        default      : m_cam.setMode(320,240,15);
         break;
       }
       m_cam.setQuality(0,85);
       if(micIndex != -1)
       {
        m_mic=Microphone.getMicrophone();
        m_mic.codec = SoundCodec.SPEEX;
        m_mic.setUseEchoSuppression(true);   
        m_mic.setLoopBack(false);
        m_mic.setSilenceLevel(20);
        m_ns.attachAudio(m_mic);   
       }  
       m_ns.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
       m_ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, onAsyncError);
       m_ns.attachCamera(m_cam);
       m_ns.publish(m_publishName, "live");
      }

    code snippet at server side is:

    application.onConnect = function(myClient,Publisher)
    {
        clientObj = myClient;
          if(streamObj != null)
      {
       trace("streamObj: " + streamObj.name);
       trace("clientObj: " + clientObj);
       if(streamObj.name == clientObj)
       {
        trace("streamObj == clientObj");
       }
       else
       {
       trace("streamObj != clientObj");
       }
      }
      else
      {
       trace("streamObj is null");
      }
    this.so.setProperty(myClient.name, myClient);
    trace(clientObj + "connected with IP: " + clientObj.ip);
        trace(Publisher + " get connected");
        return true;
    }

    application.onPublish = function(myClient,myStream)
    {
    trace("Live Publish began");
    streamObj = myStream;
    }

    Please help.

    Thanx

    Participating Frequently
    September 19, 2010

    The difference with rtmp vs. rtmpt is that rtmpt being over http is a request-response model.  In order for FMS to send any data to the client, we need to have an http request to piggy back the data on an http response.  As such, the client sends "idle" http requests to the server even when it has no data to send in order for the server to have a request it can piggy back a response on if it needs to send data to the client.  These idle requests are sent very often so the server doesn't have to wait long to be able to send (possibly urgent) data to the client.