Skip to main content
Participant
November 18, 2009
Question

How to merge multiple live audio streams into a single stream in FMS?

  • November 18, 2009
  • 1 reply
  • 1227 views

I need to merge multiple live audio streams into a single stream so that i can pass this stream as input to VOIP through a softphone.

For this i tried the following approach:

Created a new stream (str1) on FMS onAppStart and recorded the live streams (sent throgh microphone) in that new stream.

Below is the code :

application.onAppStart = function()

{

application.myStream=Stream.get("foo");           

application.myStream.record();

}

application.onPublish = function (client,stream)

{

      var streamName = stream.name;

     application.myStream.play(streamName,-2,-1};
}

The problem is that the Stream.play plays only 1 live stream at a time.As soon as a the 2nd live stream is sent to FMS then Stream.play stops playing the previous live stream.So,only the latest live stream is getting recorded.Whereas i need to record all the live streams in the new stream simultaneously.

Any pointers regarding this are welcome.

Thanks

    This topic has been closed for replies.

    1 reply

    calmchessplayer
    Inspiring
    November 18, 2009

    well i tried this once for one of my scripts and the final conclusion is its not possible to combine two streams into 1.....how would you time/encode the two voices......there is no know solution to this in flash. If you continue on despite me and find a solution please post it so we can explain to rest of world.