Skip to main content
Inspiring
January 13, 2011
Answered

How to test streaming bandwidth on localhost with Flash Media Server ?

  • January 13, 2011
  • 1 reply
  • 1775 views

Hello,
   
I'm trying to debbug my code on Client side (Action Script 3) that works with Flash Media Server 4 on localhost. Everything seems fine up to that point.
   
However, when I'm trying to test my player with other remote streaming servers, I notice bugs because of lower bandwith transmission between the server and the player.
   
Is there a simple way to simulate lower bandwith with FMS4 on localhost (by config, application.xml, programmation...) ?

Thanks

Seb Ethier

    This topic has been closed for replies.
    Correct answer Shiraz Anwar

    Have you tried using Client.setBandwidthLimit() API available in SSAS?? It may probably help you with what you want to do.

    Beside that you can use NetLimiter or shunra kind of utlitiy to choke BW on client-side.

    Hope that will help.

    1 reply

    Shiraz AnwarCorrect answer
    Participating Frequently
    January 14, 2011

    Have you tried using Client.setBandwidthLimit() API available in SSAS?? It may probably help you with what you want to do.

    Beside that you can use NetLimiter or shunra kind of utlitiy to choke BW on client-side.

    Hope that will help.

    ethierseAuthor
    Inspiring
    January 17, 2011

    Thank you zarihs Rawna

    Indeed, i have been with Server-Side ActionScript (SSAS) way. it's more simple, i think.

    Well, here the step what i did :

    Step 1 :

    Make a file "main.asc" et copy & paste the code below.

    - more info : http://www.peachpit.com/articles/article.aspx?p=31217

          *main.asc*

        var bandwidth;

        application.allowDebug = true;

        // Application callback functions

        application.onConnect = function(client, user) {

            //12800 = 100 Kbps   

            //64000 = 500 Kbps

            //131072 = 1Mbps

            //327680 = 2.5 Mbps

            //983040 = 7.5 Mbps

            //1966080 = 15 Mbps

            //3932160 = 30 Mbps

            //6553600 = 50 Mbps

            //15728640 = 120 Mbps

            bandwidth = 64000;

            client.setBandwidthLimit(bandwidth, bandwidth);

            trace("clientToServer = " + client.getBandwidthLimit(0) +  " serverToClient="+  client.getBandwidthLimit(1));

            application.acceptConnection(client);       

            trace("TEST");

        }

    Step 2 : Save the file under the folder underneath FMS's applications directory

    http://www.peachpit.com/content/images/chap11_0735713332/elementLinks/11fig01.jpg

    Example : FMS\application\dyn

    More info : http://www.flashcomguru.com/articles/fms2_basics.cfm

    Step 3: Start the FMS server. If there is a problem, check the log file

    Example : FMS\logs\_defaultVHost_\dyn\_definst_\application.00.log

    Step 4 : (optional) Change the value of the variable bandwidth for your test. I put in comment some common internet connection speed converted in bytes.

    That's all,

    regards,

    sethier