[Red5] Stream Record Delay
Andy Shaules
bowljoman at hotmail.com
Sun Oct 25 19:14:48 PST 2009
I assume, because of local audio subsytem internal buffers, by the time you here the mp3, the netstream has already started publishing for a couple milliseconds.
my first guess.
----- Original Message -----
From: Manuele Cappelleri
To: red5 at osflash.org
Sent: Sunday, October 25, 2009 5:08 PM
Subject: [Red5] Stream Record Delay
Hello all and thank you for your great job.
I'm facing a little problem here...
I developed a very simple application (basically sql authentication + streamsecurity) which only purpose is RECORD incoming streams.
The thing works fine, and I have no problems with the audio/video quality (so far).
The big issue is about delay.
For the tests, in flash, I'm playing an imported mp3 at the same time when I start ns.publish(). The local sound device is set to "record" the wave out channel, so basically I'm streaming the same sound that exits from my speakers in a loop back style.
[flash code]
mybase = new song();
soundChannel = mybase.play();
ns.publish("test", "record");
[/flash code]
Given that, I assume that the stream.publish() starts right along with the song... or actually a few (1~2 ms) later.
What I expect is the saved stream on the server to be almost identical to the mp3 song.
Instead, the created flv is timeshifted. And the time is varying.
For example: if the mp3 has a "TIC SOUND" after 2 seconds... in the FLV the "TIC SOUND" is after 2.7 seconds. It looks like Red5 does not start recording from the very first frames...
I've tryed compensating this with the latency between the client and the server. But this doesn't really helped enough. There's certainly something to do with net delay, but not in a straight way, and compensating that is getting tedious...
So I need to clear out a few issues:
- assuming there's no delay in the Java application, does Red5 record the stream as soon as it arrives? I mean, the very first video/audio frame?
- if yes, how would the latency affect the recording? I mean: given latency is 500ms, should the server start receiving frames 500ms after they were sent? This should be transparent ... all frames should just arrive with a little delay and nothing more
- if no, when is the first frame saved? Based on what kind of rules?
Thank you for your help.
Version: 0.8 running on Linux / Java 1.5
--
Manuele Cappelleri
------------------------------------------------------------------------------
_______________________________________________
Red5 mailing list
Red5 at osflash.org
http://osflash.org/mailman/listinfo/red5_osflash.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/red5_osflash.org/attachments/20091025/8670091d/attachment.html>
More information about the Red5
mailing list