Groups | Blog | Home
all groups > macromedia flash flashcom > september 2006 >

macromedia flash flashcom : Playback of streaming flv(s) AND mp3(s) in sync?


Jonas N
9/23/2006 1:52:46 PM
Hi!

I want to find out if it's possible to create a client flash app that allows
* playback of one or several audio channels (mp3s)
* playback one or several video channels (flvs)

These media channels should be played back in sync with each other, so that
the audio channels can contain sound synchronized to the video channel(s)
I want to use streaming media because of the higher security-level (not
storing the any temp media on the client computer)

Can this be done using the combination of Flash8 and Flash Media Server?

Any ideas or point of views are welcome!

Regards / Jonas Nyström

Jonas N
9/23/2006 2:08:32 PM
One more point:

I realize it can be a problem starting playback when not all media files are downloaded. For me, that's not a problem - I can wait...

JayCharles
9/23/2006 2:53:35 PM
I'm afraid that sync-ing FMS streams isn't really a possibility. There are a
number of factors at play here, the primary ones being how the Flashplayer
buffers streams, and the response time of the server.

The (seeming) simple approach would be to monitior the buffer status of each
stream, and pause all streams when the buffer of one of them is empty. The
problem is that when you pause an FMS stream, the buffer empties. Let's
consider the following:

Stream A is an FMS flv stream
Stream B is an FMS mp3 stream

During playback, the buffer in stream A runs out, so your monitoring function
pauses stream B. As soon as that happens, the buffer for stream B empties, so
now stream A has to pause. When stream A is pause, its buffer empties, so now
stream B has to pause again... and the cycle continues.

We also have to consider that we can't be sure how long it will take for FMS
to respond to the play command for any one stream, so we will likely be out of
sync from the get-go.



Jonas N
9/24/2006 5:54:41 PM
Thank you very much, Jay!

What happens don't allow playback until all the streams are fully loaded?
If so, is there a way to be sure of playback synchronization?
(Of course I lose "core advantage" of streaming, but at least my media files
are protected...)

Jonas
JayCharles
9/24/2006 8:14:39 PM
The thing to understand about FMS streams is that there is no such thing as
"fully loaded". The data is discarded as soon as it is played, or in the case
of buffered data, as soon as the stream is paused, stopped, or seeked. There is
no way to preload an FMS stream, short of setting the buffer time to the total
length of the stream.

In the end, I don't belive there is any way to sync FMS streams accurately.
AddThis Social Bookmark Button