audio crackling when playing low frequencies

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

audio crackling when playing low frequencies

wellington wallace
Hi,

When running the command:

gst-launch-1.0 audiotestsrc freq=40 ! pulsesink

I can hear the test signal but also lots of crackling. When using higher frequencies(above 100Hz or 200Hz) I do not hear any crackling. Replacing pulsesink with alsasink does not change the problem. Is there a test I can do to know if this problem is in Gstreamer or Pulseaudio?

Best regards,

                 Wellington

--
Prof.° Wellington Wallace Miguel Melo

CEFET/RJ Uned Nova Iguaçu


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: audio crackling when playing low frequencies

Arjen Veenhuizen
I ran the same command but did not hear any crackling. Isn't it more likely that this is because of your speaker set-up? Did you try a decent pair of headphones?
Reply | Threaded
Open this post in threaded view
|

Re: audio crackling when playing low frequencies

wellington wallace
Hi,

I can hear the crackling with headphones and with the speakers a mini system (LG cms4330f). I have also tested different sound cards (alc887 and audigy rx sb1550). The crackling remains there. 

On Fri, Jun 9, 2017 at 12:38 PM, Arjen Veenhuizen <[hidden email]> wrote:
I ran the same command but did not hear any crackling. Isn't it more likely
that this is because of your speaker set-up? Did you try a decent pair of
headphones?



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/audio-crackling-when-playing-low-frequencies-tp4683276p4683277.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



--
Prof.° Wellington Wallace Miguel Melo

CEFET/RJ Uned Nova Iguaçu


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: audio crackling when playing low frequencies

Nicolas Dufresne-5
In reply to this post by wellington wallace
Le vendredi 09 juin 2017 à 12:45 -0300, wellington wallace a écrit :
> Hi,
>
> When running the command:
>
> gst-launch-1.0 audiotestsrc freq=40 ! pulsesink

I also can't reproduce at 40. Cracking can be heard starting at freq=8
and lower for me.

>
> I can hear the test signal but also lots of crackling. When using
> higher frequencies(above 100Hz or 200Hz) I do not hear any crackling.
> Replacing pulsesink with alsasink does not change the problem. Is
> there a test I can do to know if this problem is in Gstreamer or
> Pulseaudio?

Note that to really test against alsasink, you need to set the device
property to avoid the default, which is likely going through pulseaudio
on most system. On my Intel SoC, I use this to compare:

  alsasink device=sysdefault:CARD=PCH

Though, it makes no difference. I have done further test, I have
recorder the test stream into a wav and use aplay to play it back.
Result would show the same crackling. That least two option, the wave
generator might be broken, or it's driver/alsa issue. The fact it's
better for certain users might indicate that different version of the
driver are handling this better (the generator code in GStreamer
haven't changed for years).

  gst-launch-1.0 -e audiotestsrc freq=8 is-live=1 ! wavenc ! filesink location=test.wav
  aplay test.wav -D sysdefault:CARD=PCH

Maybe you should share the kernel verison your are running this on. I'm
running Fedora kernel 4.11.3 and AlsaLib version 1.1.1.

regards,
Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: audio crackling when playing low frequencies

wellington wallace
Hi, thanks for your help. I am using kernel 4.11.3 and alsalib 1.1.4 in Arch Linux. Your suggestion to use a filesink was helpful. I did not think about that. There is no crackling in the file. Gstreamer is ok.

After trying many reboots I observed that the crackling starts after the system has been on for some time.  I had ruled out hardware issues as changing soundcards did not solve the problem but after a careful look at the systemd logs I found out that my usb memory card reader was driving the kernel crazy periodically adding and removing storage devices that did not exist. As bizarre as it may sound removing the usb reader has taken away the crackling. I know that in other to notify the user gnome creates/removes sink inputs in pulseaudio whenever a storage device is added/removed. Maybe this was interfering  with pulseaudio in an unexpected way.

Thanks again for your time,

                     Wellington


On Fri, Jun 9, 2017 at 1:41 PM, Nicolas Dufresne <[hidden email]> wrote:
Le vendredi 09 juin 2017 à 12:45 -0300, wellington wallace a écrit :
> Hi,
>
> When running the command:
>
> gst-launch-1.0 audiotestsrc freq=40 ! pulsesink

I also can't reproduce at 40. Cracking can be heard starting at freq=8
and lower for me.

>
> I can hear the test signal but also lots of crackling. When using
> higher frequencies(above 100Hz or 200Hz) I do not hear any crackling.
> Replacing pulsesink with alsasink does not change the problem. Is
> there a test I can do to know if this problem is in Gstreamer or
> Pulseaudio?

Note that to really test against alsasink, you need to set the device
property to avoid the default, which is likely going through pulseaudio
on most system. On my Intel SoC, I use this to compare:

  alsasink device=sysdefault:CARD=PCH

Though, it makes no difference. I have done further test, I have
recorder the test stream into a wav and use aplay to play it back.
Result would show the same crackling. That least two option, the wave
generator might be broken, or it's driver/alsa issue. The fact it's
better for certain users might indicate that different version of the
driver are handling this better (the generator code in GStreamer
haven't changed for years).

  gst-launch-1.0 -e audiotestsrc freq=8 is-live=1 ! wavenc ! filesink location=test.wav
  aplay test.wav -D sysdefault:CARD=PCH

Maybe you should share the kernel verison your are running this on. I'm
running Fedora kernel 4.11.3 and AlsaLib version 1.1.1.

regards,
Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




--
Prof.° Wellington Wallace Miguel Melo

CEFET/RJ Uned Nova Iguaçu


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel