vlc/gnome-sound-recorder sound has glitchs

Bug #295519 reported by Fernando Miguel on 2008-11-08
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
alsa-lib (Ubuntu)
Undecided
Unassigned
gnome-media (Ubuntu)
Undecided
Unassigned
pulseaudio (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: vlc

On my system, ever since VLC was upgraded, sound wont work as it is supposed! I only ear bits of glichs....

$ apt-cache show vlc
Package: vlc
Priority: optional
Section: multiverse/graphics
Installed-Size: 3684
Maintainer: Ubuntu MOTU Developers <email address hidden>
Original-Maintainer: Debian multimedia packages maintainers <email address hidden>
Architecture: amd64
Version: 0.9.4-1ubuntu3

$ vlc *.avi
VLC media player 0.9.4 Grishenko
[00000001] main libvlc debug: VLC media player - version 0.9.4 Grishenko - (c) 1996-2008 the VideoLAN team
[00000001] main libvlc debug: libvlc was configured with ./configure '--build=x86_64-linux-gnu' '--enable-maintaner-mode' '--enable-release' '--prefix=/usr' '--enable-libtool' '--enable-fast-install' '--with-binary-version=1ubuntu3' '--disable-update-check' '--disable-gnome' '--disable-gtk' '--disable-familiar' '--disable-fb' '--enable-ggi' '--enable-sdl' '--enable-esd' '--enable-mad' '--enable-arts' '--enable-jack' '--enable-pulse' '--enable-lirc' '--enable-a52' '--enable-aa' '--enable-dvbpsi' '--enable-mozilla' '--with-mozilla-pkg=libxul-plugin' '--disable-kde' '--enable-mp4' '--enable-dvb' '--disable-satellite' '--enable-ogg' '--enable-vorbis' '--enable-shout' '--enable-qt4' '--disable-slp' '--enable-flac' '--disable-skins' '--disable-basic-skins' '--enable-skins2' '--enable-freetype' '--enable-mkv' '--enable-speex' '--enable-caca' '--enable-live555' '--enable-libmpeg2' '--enable-fribidi' '--enable-cdio' '--enable-mod' '--enable-theora' '--enable-modplug' '--enable-dvdnav' '--enable-gnutls' '--enable-ffmpeg' '--enable-ncurses' '--enable-smb' '--disable-gnomevfs' '--enable-bonjour' '--enable-mpc' '--enable-vcd' '--enable-vcdx' '--enable-notify' '--enable-twolame' '--enable-x264' '--enable-faad' '--disable-zvbi' '--enable-telx' '--enable-mediacontrol-bindings' '--disable-atmo' '--enable-taglib' '--enable-libass' '--enable-libdca' '--enable-alsa' '--enable-dv' '--enable-v4l' '--enable-v4l2' '--enable-pvr' '--enable-svgalib' '--enable-dvd' '--without-dvdcss' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2' 'LDFLAGS=-Wl,--as-needed' 'CPPFLAGS=' 'CXXFLAGS=-g -O2'
[00000001] main libvlc debug: translation test: code is "C"
[00000001] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::begin: Paint device returned engine == 0, type: 1
[00000446] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)

I noticed that gnome-sound-recorder suffers from the same audio problem.
You get one good sec of audio then noise, the static, then audio, and so on.

$ apt-cache show gnome-media
Package: gnome-media
Priority: optional
Section: gnome
Installed-Size: 316
Maintainer: Ubuntu Desktop Team <email address hidden>
Original-Maintainer: Marco Cabizza <email address hidden>
Architecture: amd64
Version: 2.24.0.1-0ubuntu1

Pedro Villavicencio (pedro) wrote :

not gnome-media if you get the same with vlc

Pedro i notice a similar behaviour on gnome-sound-recorder, and that app is packaged on gnome-media, hence the package.

Some other apps like audacity work without these glichs (although audacity cant playback, but thats another bug)

Bowmore (bowmore) wrote :

I confirm this problem.

It's present when the pulseaudio process is running in the background. If I kill it (killall pulseaudio) then vlc audio is playing ok too. If I restart the pulseaudio process (e.g through Alt-F2) the glitches/distorsion returns.

