[Red5] Is there any bandwidth detection function built in red5 ?

Daniel Rossi electroteque at gmail.com
Thu Sep 10 01:26:31 PDT 2009


Ive implemented it here aswell which includes dynamic stream switching  
for FMS

http://flowplayer.org/plugins/streaming/bwcheck.html

On 10/09/2009, at 6:13 PM, gate at kishta wrote:

> Thanks Daniel,
> I tried this configuration:
>
> 		private var _serverURL:String="localhost";
> 		private var _serverApplication:String="bwcheck";
> 		private var
> _clientServerService:String="bwCheckService.onClientBWCheck";
> 		private var
> _serverClientService:String="bwCheckService.onServerClientBWCheck";
>
> with the following as files loaded:  BandwidthDetectionApp.as
> ServerClientBandwidth.as    ClientServerBandwidth.as  
> BandwidthDetection.as
> BandwidthDetectEvent.as
>
> but I`m getting in the compiler:
>
> Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095:
> flash.net.NetConnection was unable to invoke callback onBWCheck.
> error=ReferenceError: Error #1069: Property onBWCheck not found on
> BandwidthDetectionApp and there is no default value.
> 	at BandwidthDetectionApp/connect()
> 	at BandwidthDetectionApp/frame1()
> Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095:
> flash.net.NetConnection was unable to invoke callback onBWDone.
> error=ArgumentError: Error #1063: Argument count mismatch on
> ServerClientBandwidth/onBWDone(). Expected 1, got 4.
> 	at BandwidthDetectionApp/connect()
> 	at BandwidthDetectionApp/frame1()
>
> and in the txtLog:
>
> NetConnection.Connect.Success
> Detecting Server Client Bandwidth
>
> count: undefined sent: undefined timePassed: undefined latency:  
> undefined
> cumLatency: undefined
> Detection failed with error:
> org.red5.server.service.ServiceNotFoundException Service not found:
> bwCheckService
> count: undefined sent: undefined timePassed: undefined latency:  
> undefined
> cumLatency: undefined
> count: undefined sent: undefined timePassed: undefined latency:  
> undefined
> cumLatency: undefined
>
>
> -----Original Message-----
> From: red5-bounces at osflash.org [mailto:red5-bounces at osflash.org] On  
> Behalf
> Of Daniel Rossi
> Sent: Thursday, September 10, 2009 7:21 AM
> To: red5 at osflash.org
> Subject: Re: [Red5] I there any bandwidth detection function built  
> in red5 ?
>
> http://code.google.com/p/red5/source/browse/java/example/trunk/bwcheck/www/W
> EB-INF/red5-web.xml
>
> <bean id="bwCheckService.service"
> class="org.red5.demos.bwcheck.BandwidthDetection" />
>
> This should be loaded ?
>
> Service methods are here
>
> clientServerService = "bwCheckService.onClientBWCheck";
>  serverClientService = "bwCheckService.onServerClientBWCheck";
>
>
> On 10/09/2009, at 9:18 AM, gate at kishta wrote:
>
>> Sorry for being so thick. This is how they look now in my
>> BandwidthDetectionApp:
>> 		private var _serverURL:String="localhost";
>> 		private var _serverApplication:String="bwcheck"; // if I
>> leave that blank I get no connection
>> 		private var _clientServerService:String="";
>> 		private var _serverClientService:String="";
>> but I don`t get the thing with services and it throws me errors
>> about it:
>> that`s what I get in the log after calling the connect() method on
>> BandwidthDetectionApp:
>> NetConnection.Connect.Success
>> Detecting Server Client Bandwidth
>>
>> count: undefined sent: undefined timePassed: undefined latency:
>> undefined
>> cumLatency: undefined
>> Detection failed with error:
>> org.red5.server.service.ServiceNotFoundException Service not found:
>> bwCheckService
>> count: undefined sent: undefined timePassed: undefined latency:
>> undefined
>> cumLatency: undefined
>>
>> About the stream quality control you mentioned Nicolay, your first
>> guess is
>> accurate, I have few different version of FLV on demand, both in
>> bitrate and
>> frame size that I`ll be serving according to bandwidth, nevertheless
>> I keep
>> discovering new stuff here and my plans may therefore change by the
>> time I`m
>> at the end of it. If you still have anything in mind (which MY mind
>> can
>> decipher, and as you can see I`m not too fast...) I`d like to know.
>> Thanks.
>>
>> -----Original Message-----
>> From: red5-bounces at osflash.org [mailto:red5-bounces at osflash.org] On
>> Behalf
>> Of Nicolay Vizovitin
>> Sent: Wednesday, September 09, 2009 10:59 PM
>> To: red5 at osflash.org
>> Subject: Re: [Red5] I there any bandwidth detection function built
>> in red5 ?
>>
>> Everything is really there.
>>
>> Quick code inspection gives a usage of these values - as method name
>> argument to nc.call(). If you're interested in how these values are
>> initialized, here's the appropriate code fragment:
>>
> http://code.google.com/p/red5/source/browse/flash/trunk/bwcheck/src/bwcheck
>> .
>> mxml#14
>>
>> May I ask, how are you planning to do the actual stream quality
>> control? I.e. am I right that you have a set of preencoded variants  
>> of
>> the same video, one of which is streamed to a client (depending on  
>> his
>> bandwidth)? Or maybe you're planning something more complex (if so it
>> would be interesting to hear it out)?
>>
>> On 9/10/09, gate at kishta <gate at kishta.org.il> wrote:
>>> O.K. I`ve got all classes set up locally nicely without compiler
>>> errors:
>>> BandwidthDetectionApp.as
>>> ServerClientBandwidth.as
>>> ClientServerBandwidth.as
>>> BandwidthDetection.as
>>> BandwidthDetectEvent.as
>>>
>>> And a FLA that instantiates BandwidthDetectionApp.as (or uses it  
>>> as a
>>> Document class as you`ve suggested, Nicolay)
>>>
>>> But I can`t figure out 2 variables in BandwidthDetectionApp.as
>>>
>>> 		private var _clientServerService:String="";
>>> 		private var _serverClientService:String="";
>>>
>>
> http://code.google.com/p/red5/source/browse/flash/trunk/bwcheck/src/org/red5
>>> /flash/bwcheck/app/BandwidthDetectionApp.as#84
>>>
>>> No matter if I feed their values here or in their assigning
>>> functions:
>>> serverApplication()  and clientServerService()( also within
>>> BandwidthDetectionApp.as)
>>> I`m clueless as to what values should they hold. What names should
>>> I feed
>> in
>>> there ?
>>>
>>>
>>>
>>> _______________________________________________
>>> Red5 mailing list
>>> Red5 at osflash.org
>>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>>
>>
>>
>> --Best regards,
>> Nicolay
>>
>> _______________________________________________
>> Red5 mailing list
>> Red5 at osflash.org
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>
>> __________ Information from ESET Smart Security, version of virus
>> signature
>> database 4109 (20090527) __________
>>
>> The message was checked by ESET Smart Security.
>>
>> http://www.eset.com
>>
>>
>>
>>
>> _______________________________________________
>> Red5 mailing list
>> Red5 at osflash.org
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
> __________ Information from ESET Smart Security, version of virus  
> signature
> database 4109 (20090527) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
>
>
> __________ Information from ESET Smart Security, version of virus  
> signature
> database 4109 (20090527) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org
> http://osflash.org/mailman/listinfo/red5_osflash.org




More information about the Red5 mailing list