[Red5] Streaming buffer / sync issues
Jase
jason at hybd.net
Thu Aug 6 09:10:08 PDT 2009
On Thu, 2009-08-06 at 08:40 -0700, Andy Shaules wrote:
> Using a silence time out hurts if you want audio sync over long term
I'm not using anything like that at the moment (I plan to use do
something similar with LiquidSoap and feed the input back with JACK to
my publisher. Being totally isolated it should have virtually no impact
as far as I see)
> Also know that if it is from a cheap device, that crappy hardware drivers
> will drift over time no matter what you do, excepting wrapped inside another
> wdm driver with correct math.
It's a M-Audio Delta 1010, so it's a bit better than your average cheap on board crap.
I'm using Linux, so non of this WDM BS for me. The M-Audio is pretty
solid under Linux when used under JACK/Pulseaudio
I find I have drift irrespective of silence or not (i.e. constant
music). I'm sure if I query Flash, it will report NetStream#bufferLength
is growing over time :-S
Jase
> ----- Original Message -----
> From: "Jase" <jason at hybd.net>
> To: <red5 at osflash.org>
> Sent: Thursday, August 06, 2009 4:53 AM
> Subject: Re: [Red5] Streaming buffer / sync issues
>
>
> > When you say better, how much drift are you getting?
> >
> > I have a similar issue as our feed is silent for a large chunks of time
> > due it being voice based
> >
> > Jase
> >
> > On Thu, 2009-08-06 at 01:35 -0700, Wesley Hather wrote:
> >> We downgraded to Red5 r3671 and are getting better results with RTMP
> >> streaming (less delay).
> >>
> >> On Wed, Aug 5, 2009 at 12:20 AM, Wesley Hather <whather at gmail.com>
> >> wrote:
> >> Note that I'm also deployed on a large ec2 instance with the
> >> JVM getting -Xms1024m and -Xmx7680m, so memory is not an
> >> issue.
> >>
> >>
> >>
> >> On Wed, Aug 5, 2009 at 12:13 AM, Wesley Hather
> >> <whather at gmail.com> wrote:
> >> I have the default silence level set at 5 so it
> >> doesn't get triggered often.
> >>
> >>
> >> I've looked everywhere to try and find the optimal
> >> red5 settings for live, real-time conferencing
> >> (minimal delay) and there's surprisingly not too much
> >> out there. Here are some of the settings I'm currently
> >> using and let me know if there is anything I should be
> >> changing:
> >>
> >> RTMP settings:
> >> rtmp.host=0.0.0.0
> >> rtmp.port=1935
> >> rtmp.event_threads_core=16
> >> rtmp.event_threads_max=64
> >> # event threads queue: -1 unbounded, 0 direct (no
> >> queue), n bounded queue
> >> rtmp.event_threads_queue=0
> >> rtmp.event_threads_keepalive=60
> >> rtmp.send_buffer_size=271360
> >> rtmp.receive_buffer_size=65536
> >> rtmp.ping_interval=5000
> >> rtmp.max_inactivity=60000
> >> rtmp.tcp_nodelay=true
> >> rtmp.max_handshake_timeout=10000
> >>
> >>
> >> Flash NetStream settings:
> >> netStream.bufferTime = 0; // This should decrease
> >> delay
> >>
> >>
> >> Flash Microphone settings:
> >> mic.rate = 22;
> >> mic.setUseEchoSuppression(true);
> >>
> >>
> >> Flash Camera settings:
> >> camera.setMode(320, 240, 10);
> >> camera.setQuality(16384, 0);
> >> camera.setKeyFrameInterval(48);
> >>
> >>
> >> Note that setting the bufferTime to anything greater
> >> than zero (0.1) causes a gradual delay over time,
> >> reaching > 10-20 seconds sometimes. This usually
> >> happens when there is a hiccup in the audio/video or a
> >> user mutes their microphone. Is there any obvious
> >> setting I'm missing here for us to get better
> >> performance?
> >>
> >>
> >> I'm not using any special encoder. I've read some
> >> posts about integrating Flash Media Encoder with Red5,
> >> is this what a lot of people end up doing?
> >>
> >>
> >> Thanks,
> >> Wes
> >>
> >>
> >>
> >> On Tue, Aug 4, 2009 at 10:53 PM, Andy Shaules
> >> <bowljoman at hotmail.com> wrote:
> >> I cant seem to reproduce the problem on my
> >> end.
> >>
> >> Are you using a silence timeout?
> >>
> >> I tried both fme and plugin encoder and it
> >> seems locked-in rock-solid.
> >>
> >>
> >> ----- Original Message -----
> >> From: Wesley Hather
> >> To: red5 at osflash.org
> >>
> >> Sent: Tuesday, August 04, 2009 1:48 PM
> >> Subject: Re: [Red5] Streaming buffer /
> >> sync issues
> >>
> >>
> >> I get the same behavior on the
> >> traditional flash player. Setting the
> >> NetStream bufferTime (on both the
> >> sender and receiver) to anything other
> >> than zero causes a horrible drift
> >> after a while. You would think it
> >> would drop frames to get back to
> >> normal. Using a bufferTime of zero
> >> also has its faults as the buffer can
> >> sometimes grow infinitely.
> >>
> >>
> >> Does anyone have a solution for this?
> >> Is there a server-side fix? I need
> >> minimal delay for my conferencing app.
> >> I'm using Red5 version 0.9.0.167.
> >>
> >>
> >> Thanks,
> >> Wes
> >>
> >> On Tue, Aug 4, 2009 at 10:19 AM, Jase
> >> <jason at hybd.net> wrote:
> >> OK, I'll see if I can see what
> >> I can find. I seem to recall
> >> most clients
> >> I try seem to have this issue,
> >> including the publisher demo
> >> included in
> >> red5.
> >>
> >> Jase
> >>
> >>
> >> On Tue, 2009-08-04 at 09:47
> >> -0700, Andy Shaules wrote:
> >> > It does matter which client
> >> you use.
> >> >
> >> > I have a feeling that flow
> >> player is growing your buffer
> >> on either
> >> > inSufficientBandwidth event
> >> or Buffer full.
> >> >
> >> > I bet there is a setting to
> >> stop that behavior.
> >> >
> >> >
> >> >
> >> > ----- Original Message -----
> >> > From: "Jase"
> >> <jason at hybd.net>
> >> > To: <red5 at osflash.org>
> >> > Sent: Tuesday, August 04,
> >> 2009 9:16 AM
> >> > Subject: Re: [Red5]
> >> Streaming buffer / sync issues
> >> >
> >> >
> >> > > *bump*
> >> > >
> >> > > Any have any ideas or
> >> possible leads for me to look
> >> at here?
> >> > >
> >> > > Jase
> >> > >
> >> > > On Fri, 2009-07-31 at
> >> 02:38 +0100, Jase wrote:
> >> > >> I'm trying to stream some
> >> live audio using Flash/RTMP.
> >> The live aspect
> >> > >> of this is very
> >> important.
> >> > >>
> >> > >> I have a really annoying
> >> issue. When I set a bufferSize
> >> when streaming
> >> > >> to something over a
> >> second, the audio buffers and
> >> therefore sounds OK.
> >> > >> However over time it
> >> drifts, and instead of the
> >> delay being the intended
> >> > >> 1 second, it drifts to
> >> about 10 seconds which is not
> >> acceptable for the
> >> > >> type of project I'm
> >> doing. I guess this is due to
> >> small differences in
> >> > >> clock signal /
> >> timekeeping.
> >> > >>
> >> > >> If I set the buffer to
> >> less than a second, I have no
> >> buffer, which is
> >> > >> bad as the audio
> >> stutters, because of the
> >> nature of packets arriving at
> >> > >> slightly different times
> >> (each packet should hold 20ms
> >> of audio but
> >> > >> because packets don't
> >> arrive exactly 20ms apart, a
> >> > >> skewing/jitter/stutter
> >> effect is noticeable).
> >> > >>
> >> > >> Obviously I need a small
> >> buffer of about 300ms-1000ms
> >> to prevent
> >> > >> jittering. Is there any
> >> way I can ensure the buffer
> >> says at a fixed
> >> > >> 1000ms (or shorter
> >> ideally) without it drifting?
> >> > >>
> >> > >> I'm using FlowPlayer as
> >> my client, but I assume it
> >> doesn't matter as all
> >> > >> Flash streaming uses the
> >> NetConnection/NetStream API.
> >> I've currently
> >> > >> using AMD64 Ubuntu. I'm
> >> using oflaDemo as my test app
> >> for now.
> >> > >>
> >> > >> Cheers
> >> > >> Jase.
> >> > >>
> >> > >>
> >> > >>
> >>
> >> _______________________________________________
> >> > >> Red5 mailing list
> >> > >> Red5 at osflash.org
> >> > >>
> >>
> >> http://osflash.org/mailman/listinfo/red5_osflash.org
> >> > >
> >> > >
> >> > >
> >>
> >> _______________________________________________
> >> > > Red5 mailing list
> >> > > Red5 at osflash.org
> >> > >
> >>
> >> http://osflash.org/mailman/listinfo/red5_osflash.org
> >> > >
> >> >
> >> >
> >> >
> >>
> >> _______________________________________________
> >> > Red5 mailing list
> >> > Red5 at osflash.org
> >> >
> >>
> >> http://osflash.org/mailman/listinfo/red5_osflash.org
> >>
> >>
> >>
> >> _______________________________________________
> >> Red5 mailing list
> >> Red5 at osflash.org
> >>
> >> http://osflash.org/mailman/listinfo/red5_osflash.org
> >>
> >>
> >>
> >>
> >> ______________________________________
> >>
> >> _______________________________________________
> >> Red5 mailing list
> >> Red5 at osflash.org
> >>
> >> http://osflash.org/mailman/listinfo/red5_osflash.org
> >>
> >>
> >>
> >> _______________________________________________
> >> Red5 mailing list
> >> Red5 at osflash.org
> >>
> >> http://osflash.org/mailman/listinfo/red5_osflash.org
> >>
> >>
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> Red5 mailing list
> >> Red5 at osflash.org
> >> http://osflash.org/mailman/listinfo/red5_osflash.org
> >
> >
> > _______________________________________________
> > Red5 mailing list
> > Red5 at osflash.org
> > http://osflash.org/mailman/listinfo/red5_osflash.org
> >
>
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org
> http://osflash.org/mailman/listinfo/red5_osflash.org
More information about the Red5
mailing list