Checking e.g the system login sound under System > Preferences > Sound is destorted as well. But some or more clicks on the arrow sometimes give a complete or almost complete sound. This to me indicate that sort of a priority, sync or buffer problem could be the cause. Vlc first tries to synchronize but after a few seconds it starts to throw away what comes in with no sound at all as a result.

I've tested Totem, Rhytmbox and MPlayer which plays ok.

Magnus S (magnuss) wrote :

Hi!
Is this happening in Intrepid only? On up-2-date system too?

@ BUGabundo and Bowmore:
If you run vlc in verbose mode, "vlc -v2", perhaps we can get more information about this. Run in a maximized terminal and reproduce, copy->paste the output into a text file and attach to this report.

Thanks
//magnus

Changed in vlc:
status: New → Incomplete
Download full text (41.8 KiB)

$ vlc -v2 V.divx
VLC media player 0.9.4 Grishenko
[00000001] main libvlc debug: VLC media player - version 0.9.4 Grishenko - (c) 1996-2008 the VideoLAN team
[00000001] main libvlc debug: libvlc was configured with ./configure '--build=x86_64-linux-gnu' '--enable-maintaner-mode' '--enable-release' '--prefix=/usr' '--enable-libtool' '--enable-fast-install' '--with-binary-version=1ubuntu3' '--disable-update-check' '--disable-gnome' '--disable-gtk' '--disable-familiar' '--disable-fb' '--enable-ggi' '--enable-sdl' '--enable-esd' '--enable-mad' '--enable-arts' '--enable-jack' '--enable-pulse' '--enable-lirc' '--enable-a52' '--enable-aa' '--enable-dvbpsi' '--enable-mozilla' '--with-mozilla-pkg=libxul-plugin' '--disable-kde' '--enable-mp4' '--enable-dvb' '--disable-satellite' '--enable-ogg' '--enable-vorbis' '--enable-shout' '--enable-qt4' '--disable-slp' '--enable-flac' '--disable-skins' '--disable-basic-skins' '--enable-skins2' '--enable-freetype' '--enable-mkv' '--enable-speex' '--enable-caca' '--enable-live555' '--enable-libmpeg2' '--enable-fribidi' '--enable-cdio' '--enable-mod' '--enable-theora' '--enable-modplug' '--enable-dvdnav' '--enable-gnutls' '--enable-ffmpeg' '--enable-ncurses' '--enable-smb' '--disable-gnomevfs' '--enable-bonjour' '--enable-mpc' '--enable-vcd' '--enable-vcdx' '--enable-notify' '--enable-twolame' '--enable-x264' '--enable-faad' '--disable-zvbi' '--enable-telx' '--enable-mediacontrol-bindings' '--disable-atmo' '--enable-taglib' '--enable-libass' '--enable-libdca' '--enable-alsa' '--enable-dv' '--enable-v4l' '--enable-v4l2' '--enable-pvr' '--enable-svgalib' '--enable-dvd' '--without-dvdcss' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2' 'LDFLAGS=-Wl,--as-needed' 'CPPFLAGS=' 'CXXFLAGS=-g -O2'
[00000001] main libvlc debug: translation test: code is "C"
[00000001] main libvlc debug: checking builtin modules
[00000001] main libvlc debug: checking plugin modules
[00000001] main libvlc debug: loading plugins cache file /home/bugabundo/.cache/vlc/plugins-04081e.dat
[00000001] main libvlc debug: recursively browsing `/usr/lib/vlc'
[00000001] main libvlc debug: module bank initialized, found 272 modules
[00000001] main libvlc debug: opening config file (/home/bugabundo/.config/vlc/vlcrc)
[00000001] main libvlc debug: CPU has capabilities 486 586 MMX MMXEXT SSE SSE2 FPU
[00000001] main libvlc debug: looking for memcpy module: 3 candidates
[00000001] main libvlc debug: using memcpy module "memcpymmxext"
[00000370] main interaction debug: thread started
[00000370] main interaction debug: thread 1109588304 (Interaction control) created at priority 0 (interface/interaction.c:382)
[00000372] main input debug: Creating an input for 'Media Library'
[00000372] main input debug: Input is a meta file: disabling unneeded options
[00000372] main input debug: `file/xspf-open:///home/bugabundo/.local/share/vlc/ml.xspf' gives access `file' demux `xspf-open' path `/home/bugabundo/.local/share/vlc/ml.xspf'
[00000372] main input debug: creating access 'file' path='/home/bugabundo/.local/share/vlc/ml.xspf'
[00000373] main access debug: looking for access module: 3 candidates
[00000373] access_mmap access debug: opening file /h...

