all groups > macromedia flash flashcom > may 2007 >
You're in the

macromedia flash flashcom

group:

Synchronization of Multiple Audio Streams


Synchronization of Multiple Audio Streams Cyberdog2007
5/6/2007 3:43:34 PM
macromedia flash flashcom:
Hi,

I'm trying to synchronize several Audio streams during playback and recording.
Several questions I have and not sure if actually feasible or how to best
address :
1/ When playing back 2 audio streams, how can I ensure the playback is full
synchronized (<20ms difference) when client receives the 2 streams in playback
? Basically trying to simulate a mix-down with 2 // streaming. Ultimately
wants to achieve this with about 5 audio streams playing back and can't accept
tolerate delay. I suspect I need to synchronize the start of each stream so
that they all start together, but not been very succesfull so far.
Alternatively is there a way to mix-down 2 streams on server and send back a 1
mixed-down audio stream ?

2/ More tricky I believe : If I playback 1 audio stream and start recording a
separate audio stream, I'm getting again desynchronised. Later If I replay the
1 audio and the newly recorded one, both are not anymore aligned. I suspect
(but not sure that the delay and desynchronization is introduced during the
recording but not sure and reason I asked first question...

If someone knows those answers or could provide some direction of work.... I
would greatly appreciate.

Thanks
Re: Synchronization of Multiple Audio Streams JayCharles
5/6/2007 4:33:01 PM
When it comes to FMS streams, there really is no way of accurately syncronizing
streams. Since you can't keep data in buffer when pausing the stream, and you
have to rebuffer any time you seek, it's impossible.

The only way I've been able to sync flv's is using progressive download. With
progressive, you can sync streams, but the accuracy is limited to the keyframe
interval of the flv files. For example, if you have 2 keyframes per second, you
can achieve sync with 1 second accuracy. with 4 keyframes per second, you can
get the offset down to 500ms. If you make every frame a keyframe (makes for a
huge file), you can get frame accurate sync.

The theory is to build a class that monitors the time and buffer length
properties of your two streams, pausing and/or seeking when needed to maintain
sync.

AddThis Social Bookmark Button