audio/video out of sync

Robert Armstrong orangerobot at gmail.com
Fri Jan 29 10:55:33 PST 2016


Tim -

It's version 1.6.2. I was finally able to get rid of the delay by removing
the queue in the audio portion of the pipeline however, I do now get a
single message like this:

WARNING: from element /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: Can't
record audio fast enough
Additional debug info:
gstaudiobasesrc.c(866): gst_audio_base_src_create ():
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0:
Dropped 33957 samples. This is most likely because downstream can't keep up
and is consuming samples too slowly.

An unrelated question, when I begin the stream (which is native H.264 from
the camera), there are heavy artifacts and blocking. After about a second
it clears up as the frame refreshes.

Is there a way to eliminate this issue through gstreamer? Or is this
specific to my camera?

On Thu, Jan 28, 2016 at 2:15 AM, <
gstreamer-devel-request at lists.freedesktop.org> wrote:

>
> Date: Thu, 28 Jan 2016 10:06:32 +0000
> From: Tim Müller <tim at centricular.com>
> To: gstreamer-devel at lists.freedesktop.org
> Subject: Re: audio/video out of sync
> Message-ID: <1453975592.8177.9.camel at centricular.com>
> Content-Type: text/plain; charset="UTF-8"
>
> On Wed, 2016-01-27 at 16:32 -0800, Robert Armstrong wrote:
>
> Hi,
>
> > The audio is about half a second behind with this pipeline. I've
> > tried removing and adding queues in various places but nothing seems
> > to resolve it.
> >
> > gst-launch-1.0 -e v4l2src device=/dev/video1 do-timestamp=true !
> > queue ! video/x-h264,width=1280,height=720,framerate=30/1 ! h264parse
> > ! queue ! mux.video_0 alsasrc device="plughw:2,0" ! audioconvert !
> > lamemp3enc ! queue ! mux. mp4mux name=mux ! filesink sync=true
> > location=camera.mp4
> >
> > What else can I do to fix it?
>
> Which version of GStreamer is this with?
>
> Pipeline looks fine in principle. You shouldn't need the do-
> timestamp=true on v4l2src.
>
> Is the video in sync if you capture video/x-raw from the camera and
> then encode it with x264enc tune=zerolatency ?
>
> How far off is it? And is it a constant offset or does it increase over
> time?
>
> I suspect perhaps there's an encoding delay inside the device if the
> camera outputs H264 that's not taken into account.
>
> You could also try a different audio encoder such as voaacenc, I seem
> to remember an issue where lamemp3enc would timestamp things wrongly
> over time (but it's unlikely you're using a version that old I think,
> it was fixed in 1.2).
>
> Cheers
>  -Tim
> --
> Tim Müller, Centricular Ltd - http://www.centricular.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160129/025b90af/attachment.html>


More information about the gstreamer-devel mailing list