Page 1 of 1

Very bad audio quality

Posted: 07 Jul 2014 14:53
by skoehler
Hi,

I was playing movies with VLC on my S4 mini (i9195) yesterday. For some of the movies, VLC had very bad audio quality compared to other players (like MX player for example).
The audio quality improved drastically when I switched the Audio method to "AudioTrack (Java)". Both "AudioTrack (nativ)" and "OpenSL ES" resulted in poor audio quality. The issue is easy to reproduce with the files I have.

The sound was bad in the sense that there was additional noise added to the audio track. The kind of noise that you would expect from some very poor quality sample rate conversion or something like it. Wearing headphones, it was audible for both music and voice. I initially thought that the movie files I had were poor quality (like 22050Hz audio track) but instead both seem to have a 48000Hz audio track. I believe there were other files which didn't have issues with the quality. I will try more carefully to spot any significant difference between the files that worked and the ones that didn't tonight.


Regards,
Sven

Re: Very bad audio quality

Posted: 08 Jul 2014 02:11
by Jean-Baptiste Kempf
You should be able to see the issues in the log.

Re: Very bad audio quality

Posted: 13 Jul 2014 02:43
by skoehler
Yes. There are some details in the log. The first thing is that native AudioTrack doesn't seem to work. VLC eventually uses OpenSL ES. With OpenSL ES, the output sample frequence seems to be fixed at 44100Hz. Hence, for a movie with a 48000Hz track, the so called "ugly_resample" filter is used (and indeed it sounds very ugly!). As expected, another movie with a 44100kHz works fine.

When AudioTrack (Java) is selected, then the output sample frequency varies. It seems to adapt to whatever the movie uses (48000 or 44100Hz). So no ugly_resample is involved on the VLC side of things. I guess, that at some point resampling does occur (as sound from various sources must be mixed) but the quality of the resampling is better than VLC's ugly resampler.

Two things come to mind: VLC should probably use a better resampler. On the other hand, this might also be a bug in the OpenSL ES implementation. Can't you use a 48000Hz sample rate with OpenSL ES?

Re: Very bad audio quality

Posted: 18 Jul 2014 15:22
by skoehler
So are you going to fix this? You have all the information you need?