Inconsistent/variable delay between USB and onboard alsasrc

Charlie Laub charleslaub at sbcglobal.net
Wed Jul 21 16:41:57 UTC 2021


Have you looked at the alsasrc properties "actual-buffer-time" and
"actual-latency-time" and attempted to set the property "buffer-time"? 



-----Original Message-----
From: gstreamer-devel <gstreamer-devel-bounces at lists.freedesktop.org> On
Behalf Of Michiel Konstapel via gstreamer-devel
Sent: Wednesday, July 21, 2021 10:59 AM
To: gstreamer-devel at lists.freedesktop.org
Cc: Michiel Konstapel <michiel at aanmelder.nl>
Subject: Inconsistent/variable delay between USB and onboard alsasrc

I am recording audio from two alsasrc elements: an analog line input from
the onboard sound card, and a USB audio device (USB microphone). I need the
recordings to be synchronized, so playing them back together doesn't produce
a nasty "tiled bathroom" sound. I expected the different sources to have
different internal delays, which I can adjust for with a probe that adjusts
the buffer timestamp.

However, there seems to be no consistency in the time difference: in one
run, the analog input is 3 ms behind the USB audio, the next time it's
44 ms, then it's 20 ms... I measured this by placing the microphones side by
side, producing a clap or tick and comparing the tracks in Audacity.

I've tried
- always choosing the onboard card as the clock source
- choosing neither and using the system clock
- all the options for alsasrc slave-method except "none"

How should I set things up so the sources are reliably synchronized?

Kind regards,
Michiel
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list