[gst-devel] Pipeline with live and non-live sources and sinks
Henrik Hedberg
henrik.hedberg at innologies.fi
Wed Sep 15 21:37:16 CEST 2010
On 14.09.2010 16:50, Wim Taymans wrote:
> On Tue, 2010-09-14 at 16:41 +0300, Henrik Hedberg wrote:
>> On 14.09.2010 13:02, Henrik Hedberg wrote:
>>
>>> We have a problem constructing a pipeline with live and non-live sources
>>> and sinks. The following pipeline results audible scratches or "jumps"
>>> during playback:
>>>
>>> gst-launch-0.10 filesrc location=/tmp/test.mp3 ! decodebin !
>>> audioconvert ! autoaudiosink autoaudiosrc ! audioconvert ! wavenc !
>>> filesink location=/tmp/recording.wav
>>>
>>> It may be buffer under-run or latency issue. It does not happen every
>>> time but usually and it occurs especially at the beginning of the
>>> stream. The recorded wav is perfect.
>>
>> I have tested the same pipeline with different versions of
>> GStreamer. It seems that 0.10.21 and 0.10.23 were working as expected,
>> but this problem (bug?) appears in 0.10.25 and 0.0.28. Does anybody have
>> an idea, what has been changed between 0.10.23 and 0.10.25 related to
>> this issue?
>
> It's because the sink has to slave its clock to the pipeline clock,
> which is the one provided by the source. Usually you get little glitches
> when the clocks try to match rates and or when resync happens because
> the clocks drift too much.
Thank you for your answer. It was something I was thinking myself
too. However, the same pipeline used to work decently before 0.10.25 (or
0.10.24), so the situation has gone worse recently.
> If you don't need synchronization between the playback and the
> capture, you can set slave-method=none on the sink or the source.
Unfortunately that is not possible, because we are implementing a
karaoke-like application (for children :). Any idea, what other
parameters could be fine-tuned to achieve better behavior? I already
tried different buffering and latency values as well as forced the
pipeline to use the sink clock. The result was either missing
synchronization or no significant improvement.
Actually, we are using PulseAudio, so the minimized pipeline is:
gst-launch-0.10 filesrc location=/tmp/test.mp3 ! decodebin! pulsesink
pulsesrc ! wavenc ! filesink location=/tmp/recording.wav
Is it possible that PulseAudio is affecting here somehow?
BR,
Henrik
--
Henrik Hedberg - http://www.henrikhedberg.net/
More information about the gstreamer-devel
mailing list