如何使用 Flash Media Server 测试本地主机上的流媒体带宽?

发布于 2024-10-11 22:01:26 字数 274 浏览 7 评论 0 原文

我正在尝试在客户端调试我的动作脚本(AS3)代码,该代码与本地主机上的 Flash Media Server 4 一起使用。到目前为止一切似乎都很好。

但是,当我尝试使用其他远程流媒体服务器测试我的播放器时,我注意到由于服务器和播放器之间的带宽传输较低而出现错误。

有没有一种简单的方法可以在本地主机上使用 FMS4 模拟较低带宽?

  • 通过配置、application.xml 等?
  • 通过编程(main.asc)?
  • 两个都 ?

I'm trying to debbug my actionscript (AS3) code on Client side 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, etc.?
  • by programmation (main.asc) ?
  • both ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

神经大条 2024-10-18 22:01:26

如果您想跳出框框思考,可以使用 NetLimiter 等应用程序。只需为特定应用程序创建一个过滤器,您就可以将带宽限制到您想要的任何速度(低至字节)。

编辑

此外,通过一些简短的谷歌搜索,我能够找到client.setBandwidthLimitBandwidthCap

还有一篇关于配置限制带宽的文章(如果有帮助的话)。

If you want to think a little outside of the box, you could use an application such as NetLimiter. Just make a filter for the specific application and you can throttle the bandwidth to whatever speed you'd like (down to bytes).

EDIT

Also, with some brief googling, I was able to find client.setBandwidthLimit and BandwidthCap in the Application.xml file.

There's also an article on Configuring Limiting Bandwidth (if that helps).

趁微风不噪 2024-10-18 22:01:26

根据这篇文章“配置限制带宽”(请参阅​​上面的链接 - 感谢 Brad Christie),我选择使用服务器端 ActionScript (SSAS) 方式。我认为更简单。

好吧,这是我所做的步骤:

  1. 创建一个文件“main.asc”并复制并复制它。粘贴下面的代码。

    更多信息:http://www.peachpit.com/articles/article .aspx?p=31217

    main.asc

    var 带宽;
    application.allowDebug = true;
    
    // 应用回调函数
    
    application.onConnect = 函数(客户端,用户){
    
        //12800 = 100Kbps  
        //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
    
        带宽=64000;
    
        client.setBandwidthLimit(带宽, 带宽); 
    
        Trace("clientToServer = " + client.getBandwidthLimit(0) + " serverToClient="+ client.getBandwidthLimit(1));
    
        application.acceptConnection(客户端);
    
        跟踪(“17月测试”);
    }
    
  2. 将文件保存在FMS的applications目录下的文件夹下

    示例:FMS\application\dyn

  3. 启动 FMS 服务器。如果有问题,检查日志文件

    示例:FMS\logs_defaultVHost_\dyn_definst_\application.00.log

  4. (可选)更改测试的可变带宽值。我在评论中添加了一些以字节为单位转换的常见互联网连接速度。

In accordance with this article "Configuring Limiting Bandwidth" (see link above - thank Brad Christie) i choose to go with Server-Side ActionScript (SSAS) way. More simple, i think.

Well, here the step what i did :

  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("17 janvier TEST");
    }
    
  2. Save the file under the folder underneath FMS's applications directory

    Example : FMS\application\dyn

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

    Example : FMS\logs_defaultVHost_\dyn_definst_\application.00.log

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文