Hi, 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. According to design documentation, the above pipeline should work and even preroll: http://cgit.freedesktop.org/gstreamer/gstreamer/tree/docs/design/part-latency.txt#n167 However, gst-launch handles the pipeline purely as a live source and skips prerolling. That happens also in an application that constructs the same pipeline. Any idea what should be changed? Thanks a lot in advance! BR, Henrik -- Henrik Hedberg - http://www.henrikhedberg.net/ ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
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? BR, Henrik -- Henrik Hedberg - http://www.henrikhedberg.net/ ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
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. If you don't need synchronization between the playback and the capture, you can set slave-method=none on the sink or the source. Wim > > BR, > > Henrik > ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
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/ ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |