GNOME Bugzilla – Bug 310859
Gstreamer/alsa-sink sounds wierd
Last modified: 2006-07-14 13:38:50 UTC
Play a song using an arbitray gstreamer-application.
Ooops, forgot all the info: When playing a song using an arbitray gstreamer-app it sounds like an echo-effect is applied: The song is played in 2-3 overlays with 1/4 seconds apart. Playing the song directly with alsaplayer works just fine. I use debian/sid. $ dpkg -l | grep gstr | cut -d " " -f 1-20 ii gstreamer-alsa 0.6.4-5.1 ii gstreamer-audiofile 0.6.4-5.1 rc gstreamer-flac 0.6.4-5.1 ii gstreamer-gconf 0.6.4-5.1 ii gstreamer-gnomevfs 0.6.4-5.1 ii gstreamer-mad 0.6.4-5.1 ii gstreamer-misc 0.6.4-5.1 ii gstreamer-oss 0.6.4-5.1 ii gstreamer-plugin-apps 0.6.4-5.1 ii gstreamer-plugin-libs 0.6.4-5.1 ii gstreamer-plugin-libs-dev 0.6.4-5.1 ii gstreamer-tools 0.6.4-1.1 ii gstreamer-vorbis 0.6.4-5.1 ii gstreamer0.8-a52dec 0.8.10-1 ii gstreamer0.8-aa 0.8.10-1 ii gstreamer0.8-alsa 0.8.10-1 ii gstreamer0.8-artsd 0.8.10-1 ii gstreamer0.8-audiofile 0.8.10-1 ii gstreamer0.8-caca 0.8.10-1 ii gstreamer0.8-cdparanoia 0.8.10-1 ii gstreamer0.8-dv 0.8.10-1 ii gstreamer0.8-dvd 0.8.10-1 ii gstreamer0.8-esd 0.8.10-1 ii gstreamer0.8-faad 0.8.8-0.2 ii gstreamer0.8-festival 0.8.10-1 ii gstreamer0.8-flac 0.8.10-1 ii gstreamer0.8-gnomevfs 0.8.10-1 ii gstreamer0.8-gsm 0.8.10-1 ii gstreamer0.8-hermes 0.8.10-1 ii gstreamer0.8-jack 0.8.10-1 ii gstreamer0.8-jpeg 0.8.10-1 ii gstreamer0.8-mad 0.8.10-1 ii gstreamer0.8-mikmod 0.8.10-1 ii gstreamer0.8-misc 0.8.10-1 ii gstreamer0.8-mpeg2dec 0.8.10-1 ii gstreamer0.8-musepack 0.8.10-1 ii gstreamer0.8-oss 0.8.10-1 ii gstreamer0.8-plugin-apps 0.8.10-1 ii gstreamer0.8-plugins 0.8.10-1 ii gstreamer0.8-sdl 0.8.10-1 ii gstreamer0.8-sid 0.8.10-1 ii gstreamer0.8-speex 0.8.10-1 ii gstreamer0.8-swfdec 0.8.10-1 ii gstreamer0.8-theora 0.8.10-1 ii gstreamer0.8-tools 0.8.10-2 ii gstreamer0.8-vorbis 0.8.10-1 ii gstreamer0.8-x 0.8.10-1 ii libgstreamer-gconf0.8-0 0.8.10-1 ii libgstreamer-plugins0.8-0 0.8.10-1 ii libgstreamer-plugins0.8-dev 0.8.10-1 ii libgstreamer0.6-0 0.6.4-1.1 ii libgstreamer0.8-0 0.8.10-2 ii libgstreamer0.8-dev 0.8.10-2 $ dpkg -l | grep alsa | cut -d " " -f 1-25 ii alsa-base 1.0.9b-2 ii alsa-oss 1.0.9-1 ii alsa-utils 1.0.9a-3 ii alsaplayer 0.99.76-0.3 ii alsaplayer-alsa 0.99.76-6 ii alsaplayer-common 0.99.76-6 ii alsaplayer-gtk 0.99.76-6 ii alsaplayer-oss 0.99.76-6 rc alsaplayer-text 0.99.76-0.3 ii gnome-alsamixer 0.9.6-1 ii gstreamer-alsa 0.6.4-5.1 ii gstreamer0.8-alsa 0.8.10-1 ii libbio2jack0 0.7-0.1 ii libpt-plugins-alsa 1.8.4-1
Did you enable dmix? Does it work without?
Yes, dmix is enabled. But when I disable dmix it still doesn't work. Same symptoms (the echo-effect).
What sound card do you have? Does it happen with every song? Also, run this command: gst-launch-0.8 sinesrc ! alsasink Does it produce a sine tone? (Confirmation from another debian user would be nice..)
I have an Audiophile 2496 sound card. The problem occurs with every song, yes. -And also when I press "Test" in gstreamer-properties. The command you wrote produces a sine tone, but with the same disturbance as described above. Notice, that it worked fine for a couple of weeks ago - but after an "apt-get upgrade" the error came (maybe it came together with the change from gnome2.8 to 2.10?) Also, the sound is error-free when playing with e.g. alsaplayer. It's only when the sound comes through gstreamer there is a problem, so I guess it indicates that it indeed is gstreamer that causes the wierd sound.
Does it get better if you manually specify a period-size? gst-launch-0.8 sinesrc ! alsasink period-size=8192
Yes, with a period size of 2048 or 1024 the click/echo-sound in the sine tune disappears. How can I try that out on an mp3 file? And how can I configure a permanent period size of 1024 or 2048?
Start 'gstreamer-properties' from the commandline, and as audio sink, select 'Custom' and type 'alsasink period-size=1024'. From then on, RB/Totem will use that new sink.
OK, I've just done that and the sine test tone now sounds perfect in gstreamer-properties. But for some reason the problems with juk/amarok/any-gstreamer-mp3-player is still there - unaffected. Quite strange actually.
KDE apps don't use GNOME preferences. ;). In AmaroK, preferences, you can select an audiosink, same method applies there. Don't know for juk, though.
OK - amarok has a "parameters" field in which I can type the options you described above. But some considerations: 1) Amarok performs really poor now (guess it have something to do with the period size): Even the smallest load disturbs the music. 2) Why is it up to the applications to read the gstreamer config? Shouldn't it be something gstreamer took care of itself? Wouldn't it be more optimal if applications could just make use the "secret black box" called gstreamer that just works - instead of letting the app's all reimplement this fundamental functionallity? 3) I still think it's wierd that the upgrade spoiled the working setup. -And we haven't really found the reason for that yet. :-)
2; yes, that'd be lovely. It'd even be more lovely if alsa would actually allow that to happen. It doesn't. Welcome to ALSA hell.
See also Ubuntu bug <a href="http://bugzilla.ubuntu.com/show_bug.cgi?id=11486">#11486</a> A temporary solution is to downgrade the ALSA plugin to version 0.8.8something
I also have very audible clicks usually with a random period of about 2-3 seconds (i.e. 2-3 seconds of music, then a click, then 2-3 seconds of music etc.) when using alsasink. It happens also with the sinesrc through the above command-line. Playback with ogg123 using its alsa backend works fine. I'm on Debian unstable with version 0.8.10 of gstreamer-alsa. The sound card is a SIS integrated laptop one. Setting period-size to a lower value decreases the period of the clicks, whereas a larger value increases the period.
I tried setting the alsasink buffer-size=24756 (3 * 8192) as hinted in another bug. This made the clicks go away as far as I can tell.
btw, I'm running into this on Juk now, and came across this bug. Having wrestled with Juk and Gstreamer before, here's a useful snippet -- how to change its sink. In ~/.kde/share/config/jukrc just add: [GStreamerPlayer] SinkName=alsasink guess what though -- arguments to the sink aren't permitted :(
*** Bug 314948 has been marked as a duplicate of this bug. ***
I'm experiencing this on my Audiophile 2496.
Does this still happen with the latest gst-plugins 0.8 CVS ? Alternately does it work for you with gstreamer 0.10?
Ping on everybody that had this problem. Can anyone reproduce with the latest alsasink from 0.8? Some patches fixed problems for a lot of people. Also I would like testing with 0.8, por favor :-)
0.8.11 has the same problem, if that's what you are referring to? Else do you have a tarball available somewhere? I don't know what to fetch from the CVS repository.
Ubuntu bug comment: "Ow, is this bug still open? I haven't had any stuttering for months now. I guess it was fixed in 0.10. Yes, I have version 0.10.4-1ubuntu1 here, from Dapper." - I think it's safe to close the bug.
thanks, closing now, not going to bother with 0.8.x anymore.