Changed in vlc:
status: Incomplete → New
Bowmore (bowmore) wrote :
Download full text (38.3 KiB)

Yes, it seems to be an audio drift problem acc to the printout.

$ vlc -v2
VLC media player 0.9.4 Grishenko
[00000001] main libvlc debug: VLC media player - version 0.9.4 Grishenko - (c) 1996-2008 the VideoLAN team
[00000001] main libvlc debug: libvlc was configured with ./configure '--build=i486-linux-gnu' '--enable-maintaner-mode' '--enable-release' '--prefix=/usr' '--enable-libtool' '--enable-fast-install' '--with-binary-version=1ubuntu3' '--disable-update-check' '--disable-gnome' '--disable-gtk' '--disable-familiar' '--disable-fb' '--enable-ggi' '--enable-sdl' '--enable-esd' '--enable-mad' '--enable-arts' '--enable-jack' '--enable-pulse' '--enable-lirc' '--enable-a52' '--enable-aa' '--enable-dvbpsi' '--enable-mozilla' '--with-mozilla-pkg=libxul-plugin' '--disable-kde' '--enable-mp4' '--enable-dvb' '--disable-satellite' '--enable-ogg' '--enable-vorbis' '--enable-shout' '--enable-qt4' '--disable-slp' '--enable-flac' '--disable-skins' '--disable-basic-skins' '--enable-skins2' '--enable-freetype' '--enable-mkv' '--enable-speex' '--enable-caca' '--enable-live555' '--enable-libmpeg2' '--enable-fribidi' '--enable-cdio' '--enable-mod' '--enable-theora' '--enable-modplug' '--enable-dvdnav' '--enable-gnutls' '--enable-ffmpeg' '--enable-ncurses' '--enable-smb' '--disable-gnomevfs' '--enable-bonjour' '--enable-mpc' '--enable-vcd' '--enable-vcdx' '--enable-notify' '--enable-twolame' '--enable-x264' '--enable-faad' '--disable-zvbi' '--enable-telx' '--enable-mediacontrol-bindings' '--disable-atmo' '--enable-taglib' '--enable-libass' '--enable-libdca' '--enable-alsa' '--enable-dv' '--enable-v4l' '--enable-v4l2' '--enable-pvr' '--enable-svgalib' '--enable-dvd' '--without-dvdcss' 'build_alias=i486-linux-gnu' 'CFLAGS=-g -O2' 'LDFLAGS=-Wl,--as-needed' 'CPPFLAGS=' 'CXXFLAGS=-g -O2'
[00000001] main libvlc debug: translation test: code is "sv"
[00000001] main libvlc debug: checking builtin modules
[00000001] main libvlc debug: checking plugin modules
[00000001] main libvlc debug: loading plugins cache file /home/rolf/.cache/vlc/plugins-04041e.dat
[00000001] main libvlc debug: recursively browsing `/usr/lib/vlc'
[00000001] main libvlc debug: module bank initialized, found 271 modules
[00000001] main libvlc debug: opening config file (/home/rolf/.config/vlc/vlcrc)
[00000001] main libvlc debug: CPU has capabilities 486 586 MMX MMXEXT SSE SSE2 FPU
[00000001] main libvlc debug: looking for memcpy module: 3 candidates
[00000001] main libvlc debug: using memcpy module "memcpymmxext"
[00000369] main interaction debug: thread 3081833360 (Interaction control) created at priority 0 (interface/interaction.c:382)
[00000369] main interaction debug: thread started
[00000371] main input debug: Creating an input for 'Mediabibliotek'
[00000371] main input debug: Input is a meta file: disabling unneeded options
[00000371] main input debug: `file/xspf-open:///home/rolf/.local/share/vlc/ml.xspf' gives access `file' demux `xspf-open' path `/home/rolf/.local/share/vlc/ml.xspf'
[00000371] main input debug: creating access 'file' path='/home/rolf/.local/share/vlc/ml.xspf'
[00000372] main access debug: looking for access module: 3 candidates
[00000372] access_mmap access debug: openin...

