(Feisty) VLC sound quality is poor for many video files

Bug #103025 reported by ubu-for
30
Affects Status Importance Assigned to Milestone
alsa-lib (Ubuntu)
Won't Fix
Low
Ubuntu Audio Team
vlc (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

I've used VLC in Herd 4 as default player for nearly every video file, but since a fresh installation of Feisty Beta (32-bit) I get cracking sound and audio peaks. Especially with mp3 audio codecs.

The VLC volume level is "300". Lower levels are too quiet compared with the excellent Totem-Gstreamer and MPlayer sound.

Revision history for this message
Daniel T Chen (crimsun) wrote :

So this only occurs with vlc?

Revision history for this message
ubu-for (ubu-for) wrote :

Yes.

I use an Abit KN8 SLI mainboard with onboard sound.

Revision history for this message
Daniel T Chen (crimsun) wrote :

How about via ALSA's OSS emulation (using the OSS setting in VLC)?

Revision history for this message
ubu-for (ubu-for) wrote :

Solved!

MPlayer:
audio output module: ALSA (works great)

VLC:
audio output module: standard (poor sound)
audio output module: ALSA (poor sound)
audio output module: OSS (works great even at volume level "440")

THX for your help!

Revision history for this message
ccc1 (cllccl-deactivatedaccount) wrote :

I can confirm that bug on feisty beta. A few people at ubuntuforums.org are having the same problem. Seems to be a feisty regression. used to work fine in edgy.

The cracking sound is not limited to mp3s also happens with flac, wav, wma .... It gets worse if one sets the volume higher. as ubu-for wrote chaning the audio output to OSS fixes the problem, but since it worked on edgy with the standard setting it would be nice to see that fixed in feisty.

btw.: i'm also using the onboard sound of asus kv8 se

Revision history for this message
Andreas Schiffer (andreas-schiffer) wrote :

I have the same problem with vlc on feisty beta on my notebook FSJ AMILO Xi 1554.
My ALSA sound module is snd-hda-intel with model ALC882/ALC885.

I'd consider setting the VLC audio output to OSS a work-around, not a fix or solution.
It would be great if this could be fixed for the release of Feisty Fawn.

https://bugs.launchpad.net/ubuntu/+source/vlc/+bug/95538 seems to be a duplicate to this bug report.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Not suitable for feisty, which releases in 9 days.

Changed in vlc:
importance: Undecided → Low
status: Needs Info → Confirmed
Revision history for this message
Oumar Aziz OUATTARA (wattazoum) wrote :

I confirm it too ( on 2 different computers ) . Since correcting this issue wouldn't seemingly require a version upgrade of vlc, I don't think it is wise to just let go .

I don't think the importance of this bug should be set to low. It's very annoying.

Revision history for this message
ubu-for (ubu-for) wrote :

Quote: "Not suitable for feisty, which releases in 9 days."

Maybe you can change the default audio module to OSS?

Revision history for this message
Daniel T Chen (crimsun) wrote :

ubu-for, that would be unsuitable for audio devices on which this symptom does not appear, e.g., my current hardware:

Codec: Conexant CX20549 (Venice)
Address: 0
Vendor Id: 0x14f15045
Subsystem Id: 0x103c30bb
Revision Id: 0x100100

Revision history for this message
Frédéric STEMMELIN (fred-stamy) wrote :

Same problem for me with VLC, no problem under Edgy.

The workaround i working fine, thx.

Revision history for this message
aldee (aldee) wrote :

Reproducible for me with a

00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02)

sound chip (ASUS P5B onboard sound).

Actually the problem seems to be a little more complex, though. Apparently the outcome depends on what audio driver is set as system default. For me, forcing VLC to "ALSA" would cut the crackling. However, it did turn out, that when forcing the default system audio drivers to ALSA (apparently, the default setting is OSS for the above mentioned soundchip), this would change, so forcing VLC to OSS did the trick. Leaving the audio to "Default" in VLC does always produce crackling noises (if volume is set to >50%). Note that after changing the default audio driver, you'll have to save settings in VLC again (even when not changing anything) and restart it, as otherwhise the described behaviour is not reproducible (for me at least). Also, the VLC audio settings might jump back to Default after changing system defaults.

Revision history for this message
tim__b (timb) wrote :

