Skip to main content
Participating Frequently
February 4, 2013
Answered

FMS: Live Audio Streaming Statistics

  • February 4, 2013
  • 1 reply
  • 1432 views

Hello All,

I needed some help with FMS 4.5 for live audio streaming.

I needed the stream statistics for the audio Bytes per Second.

(This is to be used for showing the activity level to the user in flash.)

This is my hierarchy in FMS:

Application=>Instance

Each instance will have multiple streams.

FMS server does not seem to have any way to get the stream statistics (byte/second).

Please help.

Thanks,

Karan

This topic has been closed for replies.
Correct answer

Hi Chandan

I really appreciate all your help. Thanks

So i could try to use the mic activity level at the speaker's end.

I could then try to send/broadcast this mic activity level to the FMS into a new stream(text stream). Then this text information could be sent/pushed to all the subscribed clients.

This way the cleints would come to know the activity level of all the speakers.

Please suggest if this is the best way? Or any other approach.

Thanks alot.

Karan



You can use NetStream.send() method which sends a message on a published stream to all subscribing clients. Also, you can use Timer class in which you can specify a handler under which call send() method. In this way it will keep sending the activity level after every specified delay.

Also, you can check following link for more details about these classes:

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html#send()

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/utils/Timer.html

1 reply

Participating Frequently
February 6, 2013

Hi Everyone,

These have been my approaches(without much success):

1. Use FMS admin HTTP api's to get this stats.(There is a 5 second delay) 

2. Use flex client side code to connect to all the netstreams and extract info object.(too much bandwidth to play so many streams just for stats) 

3. Create a server side adobe air application that run every second as a back end process. Connect with fms and get the netstream data for all channels and put it into a string and publish back to FMS.(issues to make it run as a background process in linux)

 

4. Write all the code in FMS server itself to extract statistics.(i could not find server side methods in stream and netstream for statistics.

Really need help on this. Thanks alot...

Karan

February 7, 2013

Hi,

There is no AdminAPI which will directly provide the data transfer rate for a given stream. You can do it by parsing access log and adding up the "stream bytes transferred from server to client" for a given stream in certain fixed duration.

For more details about the fields present in access log, you can see Logger.xml in the conf directory of AMS root installation folder.

Participating Frequently
February 7, 2013

Hi Chandan,

Thanks for replying and the information.

My application is such:

1) A person speaks into the mike(via flash) and transmits the audio stream to FMS.

2) This live audio stream is broadcasted to all the listeners/cleint.

I needed to show the audio activity level of the speaker. This activity level will be shown to the client/listener.

So i guess that would mean that the speaker's byte stream needs to be added and not the cleints byte stream?

Can i do any FMS server side coding for this?

Please suggest,

Thanks alot,

Jaskaran