Bowmore (bowmore) wrote :

> Is this happening in Intrepid only? On up-2-date system too?

@ Magnus
No, in my case this happens in Jaunty, fully updated.
Intrepid works fine.

I had the same problem with Intrepid.
On jaunty _sometimes_ with works fine (at least now I can use www.radiobeta.com that makes use of vlc to broadcast audio) but divx movies still dont work.

Magnus S (magnuss) wrote :

BUGabundo has a lot of these lines:
[00000459] alsa audio output debug: recovered from buffer underrun
[00000459] main audio output debug: audio output is starving (29362), playing silence

And Bowmore has lines similar to this:
[00000454] mpgatofixed32 audio output debug: libmad error: bad main_data_begin pointer
[00000454] main audio output warning: output date isn't PTS date, requesting resampling (225098)
[00000454] main audio output warning: audio drift is too big (327378), dropping buffer

I don't know much about sound playback issues, but is this really the same bug?

@ both:
What happens if you play around with the sound settings in vlc? Switch the output type and test if you can find a setting that works.

//magnus

Bowmore (bowmore) wrote :

@ BUGabundo
Is pulseaudio running?
ps -e | grep pulseaudio
I have to kill it to make vlc and www.radiobeta.com work.

I have a clean install of Jaunty alpha1 (not pre-alpha). I've also tested two virtualizations of Jaunty on Virtualbox, one using Intrepid as host and the other Jaunty as host. In neither of them system sound nor VLC sound work. It might be so that the sound problems differs for Jaunty installed via an upgrade from Intrepid. This is a feeling though as I haven't heard any complaints from people doing so.

Olá Bowmore e a todos.

On Friday 28 November 2008 12:07:16 Bowmore wrote:
> @ BUGabundo
> Is pulseaudio running?
> ps -e | grep pulseaudio

$ ps -e | grep pulseaudio
 8460 ? 00:07:09 pulseaudio

--
BUGabundo :o)
(``-_-´´) http://LinuxNoDEI.BUGabundo.net && Ubuntu LoCoTeam Portugal http://ubuntu-pt.org
Linux user #443786 GPG key 1024D/A1784EBB

Olá Magnus e a todos.

On Friday 28 November 2008 12:06:29 Magnus S wrote:
> What happens if you play around with the sound settings in vlc? Switch the output type and test if you can find a setting that works.

Changing to Auto (it was ALSA) seems to make it work. I dont see Pulse support there.
I'll make a few more test to see if VLC still fails on other confs.

Maybe some update from last night fixed this.

I still have to test Gnome-sound-recorder

--
BUGabundo :o)
(``-_-´´) http://LinuxNoDEI.BUGabundo.net && Ubuntu LoCoTeam Portugal http://ubuntu-pt.org
Linux user #443786 GPG key 1024D/A1784EBB

On Friday 28 November 2008 12:28:39 (``-_-´´) -- Fernando wrote:
> I still have to test Gnome-sound-recorder

Tests done to Gnome-sound-recorder using PA as capture system.
So for all intents of this bug, I'm happy to report its fixed.

Now to get that alsa error out of my gnome-sound-properties

--
BUGabundo :o)
(``-_-´´) http://LinuxNoDEI.BUGabundo.net && Ubuntu LoCoTeam Portugal http://ubuntu-pt.org
Linux user #443786 GPG key 1024D/A1784EBB

Bowmore (bowmore) wrote :

Hi again y hola BUGabundo ;-)

I've played around with those VLC settings earier but this time I found that setting the ouput type to EsounD was the only option that works for me. Thus Standard doesn't work.

I think that VLC standard settings should work, i.e option Standard, so maybe VLC is shipped with the wrong stardard choice. Otherwise I only see this change of "output type" as a workaround.

But on the other hand BUGabundo uses Standard choice to make it work which confuses me.

But anyway now it works ;-)

@BUGabundo
Did you make it work in Intrepid or Jaunty using Auto/Standard?

Bowmore (bowmore) wrote :

