← Back to team overview

desktop-packages team mailing list archive

[Bug 732410] Re: flac decoding is broken in some manner for gstreamer

 

[Expired for gst-plugins-good0.10 (Ubuntu) because there has been no
activity for 60 days.]

** Changed in: gst-plugins-good0.10 (Ubuntu)
       Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gst-plugins-good0.10 in Ubuntu.
https://bugs.launchpad.net/bugs/732410

Title:
  flac decoding is broken in some manner for gstreamer

Status in “gst-plugins-good0.10” package in Ubuntu:
  Expired

Bug description:
  This bug leads to poor performance and poor audio quality. Audio
  quality issues involve popping sounds, scratch sounds, pausing,
  silence, and other sound quality issues with any application that uses
  gstreamer. These applications include totem, banshee, nautilus (audio
  preview), and gst123. It sounds like the audio is cutting out, as if
  the one of the volume sliders was cranked way too high or something
  like that.

  The symptoms manifest themselves as buffer underruns or poor
  performance with pusleaudio. It seems that pulseaudio must
  continuously loop back to correct sound issues. This is not noticeable
  when using pulseaudio in it's default configuration as it's able to
  compensate for you. Probably the same for Alsa. When I am using the
  a52 alsa plugin to send audio to a receiver over SPDIF, however I have
  poor audio performance. The problem appears to still exist regardless,
  but it is masked.

  Originally I thought it was Banshee that was causing the poor audio
  performance. Then I traced it down to pulseaudio, but now I believe
  it's a issues with gstreamer itself.

  While searching for existing bugs I noticed a number of gstreamer
  applications that are exhibiting poor behavior when using flac, but it
  is not apparent why this is. I may have located it.

  The reason why I think it's a bug with gstreamer and not pulseaudio is
  because I can play the same files just perfectly using non-gstreamer
  applications like VLC or mplayer.  I can also re-encode flac files as
  Ogg Vorbis files and they play just fine.

  I understand that playing through the a52 encoder plugin is not a
  supported configuration, but I think it's just making the problems
  surface and not the core cause of the issue.

  
  When selecting 'Analog Stereo Output' and while running 'pulseaudio -vv' I receive copious amounts of output that resemble this:

  D: sink-input.c: Have to rewind 1036 bytes on implementor.
  D: source.c: Processing rewind...
  D: protocol-native.c: Underrun on ''Where the Devil Don't Stay' by 'Drive-By Truckers'', 0 bytes in queue.
  D: protocol-native.c: Requesting rewind due to rewrite.
  D: alsa-sink.c: Requested to rewind 6172 bytes.
  D: alsa-sink.c: Limited to 6172 bytes.
  D: alsa-sink.c: before: 1543
  D: alsa-sink.c: after: 1543
  D: alsa-sink.c: Rewound 6172 bytes.
  D: sink.c: Processing rewind...
  D: sink-input.c: Have to rewind 6172 bytes on render memblockq.
  D: sink-input.c: Have to rewind 5668 bytes on implementor.
  D: source.c: Processing rewind...
  D: protocol-native.c: Underrun on ''Where the Devil Don't Stay' by 'Drive-By Truckers'', 0 bytes in queue.
  D: protocol-native.c: Requesting rewind due to rewrite.
  D: alsa-sink.c: Requested to rewind 176 bytes.
  D: alsa-sink.c: Limited to 176 bytes.
  D: alsa-sink.c: before: 44
  D: alsa-sink.c: after: 44
  D: alsa-sink.c: Rewound 176 bytes.
  D: sink.c: Processing rewind...
  D: sink-input.c: Have to rewind 176 bytes on render memblockq.
  D: sink-input.c: Have to rewind 164 bytes on implementor.
  D: source.c: Processing rewind...
  D: protocol-native.c: Underrun on ''Where the Devil Don't Stay' by 'Drive-By Truckers'', 0 bytes in queue.
  D: protocol-native.c: Requesting rewind due to rewrite.
  D: alsa-sink.c: Requested to rewind 4588 bytes.
  D: alsa-sink.c: Limited to 4588 bytes.
  D: alsa-sink.c: before: 1147
  D: alsa-sink.c: after: 1147
  D: alsa-sink.c: Rewound 4588 bytes.

  
  This output is continuous and flies up the xterm at a fast rate. 

  Using this command with 'gst123 ; killall pulseaudio' in another
  terminal produced 530 of those messages over the course of a 1 minute
  and 4 second audio sample:

  $ pulseaudio -vv 2>&1 | grep "D: alsa-sink.c: Rewound " |wc
      530    2650   19024

  
  The same audio converted to 64Kb/s Ogg Vorbis creates this output:

  $ pulseaudio -vv 2>&1 | grep "D: alsa-sink.c: Rewound " |wc
            4      20     149

  
  The same flac file converted to wav output produced this:

  $ pulseaudio -vv 2>&1 | grep "D: alsa-sink.c: Rewound " |wc
        4      20     149

  Which seems identical to the Ogg Vorbis output.

  The files are:
  $ file 01\ Where\ the\ Devil\ Don\'t\ Stay.*
  01 Where the Devil Don't Stay.flac: FLAC audio bitstream data, 16 bit, stereo, 44.1 kHz, 14074368 samples
  01 Where the Devil Don't Stay.ogg:  Ogg data, Vorbis audio, stereo, 44100 Hz, ~64000 bps, created by: Xiph.Org libVorbis I
  01 Where the Devil Don't Stay.wav:  RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz

  The song is normally 5 minutes long, but I cut it short to 1 minute.
  This is not the only file, of course, I tested several other flac,
  ogg, wav, and mp3 files and only flac created this issue.

  
  The above was duplicated using multiple audio devices, too. 
  Devices exhibiting the same output as above are:
  * HP USB audio headset
  * Logitech G330 USB headset (I recommend this product, btw.)
  * RealTech ALC889 Intel HD Audio onboard device (analog out) 

  Devices that had different output, but had errors:
  * Sony Bluetooth headset (Sounded fine, but with 1-2 second pauses every 10-20 seconds. Ogg and Wav versions played flawlessly)
  * a52 alsa plugin, encoded to ac3 and outputed to receiver. (frequent pops, scratches and other audio artifacts associated with buffer underruns)

  
  With the a52 plugin I saw this output from 'pulseaudio -vv':

  D: alsa-sink.c: Requested to rewind 0 bytes.
  D: alsa-sink.c: Mhmm, actually there is nothing to rewind.
  D: protocol-native.c: Underrun on ''Where the Devil Don't Stay' by 'Drive-By Truckers'', 0 bytes in queue.
  D: protocol-native.c: Requesting rewind due to rewrite.
  D: alsa-sink.c: Requested to rewind 0 bytes.
  D: alsa-sink.c: Mhmm, actually there is nothing to rewind.
  D: protocol-native.c: Underrun on ''Where the Devil Don't Stay' by 'Drive-By Truckers'', 0 bytes in queue.
  D: protocol-native.c: Requesting rewind due to rewrite.
  D: alsa-sink.c: Requested to rewind 0 bytes.
  D: alsa-sink.c: Mhmm, actually there is nothing to rewind.
  D: protocol-native.c: Underrun on ''Where the Devil Don't Stay' by 'Drive-By Truckers'', 0 bytes in queue.
  D: protocol-native.c: Requesting rewind due to rewrite.
  D: alsa-sink.c: Requested to rewind 0 bytes.
  D: alsa-sink.c: Mhmm, actually there is nothing to rewind.
  D: protocol-native.c: Underrun on ''Where the Devil Don't Stay' by 'Drive-By Truckers'', 0 bytes in queue.
  D: protocol-native.c: Requesting rewind due to rewrite.
  D: alsa-sink.c: Requested to rewind 0 bytes.
  D: alsa-sink.c: Mhmm, actually there is nothing to rewind.
  D: protocol-native.c: Underrun on ''Where the Devil Don't Stay' by 'Drive-By Truckers'', 0 bytes in queue.
  D: protocol-native.c: Requesting rewind due to rewrite.
  D: alsa-sink.c: Requested to rewind 0 bytes.
  D: alsa-sink.c: Mhmm, actually there is nothing to rewind.
  D: protocol-native.c: Underrun on ''Where the Devil Don't Stay' by 'Drive-By Truckers'', 0 bytes in queue.
  D: protocol-native.c: Requesting rewind due to rewrite.
  D: alsa-sink.c: Requested to rewind 0 bytes.
  D: alsa-sink.c: Mhmm, actually there is nothing to rewind.
  D: protocol-native.c: Underrun on ''Where the Devil Don't Stay' by 'Drive-By Truckers'', 0 bytes in queue.
  D: protocol-native.c: Requesting rewind due to rewrite.
  D: alsa-sink.c: Requested to rewind 0 bytes.
  D: alsa-sink.c: Mhmm, actually there is nothing to rewind.
  D: protocol-native.c: Underrun on ''Where the Devil Don't Stay' by 'Drive-By Truckers'', 0 bytes in queue.
  D: protocol-native.c: Requesting rewind due to rewrite.
  D: alsa-sink.c: Requested to rewind 0 bytes.

  
  Repeated. 


  I don't understand enough of how gstreamer and pulseaudio interact to
  know what is going wrong. My guess is that there is a issue with
  decoding the variable bit rate flac file in a way that the sampling is
  not done correctly and that is causing issues.

  The reason why I think the problem lies with gstreamer is that the
  audio artifacts and 'rewind' output do not occure with vlc or mplayer.

  The reason I do not think that it's pulseaudio is because gstreamer
  works fine with other formats.

  The reason I do not think that it has to do with audio drivers is
  because all the devices I can plug into this computer have issues with
  flac playback, but work perfectly with anything else.

  
  Thank you for your time and your patience.

  ProblemType: Bug
  DistroRelease: Ubuntu 11.04
  Package: gstreamer0.10-plugins-good 0.10.28-0ubuntu1
  ProcVersionSignature: Ubuntu 2.6.38-6.34-generic 2.6.38-rc7
  Uname: Linux 2.6.38-6-generic x86_64
  Architecture: amd64
  Date: Wed Mar  9 22:16:53 2011
  InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha amd64 (20110301.7)
  ProcEnviron:
   LANGUAGE=en_US:en
   PATH=(custom, user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: gst-plugins-good0.10
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gst-plugins-good0.10/+bug/732410/+subscriptions