You are not logged in.
Hello,
I discover a weird problem in vlc 2.1.5,
on some tracks a slight distortion can be heard, especially on jazz tracks and tracks who have a lot of classical instruments ( acoustic piano for example ),
if you try with modern music ( electronic music ) you will probably not hear distortion,
the culprit seems to be the vlc option "resampler audio" in audio ( advanced option ) section, by default it is set on "automatic" and it gives bad results with my PC,
the only solution I found is to change the "resampler audio" option to "resampling Speex", then I get much better results,
I want to know if you have also notice this problem ?
I use KDE, phonon-qt4-vlc backend for the audio,
with other audio softwares ( mplayer, audacious ) I don't have this problem
Last edited by Potomac (2014-07-31 20:59:56)
Offline
This is probably indirectly related to high quality resampling chapter on alsa wiki page. Also this on the talk page might interest you, especially this reference. VLC probably uses one of the inferior resampling methods as default.
Offline
by default vlc uses "libsamplerate" as resampler method, and with this setting the results are horrible in vlc,
I tried to create an ~/.asoundrc file to put this line : "defaults.pcm.rate_converter "speexrate_medium" but it seems to have no effect with vlc,
the only solution for me with vlc is to use the option "resampler speex" in vlc option,
I create a bugreport in vlc website but the vlc developpers don't want to fix this bug, they think it's a build problem, maybe a bug with archlinux in the PKGBUILD ( a missing option for the compilation ? ) :
https://trac.videolan.org/vlc/ticket/11844#comment:2
Last edited by Potomac (2014-07-29 20:53:20)
Offline
That is the reason I wrote it is indirectly related. ~/.asoundrc is related to alsa, even if vlc might use alsa as an output, it probably will resample internally, which leaves you with the same problem. You installed the compiled package from extra repository, right? Try to compile it yourself (yaourt -Sb vlc) or use one of the aur versions. Check the logs for the resamplers, maybe there has been a recent change and they know already about it.
Last edited by emeres (2014-07-29 21:00:14)
Offline
I check the vlc log with this command :
vlc --extraintf=http:logger --verbose=2 --file-logging --logfile=/home/potomac/documents/bugs/vlc-log.txt
and I notice that vlc is unable to find libsamplerate ( SRC ), if I set to "automatic" the option for the resampler audio in VLC I can read this :
main debug: looking for audio resampler module matching "any": 3 candidates
main debug: using audio resampler module "ugly_resampler"
main debug: End of audio preroll
if I set to "SRC secret rabbit code -libsamplerate" I find this in vlc log :
main debug: looking for audio resampler module matching "samplerate": 3 candidates
main debug: using audio resampler module "ugly_resampler"
main debug: End of audio preroll
and if I set to "Speex" for the resampler audio I get this :
main debug: looking for audio resampler module matching "speex_resampler": 3 candidates
main debug: using audio resampler module "speex_resampler"
main debug: End of audio preroll
so it seems there is a huge problem with vlc 2.1.5, the program is unable to find libsamplerate ( but the archlinux package libsamplerate is installed ),
I tried to create my own package ( I use the switch --enable-samplerate in order to be sure that vlc will find libsamplerate ) but it's the same problem, the "ugly resampler" is used and only the "speex" resampler method give good results,
I don't know if I should create a bugreport in archlinux website
Last edited by Potomac (2014-07-31 18:15:22)
Offline
You could try strace to see what file exactly vlc is looking for, although if you compiled vlc, this should not happen. Have you tried the vlc-git package? Maybe it already has been taken care of. If you certain it is not, then sure report it, if not reported already, upstream might want to know this also.
main debug: looking for audio resampler module matching "samplerate": 3 candidates
main debug: using audio resampler module "samplerate"
This is my log, when used with src as resampler in vlc 2.1.5 from extra repository.
$ vlc --version
VLC media player 2.1.5 Rincewind (revision 2.1.4-49-gdab6cb5)
VLC version 2.1.5 Rincewind (2.1.4-49-gdab6cb5)
Compiled by nobody on (Jul 9 2014 13:09:56)
Compiler: gcc version 4.9.0 20140604 (prerelease) (GCC)
This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute it under the terms of the GNU General Public Licence;
see the file named COPYING for details.
Written by the VideoLAN team; see the AUTHORS file.
Offline
I didn't try the git version of vlc,
I have just created a bugreport for archlinux,
emeres can you make a test in order to see if you have the same problem ?
juste type in a shell :
vlc --extraintf=http:logger --verbose=2 --file-logging --logfile=/home/your_name/vlc-log.txt
then try to read an audio file ( with audio resampler option set to "automatic" or "SRC libsamplerate" ), tell me if you see the same message in vlc log ( "ugly resampler" ),
in my vlc package the file /usr/lib/vlc/plugins/audio_filter/libsamplerate_plugin.so exists, but for an unknown reason vlc doesn't use it
Last edited by Potomac (2014-07-31 19:04:30)
Offline
I double checked, since I did that already in when writing the previous post. For auto, I get:
main debug: looking for audio resampler module matching "any": 3 candidates
main debug: using audio resampler module "samplerate"
For SRC:
main debug: looking for audio resampler module matching "samplerate": 3 candidates
main debug: using audio resampler module "samplerate"
For nearest:
main debug: looking for audio resampler module matching "ugly_resampler": 3 candidates
main debug: using audio resampler module "ugly_resampler"
For speexrate:
main debug: looking for audio resampler module matching "speex_resampler": 3 candidates
main debug: using audio resampler module "speex_resampler"
My audio_filter directory:
liba52tofloat32_plugin.so
liba52tospdif_plugin.so
libaudiobargraph_a_plugin.so
libaudio_format_plugin.so
libchorus_flanger_plugin.so
libcompressor_plugin.so
libdolby_surround_decoder_plugin.so
libdtstofloat32_plugin.so
libdtstospdif_plugin.so
libequalizer_plugin.so
libgain_plugin.so
libheadphone_channel_mixer_plugin.so
libkaraoke_plugin.so
libmono_plugin.so
libmpgatofixed32_plugin.so
libnormvol_plugin.so
libparam_eq_plugin.so
libremap_plugin.so
libsamplerate_plugin.so
libscaletempo_plugin.so
libsimple_channel_mixer_plugin.so
libspatializer_plugin.so
libspeex_resampler_plugin.so
libstereo_widen_plugin.so
libtrivial_channel_mixer_plugin.so
libugly_resampler_plugin.so
$ pacman -Qi libsamplerate
Name : libsamplerate
Version : 0.1.8-3
Description : Secret Rabbit Code - aka Sample Rate Converter for audio
Architecture : x86_64
URL : http://www.mega-nerd.com/SRC/index.html
Licences : GPL
Groups : None
Provides : None
Depends On : libsndfile
Optional Deps : None
Required By : alsa-utils discord jack2 k3b lib32-libsamplerate lmms mednafen mupen64plus-audio-sdl-hg sweep
Optional For : alsa-plugins
Conflicts With : None
Replaces : None
Installed Size : 1605.00 KiB
Packager : Eric Belanger <eric@archlinux.org>
Build Date : Thu 24 Oct 2013 22:11:53 CEST
Install Date : Wed 13 Nov 2013 12:51:09 CET
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : Signature
Last edited by emeres (2014-07-31 19:28:42)
Offline
Ok, thanks for the test,
I notice also a bug if I try to install vlc package, a problem with vlc-cache-gen :
[ALPM-SCRIPTLET] /tmp/alpm_i6DWYp/.INSTALL: line 1: 8271 Segmentation fault (core dumped) usr/lib/vlc/vlc-cache-gen -f /usr/lib/vlc/plugin
https://bugs.archlinux.org/task/39676
so I use a workaround :
export LD_PRELOAD=/usr/lib/libgobject-2.0.so.0
then I can install vlc without error, maybe despite this workaround vlc-cache-gen didn't do a good job ?
you can test by uninstall vlc, then reinstall vlc, you should have the bug of vlc-cache-gen and probably the bug of missing resampler ?
Last edited by Potomac (2014-07-31 19:36:17)
Offline
Still the same behaviour using the vlc from extra repository. I tried vlc-git, same behaviour.
Last edited by emeres (2014-07-31 19:58:14)
Offline
you meant you didn't have the bug "vlc-cache-gen" when you have uninstalled vlc and reinstalled it ?
you have gnome or kde ?
Last edited by Potomac (2014-07-31 19:49:25)
Offline
you have gnome or kde ?
Neither. I only use openbox as wm.
Last edited by emeres (2014-07-31 19:59:08)
Offline
I will try on other installations of archlinux ( a laptop and a virtual machine ), I want to know if this bug is reproducible,
I have a clue ( vlc-cache-gen can be the culprit with the bug FS#39676 )
Offline
in fact I found the solution,
my mistake was to split the workaround in 2 lines :
export LD_PRELOAD=/usr/lib/libgobject-2.0.so.0
pacman -S vlc
this method will trigger a bug in vlc-cache-gen, the plugin.dat file will be generated in a wrong way,
the solution is to type in one line without exporting LD_PRELOAD :
LD_PRELOAD=/usr/lib/libgobject-2.0.so.0 pacman -S vlc
another solution :
LD_PRELOAD=/usr/lib/libgobject-2.0.so.0 /usr/lib/vlc/vlc-cache-gen -f /usr/lib/vlc/plugins
now all is ok, deleting manualy the file /usr/lib/vlc/plugins/plugins.dat and then regnerate it with vlc-cache-gen is more secure, because sometimes vlc-cache-gen doesn't recreate this file if it already exists
I notice also that the "vlc-cache-gen" bug occurs only on 64 bits installation, not on i686 architecture
Last edited by Potomac (2014-07-31 21:48:48)
Offline