Same problem for me woth Feisty Fawn final. Not every MP3 file is affected, but some of them. For me there is not difference in quality between oss and alsa, both are poor in quality. (Device ATI Technologies Inc IXP SB400 AC'97 Audio Controller)

Revision history for this message
ubu-for (ubu-for) wrote :

Since some OS updates, now I can only choose between "Standard" (poor sound) and "hw:0,0".

If I press the refresh button on the left, the ALSA device names change to "Standard", "NVidia CK804: NVidia CK804 (hw:0,0)" and "NVidia CK804: NVidia CK804 - IEC958 (hw:0,2)".

Revision history for this message
ubu-for (ubu-for) wrote :

If I play the following video from the Firefox cache with VLC, I don't get sound with the audio output module "hw:0,0" and poor sound with "Standard".

http://www.techeblog.com/index.php/tech-gadget/first-call-of-duty-4-trailer-released

To reproduce the bug, play the video within Firefox and then with VLC from the cache.

BTW the video quality is poor, too.

Revision history for this message
Shawn Zhang (zombie83p-deactivatedaccount) wrote :

Same problem for me, seems to be limited to mp3's so the regression could be in the mad decoder. Then again, I don't have an extensive collection of Vorbis or other files, so I can't confirm. Chipset is an onboard Intel AC'97 (non-HD).

Revision history for this message
Shawn Zhang (zombie83p-deactivatedaccount) wrote :

Strike that, problem persists after decoding mp3 to wav using lame, so the problem is indeed in VLC's audio output. Hope this gets fixed, this bug ought to be marked high as it makes VLC unusable.

Revision history for this message
Shawn Zhang (zombie83p-deactivatedaccount) wrote :

Oh yeah, sorry for multi-posting, but using OSS doesn't help either, perhaps this should be a separate bug?

Revision history for this message
ubu-for (ubu-for) wrote :

I have the same problem with my second PC (ASUS Mainboard A7N8X ACPI BIOS Rev. 1007).

OSS works great with both PCs.

Revision history for this message
Oumar Aziz OUATTARA (wattazoum) wrote :

Anyway, a workaround isn't a bugfix.

Revision history for this message
K (kkumar) wrote :

How can i do this work around? sorry I am newbie.

Revision history for this message
Oumar Aziz OUATTARA (wattazoum) wrote :

here is an howto .

Revision history for this message
K (kkumar) wrote :

Wonderful Aziz. thank you so much.

Revision history for this message
K (kkumar) wrote :

Aziz, I tried with work around, but still i am hearing cracking sound. Any other suggession?

Revision history for this message
huiii (a00ps) wrote :

having the same issue with vlc since feisty.
too loud, too cracky.
other players are fine...
changing to oss does not change a thing here...
still too loud.
thx

Revision history for this message
Oumar Aziz OUATTARA (wattazoum) wrote :

Hello,

If someone from QA is here, please update the importance of this bug to high.

Revision history for this message
Matti Lindell (mlind) wrote :

If I change the "Alsa Device Name" from Settings -> Output modules -> ALSA to PCM Playback (hw0,0) or Multichannel Playback (hw0,3) crackling goes away. List must be refreshed before the other devices appear on the dropdown box. What is this 'Default' alsa device referring exactly?

I'm using SB Audigy.

Revision history for this message
Daniel T Chen (crimsun) wrote :

The 'default' ALSA virtual device is dmixed/dsnooped (as appropriate); 'hw:0,0' (and 'hw:0,3') bypass dmix/dsnoop completely.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Possibly alsa-lib. Bumping Importance.

Changed in vlc:
importance: Low → Medium
Revision history for this message
Matti Lindell (mlind) wrote :
Download full text (3.6 KiB)

VLC is the only application I have this issue. Rhythmbox and amarok both play a .mp3 file without the issue, but in VLC "Default ALSA device" produces cracking sound (hw0,0 sounds normal).

Default Device:
[00000368] mpeg_audio decoder debug: MPGA channels:2 samplerate:44100 bitrate:128
[00000349] main audio output debug: looking for audio output module: 3 candidates
[00000349] alsa audio output debug: opening ALSA device `default'
[00000349] main audio output debug: thread 2961320848 (aout) created at priority 0 (alsa.c:662)
[00000349] main audio output debug: using audio output module "alsa"
[00000349] main audio output debug: output 'fl32' 44100 Hz Stereo frame=1 samples/8 bytes
[00000349] main audio output debug: mixer 'fl32' 44100 Hz Stereo frame=1 samples/8 bytes
[00000349] main audio output debug: no need for any filter
[00000349] main audio output debug: looking for audio mixer module: 3 candidates
[00000349] main audio output debug: using audio mixer module "trivial_mixer"
[00000349] main audio output debug: input 'mpga' 44100 Hz Stereo frame=1152 samples/1053 bytes
[00000349] main audio output debug: filter(s) 'mpga'->'fl32' 44100 Hz->44100 Hz Stereo->Stereo
[00000369] main private debug: looking for audio filter module: 24 candidates
[00000369] main private debug: using audio filter module "mpgatofixed32"
[00000349] main audio output debug: found a filter for the whole conversion
[00000349] main audio output debug: filter(s) 'fl32'->'fl32' 48510 Hz->44100 Hz Stereo->Stereo
[00000370] main private debug: looking for audio filter module: 24 candidates
[00000370] main private debug: using audio filter module "bandlimited_resampler"
[00000349] main audio output debug: found a filter for the whole conversion

Audigy 1 [SB0090]: ADC Capture/Standard PCM Playback (hw:0,0):
[00000395] mpeg_audio decoder debug: MPGA channels:2 samplerate:44100 bitrate:128
[00000349] main audio output debug: looking for audio output module: 3 candidates
[00000349] alsa audio output debug: opening ALSA device `hw:0,0'
[00000349] main audio output debug: thread 2952862608 (aout) created at priority 0 (alsa.c:662)
[00000349] main audio output debug: using audio output module "alsa"
[00000349] main audio output debug: output 's16l' 44100 Hz Stereo frame=1 samples/4 bytes
[00000349] main audio output debug: mixer 'fl32' 44100 Hz Stereo frame=1 samples/8 bytes
[00000349] main audio output debug: filter(s) 'fl32'->'s16l' 44100 Hz->44100 Hz Stereo->Stereo
[00000396] main private debug: looking for audio filter module: 24 candidates
[00000396] main private debug: using audio filter module "float32tos16"
[00000349] main audio output debug: found a filter for the whole conversion
[00000349] main audio output debug: looking for audio mixer module: 3 candidates
[00000349] main audio output debug: using audio mixer module "trivial_mixer"
[00000349] main audio output debug: input 'mpga' 44100 Hz Stereo frame=1152 samples/1053 bytes
[00000349] main audio output debug: filter(s) 'mpga'->'fl32' 44100 Hz->44100 Hz Stereo->Stereo
[00000397] main private debug: looking for audio filter module: 24 candidates
[00000397] main private debug: using audio filter module "mpgatofixed32...

Read more...

Revision history for this message
Ebuntor (ebuntor) wrote :

I would just like to add that the "hw:0,0" ALSA device or the OSS output module both do fix the crackling problem but unfortunately it's only a partial solution.
When using either of these solutions you can only have sound in only one application at the time. What I mean by that is when you play a media file in VLC and open another one in a new VLC window or a different app (Firefox for example) there won't be any sound.
You first have to close the original VLC window to get any sound back.

This has been discussed on the forums and it seems everyone has this problem. Seems like the only real solution for now is to turn down the default volume in VLC although this is far from ideal.

To be honest I don't really understand why this bug's importance isn't set to high :), it makes VLC as a media player unusable imo.

Revision history for this message
Matti Lindell (mlind) wrote :

To me it seems that crimsun is right, problem is in alsa-lib. I just rebuilt alsa-lib from Debian unstable, and with resulting libasound2, there's no crackin sound anymore.
I'm trying to pinpoint the exact patch that's causing this. Can anyone verify that rebuilt libasound2 from Debian unstable works without this issue?

Related/Duplicate is Bug #97004.

Revision history for this message
Matti Lindell (mlind) wrote :

Rebuild Feisty's alsa-lib with 'debian/patches/63_improved_resampling.dpatch' disabled and sound should be normal again.

Revision history for this message
Ebuntor (ebuntor) wrote :

Sounds great! Could you please explain how I can rebuild the alsa-lib? Is that done by recompiling it from the source code?

Revision history for this message
Matti Lindell (mlind) wrote :

@ Ebuntor
I guess this issue is not in the scope of this bug, but if you're interested, Ubuntu wiki offers useful content to begin with:
 - https://wiki.ubuntu.com/UbuntuPackagingGuide/BuildFromDebdiff
 - https://wiki.ubuntu.com/PbuilderHowto
 - https://wiki.ubuntu.com/HowToBuildDebianPackagesFromScratch

You can use the debdiff I attached in bug #97004 or alternatively comment out '63_improved_resampling.dpatch' in debian/patches/00list, bump the version in debian/changelog and rebuild. Just make sure it's feisty's alsa-lib you're modifying (apt-get source alsa-lib=1.0.13-1ubuntu5).

Just a word of caution; Following the guides without actually understanding what's happening might do more bad than good for your system.

Revision history for this message
Austin Lund (austin-lund) wrote :

I still get the same problem with the rebuilt library.

I don't know if it helps but I am using an nvidia sound card.

Revision history for this message
Ebuntor (ebuntor) wrote :

An excellent fix has been posted on the Ubuntu forums. Install the "vlc-plugin-esd" and use the "EsounD audio output" as output module.
The EsounD audio output not only fixes the crackling problem but it also fixes the problem of only being able to get sound in one VLC window at the time.
As I pointed out in a previous comment:
"using "hw:0,0" ALSA device or the OSS output module both do fix the crackling problem but unfortunately it's only a partial solution.
When using either of these solutions you can only have sound in only one application at the time. What I mean by that is when you play a media file in VLC and open another one in a new VLC window or a different app (Firefox for example) there won't be any sound.
You first have to close the original VLC window to get any sound back."

I tested it and it fixed both problems. :D

Revision history for this message
Oumar Aziz OUATTARA (wattazoum) wrote :

HI,

I am happy to know this hint, but this isn't a fix. A fix is a correction of a bug in the code. This is a workaroun0d .

Revision history for this message
Ebuntor (ebuntor) wrote :

Yeah you're right. It doesn't really fix the problems it's a way around them. The problems themself still persist. Nevertheless it's best thing we've got for the moment, unfortunately.

Revision history for this message
ubu-for (ubu-for) wrote :

The esd workaround does not fix the problem on my system.

The sound is still poor.

Revision history for this message
Daniel T Chen (crimsun) wrote :

vlc simply uses alsa-lib's "default". Rejecting vlc task.

Changed in vlc:
status: Confirmed → Invalid
Changed in alsa-lib:
assignee: nobody → ubuntu-audio
status: New → Incomplete
Revision history for this message
Oumar Aziz OUATTARA (wattazoum) wrote :

The question is : why is vlc the only one that is having this problem ? are others using another library ?

And some of the users commenting this bug do not get any improvement by changing the output lib to OSS or ESD ( those are alternative to alsa ) .
I can accept it as rejected on vlc side only if you can give me an example of another player that is using alsa lib and is having the same problem, or if all the users saying that the "changing output lib" workaround doesn't work tell that they were misusing the workaround (ie changing the output lib to anything but alsa always works. ).

Changed in vlc:
status: Invalid → New
Revision history for this message
Ebuntor (ebuntor) wrote :

I think this is actually two separate but related bugs. That workaround I posted about using EsounD audio output worked at first. However I had to reinstall Ubuntu completely and now the crackling sound has changed. Before the reinstall there was only crackling with loud sounds and the crackling itself sounded different. Now the crackling randomly occurs and EsounD audio output doesn't work anymore only the hw:0,0" ALSA device.

Reading the thread about this problem on the Ubuntu forums also seem it's actually two similar crackling problems with different workarounds.

Revision history for this message
Daniel T Chen (crimsun) wrote :

1) Various native ALSA applications exhibit this behavior. In my testing on AC'97- and HDA-based hardware, apps ranging from aplay (using -Dplughw:0, -Dhw:0, and -Dplug:dmix:0) and vlc to GSt-based ones and PulseAudio (using a custom virtual sink) have exhibited this symptom. It would be a bit of a stretch to think that every last one of those native ALSA applications linking against alsa-lib exhibits this symptom in _precisely the same way_.
2) It is unclear whether linux-source-2.6.2[02] are culprits, too. This warrants more investigation.

(As an aside, please do not set the Status to New. It is inappropriate; any of Incomplete, Invalid, and Triaged are appropriate for this vlc task.)

Changed in vlc:
status: New → Invalid
Revision history for this message
Daniel T Chen (crimsun) wrote :

To clarify, point (1) in my most recent comment regarding the vlc task implies that it is a bit of a stretch to think that all those native ALSA apps listed carry the same culprit source code thereby causing the symptom.

Revision history for this message
Matti Lindell (mlind) wrote :

Sound quality is especially poor in gutsy currently with SB Audigy, so this applies on gutsy too.

Revision history for this message
Adam Baxter (voltagex) wrote :

I can confirm that changing VLC's settings to something other than 'Default' for audio is a successful workaround, but if 'Default' causes problems then that's a bug!

(sorry if this is irrelevant, this is just a very annoying bug, so I thought I'd add my voice here)

00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02)

Daniel T Chen (crimsun)
Changed in alsa-lib:
importance: Undecided → Medium
Revision history for this message
JC (jcarlock420) wrote :

I found that changing the ALSA audio output from default to hw:0,0 after hitting refresh resolved my issue also.

JC

Revision history for this message
erythro (erythro) wrote :

I am also experiencing this issue but none of the workarounds seem to make any difference. I am forced to use a Totem in the meantime.

Nanley Chery (nanoman)
Changed in alsa-lib:
status: Incomplete → Confirmed
Revision history for this message
Omegamormegil (omegamormegil) wrote :

This problem seems to be resolved now. Anyone still experiencing this running the Hardy beta?

Revision history for this message
daghost (daghoster) wrote :

Yep. Sound still crackling

Revision history for this message
Daniel T Chen (crimsun) wrote :

(Lowering importance due to known workaround.)

Changed in alsa-lib:
importance: Medium → Low
Revision history for this message
Daniel T Chen (crimsun) wrote :

The recommended workaround in the short run is to install vlc-plugin-pulse.

Changed in alsa-lib:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.