I've now tested VLC settings for output type in Intrepid too and it works for (did not test them all) Standard, Esound and Alsa. Esounds not that good quality as the other two.

So for Jaunty I still think that there is a bug as at the least Standard should work and some other as well but maybe with slightly different qualities.

Olá Bowmore e a todos.

On Friday 28 November 2008 13:45:54 Bowmore wrote:
> Did you make it work in Intrepid or Jaunty using Auto/Standard?

Jaunty.

One more thing: I dont have vlc-plugin-pulse installed. do you?

--
BUGabundo :o)
(``-_-´´) http://LinuxNoDEI.BUGabundo.net && Ubuntu LoCoTeam Portugal http://ubuntu-pt.org
Linux user #443786 GPG key 1024D/A1784EBB

Bowmore (bowmore) wrote :

Hi BUGabundo
Nope, but when I installed it now I got another VLC option Pulseaudio! Tested it, it played, but with very poor quality, i.e very glitchy.

Also noticed that I had the EsounD plugin vlc-plugin-esd already installed by default! So that's why EsounD happened to work and with much better quality though not fully acceptable.

But as I wrote, PA shall mangage better than so meaning that the best codec (recommended) used when Standard output is set should (must) work with PA. It did in Intrepid, so there's something strange about the new PA version.

I don't know how this works but a native interface (I think it's called) is introduced in Jaunty's version of PA. Futhermore, how much built-in intelligence is there in the pulsesink? Somewhere some part seems not to be able to handle the stream sent by VLC. Is it a priority issue on the pipeline bus or ... Just wish I know.

Daniel T Chen (crimsun) wrote :

Are the symptoms alleviated if you modify /etc/pulse/default.pa to use this line?

load-module module-hal-detect tsched=0

Changed in alsa-lib:
status: New → Invalid
Changed in gnome-media:
status: New → Invalid
Changed in pulseaudio:
status: New → Incomplete
Bowmore (bowmore) wrote :

Thanks Daniel, disabling the timer-based scheduling (tsched=0) fixed it for me!

From a PA perspective I had to manually do
- install vlc-plugin-pulse
- configure VLC sound output to "Pulse audio output"
- disabling the timer-based scheduling (tsched=0)
to get a glitch-free sound

I guess those settings should be the defaults for Ubuntu installations. The last one, adding the fix tsched=0, then only needed until the PA and Alsa driver issue is solved.

Daniel T Chen (crimsun) on 2009-02-14
Changed in pulseaudio:
status: Incomplete → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 0.9.14-0ubuntu6

---------------
pulseaudio (0.9.14-0ubuntu6) jaunty; urgency=low

  * 0004_disable_autospawn.patch: Disable this patch. Doing so
    allows the daemon to spawn if not already running, which
    works around LP: #191027, #204272
  * 0012_clarify_driver_error_redirect_to_alsa_devs.patch:
    - Only log POLL* being set if tsched is used so that syslog
      isn't filled with innocuous messages when we set tsched=0
      (see 0030 below) (LP: #323712),
    - Hint 'linux' source package instead of 'alsa-driver' for
      Launchpad bug reports,
    - The debug-specific portion is only applicable to 0.9.14;
      0.9.15 enables a rate limiting module by default to work
      around this (and other) issues
  * 0029_fix_suspend_on_idle_null_race.patch: Handle sink case,
    too
  * 0030_set_tsched0.patch: Work around a shedload of (driver)
    bugs by falling back to interrupt-based buffer semantics
    (LP: #190754, #292880, #295519, #298494, #301755, #302964,
     LP: #319118, #323976, #324103, #326205, #326864)
  * Backport fixes from git HEAD:
    - 0031_fix_6chan_map.patch,
    - 0032_reinit_proplist.patch,
    - 0033_fix_pa-gcc-packedmalloc.patch,
    - 0034_bt_fixes.patch
  * Make invoking the stop target in the initscript not fail an
    upgrade (LP: #317921)
  * Previous upload (0.9.14-0ubuntu3) fixed LP: #321357
  * 01PulseAudio: use sudo -H to ensure that $HOME is, in fact,
    the user's when invoking pacmd for suspend/resume

 -- Daniel T Chen <email address hidden> Sun, 15 Feb 2009 02:35:26 -0500

Changed in pulseaudio:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers