pulseaudio and adder stream latency

Stefan Sauer ensonic at hora-obscura.de
Fri Feb 14 10:19:08 CET 2014


On 02/12/2014 09:17 PM, lsmithso at hare.demon.co.uk wrote:
> It occurred to me that if the delay is in the pulseaudio stream, then
> there's nothing that gstreamer can do about it. For example, if the
> mic stream input is near instantaneous, but the output monitor stream
> has a 2 second delay,  then as far as gstreamer is concerned the
> streams are in sync.
>
> Is that plausible?
Sure, but you were saying that the lag increases and that would suggest
a bad slaving and after some time you should see warnings where one
strep is dropping to catch up.
If the lag is fixed, you can probably compensate with the offset
property on the pads (not sure how well that works with live sources).

Stefan
>
>
>
> Stefan Sauer writes:
>  > On 02/09/2014 05:38 PM, lsmithso at hare.demon.co.uk wrote:
>  > > Can you give me some idea how I might debug this? What should I look
>  > > for in the debug output?
>  > I'd grep for 'clock' and then master/slave/select. Also check if there
>  > is anything in the WARNING level.
>  > You could also try setting provide-clock=false to force a system clock
>  > (timer) and see if that's any better (if it is as bad as before then te
>  > audioclock is good, but slaving does not work as it should).
>  > 
>  > Stefan
>  > 
>  > >
>  > >
>  > > Stefan Sauer writes:
>  > >  > On 02/02/2014 05:42 PM, lsmithso at hare.demon.co.uk wrote:
>  > >  > > Hi: I'm using gstreamer 0.10.  liveadder made no difference at all. I
>  > >  > >  tried all kinds of combinations of the clock-source, do-timestamp and
>  > >  > >  latency properties , but it made no difference.  I don't really
>  > >  > >  understand the clocking stuff, so this wasn't very scientific.
>  > >  > The interesting properties are "provide-clock" and "slave-method". To
>  > >  > debug this one would need to figure which elements (sink, src1, src2)
>  > >  > provides the clock and why the others don't sync to that properly.
>  > >  > 
>  > >  > >
>  > >  > >
>  > >  > > I also tried mixing both streams on to themselves. It wasn't perfectly
>  > >  > > in sync, butt it wasn't bad, and it certainly didn't drift by
>  > >  > > seconds.
>  > >  > >
>  > >  > > I tried swapping devices around, but I got the following error.
>  > >  > >
>  > >  > > ERROR: from element /GstPipeline:pipeline0/GstAudioConvert:audioconvert0: not negotiated
>  > >  > > Additional debug info:
>  > >  > > gstbasetransform.c(2525): gst_base_transform_handle_buffer (): /GstPipeline:pipeline0/GstAudioConvert:audioconvert0:
>  > >  > > not negotiated
>  > >  > Ideally you use a "audioconvert ! audio/x-raw, ..." after both sources
>  > >  > to ensure you have the same format. adder does not convert.
>  > >  > 
>  > >  > Stefan
>  > >  > >
>  > >  > > Is there a clue there. Recording works if the  1st element device is
>  > >  > > the output monitor, and the second is the mic. The above error happens
>  > >  > > when the 1st element is the mic and the 2nd the  output monitor.
>  > >  > >
>  > >  > > Stefan Sauer 
>  > >  > >  > On 01/31/2014 09:49 AM, lsmithso at hare.demon.co.uk wrote:
>  > >  > >  > >
>  > >  > >  > > Hi:
>  > >  > >  > >
>  > >  > >  > > I'm trying to record headphone output and mic input  simultaneously to
>  > >  > >  > > a single file, using pulseaudio streams and the adder plugin.
>  > >  > >  > >
>  > >  > >  > > The problem is that the recording of the sink rapidly lags behind the
>  > >  > >  > > source, eventually by several seconds. The result is that the
>  > >  > >  > > headphone and mic recording are completely out of sync.
>  > >  > >  > >
>  > >  > >  > > Any idea of what causes this and how to fix it? Here's the pipeline:
>  > >  > >  > >  
>  > >  > >  > >
>  > >  > >  > >
>  > >  > >  > > gst-launch -q -e pulsesrc device=2 ! adder name=mix ! audioconvert ! vorbisenc ! oggmux  ! filesink location=r.ogg pulsesrc device=3 ! mix.
>  > >  > >  > >
>  > >  > >  > >
>  > >  > >  > Hi,
>  > >  > >  > is this with gst-0.10 or 1.X? Btw. it is not latency that your are
>  > >  > >  > seeing, sounds more like clock drift perhaps. I wonder which of both
>  > >  > >  > sources is providing the clock. Can you swap device=2/3 and retry?
>  > >  > >  > 
>  > >  > >  > Stefan
>  > >  > >  > _______________________________________________
>  > >  > >  > gstreamer-devel mailing list
>  > >  > >  > gstreamer-devel at lists.freedesktop.org
>  > >  > >  > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>  > >  > >
>  > >  > 
>  > >  > _______________________________________________
>  > >  > gstreamer-devel mailing list
>  > >  > gstreamer-devel at lists.freedesktop.org
>  > >  > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>  > >
>  > 
>  > _______________________________________________
>  > gstreamer-devel mailing list
>  > gstreamer-devel at lists.freedesktop.org
>  > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>



More information about the gstreamer-devel mailing list