Audio playback (wav & ogg vorbis) stuttering

*nix specific usage questions
Zorror
New Cone
New Cone
Posts: 2
Joined: 13 Aug 2023 15:36

Audio playback (wav & ogg vorbis) stuttering

Postby Zorror » 13 Aug 2023 16:18

Hey everyone,

I have a problem which is not exclusively to VLC, but maybe someone can help me, because I'm really desperate and don't have any idea what's wrong with my system.

Whenever I play certain audio files on VLC or Elisa (KDE's audio player), the audio stutters.

Here is one of the files I have problems with: https://www.dropbox.com/scl/fi/9htosrbr ... qgtv6&dl=0

And this is what a playback of this file sounds like on my PC: https://www.dropbox.com/scl/fi/0d2x6rrm ... 8n6p6&dl=0

It sounds like someone would mute the sound for one second and then unmute it again. The same files can be played on other PCs without this "stuttering".

When I play the file on console with ogg123 it sounds perfectly fine! ogg123 says "Encoder: VLC media player".

I've tried tinkering around with the VLC settings (e.g. change PulseAudio to Alsa or something else) but to no avail. The stuttering is still there.

Audio playback in other apps like games or browser are perfectly fine. On this site I've found some audio test files and it seems the problem only occurs with files with a sampling rate of 48 and 96 kHz. Those test files with 44.1 kHz work fine.

Another thing I've noticed: When I start another audio playback (e.g. a Youtube-Video) and THEN play the file in VLC, it doesn't stutter at all! It's so strange and I've no idea what could cause this problem.
If anyone has any idea, any clue, I would be very grateful!

I'm using Manjaro with KDE Plasma 5.27.6 and a Realtek ALC4080 Soundchip (on board).

Thank you very much!

best regards
Zorror

nightsky908
New Cone
New Cone
Posts: 3
Joined: 12 Sep 2023 18:58

Re: Audio playback (wav & ogg vorbis) stuttering

Postby nightsky908 » 12 Sep 2023 19:45

I was about to post this as a topic until I saw your thread about it. I am encountering the exact same stuttering problem using vlc 3.0.16 in Linux Mint 21.2 when trying to use my headphones playing audio files (video files with audio work).

I have no problems with the audio when I am playing a video (e.g. mp4, mkv), it only produces the stuttering sounds with an audio file (mp3, m4a, opus, wav, flac, aac) in the same way that you posted with the example you gave in dropbox. I have done the same tests you have gotten the same results: i have tried experimenting between ALSA and pulseaudio (and others) in the vlc audio settings (no change), and when i play a youtube video in the background it will play the vlc audio file without problems. I even found the audio tests files to produce stuttering sounds for 48 & 96 kHz but despite the 44.1kHz working it has a jarring sound initially when you change the time on the timeline.I also tried audio tracks at varying file sizes from 4 to 400mb with the different codecs (no change). I have had no problems playing audio in celluloid, audacity youtube, etc. I also tried google: disabling Enable Time-Stretching audio and changing the file caching from 1000 to 20000ms and to 300ms (didn't help)

My monitor has inbuilt speakers as well as a jack audio out that I can plug my headphones into that connects via HDMI and the audio plays fine. However, if I use my MSI B650 Tomahawk Line-Out/Front Speaker Out (the red one) from the 6 available audio ports (which it states in the manual as the preferred choice for headphones) it causes me problems. It recognises the device as USB audio (which technically it isn't, but works for everything but vlc properly) using Analogue Stereo Output. I have tried using all the other options (e.g. Digitial Stereo Output, etc.) but it doesn't help.

Even though I could use my monitor's HDMI audio jack out, I prefer to have a separate connection so if I pull out my headphones on e.g. 30% audio volume it doesn't cause the in built monitor speakers to play sound at the same volume immediately afterwards, which I can set to mute before I then choose to use a separate conenction when using the HD audio connectors on my MSI motherboard (which also has noticeably better sound quality).

I don't know if it is a memory issue as right now I am using a single 8gb crucial ddr5 4800kHz so I have ordered for (4 x 32gb) 128gb crucial ddr5 5600kHz ram to see if it makes a difference. Since it can play fine while a youtube video is playing it really confuses me why it stutters otherwise? Maybe its a driver issue?

nightsky908
New Cone
New Cone
Posts: 3
Joined: 12 Sep 2023 18:58

Re: Audio playback (wav & ogg vorbis) stuttering

Postby nightsky908 » 16 Sep 2023 23:20

Hi there!

I've had some help and come across a solution. The version in the software repository seems to be quite buggy so you might have improvements in performance by installing from a PPA instead.

I got vlc to work correctly by using the one as described here: https://launchpad.net/~tomtomtom/+archive/ubuntu/vlc.

If you uninstall the version you have installed you can add this repository to be installed from instead:

sudo add-apt-repository ppa:tomtomtom/vlc
sudo apt update

When you 'sudo apt install vlc' it will use the tomtomtom repository instead of the default one. I have found the audio playback from the beginning and when you click at any point in the timeline to be near instantaneous in loading (I am using an SSD which might be making the big difference) without stuttering or hesitation (which couldn't be achieved previously) as well as using a more up to date version of 3.0.18 rather than 3.0.16.

Zorror
New Cone
New Cone
Posts: 2
Joined: 13 Aug 2023 15:36

Re: Audio playback (wav & ogg vorbis) stuttering

Postby Zorror » 18 Sep 2023 20:39

Hey nightsky,

thanks for your info! So you are using MSI B650 Tomahawk. This mainboard uses the ALC4080 Codec as well, just like my Asus Rog Strix X670!

I've currently VLC 3.0.18 installed. What exactly is the difference to the repository you've mentioned? As I said I'm on Manjaro, which uses pacman, so unfortunately I cannot really use the ppa. Are you sure the issue is completely fixed with this version of VLC?

best regards
Zorror

nightsky908
New Cone
New Cone
Posts: 3
Joined: 12 Sep 2023 18:58

Re: Audio playback (wav & ogg vorbis) stuttering

Postby nightsky908 » 18 Sep 2023 23:13

I am not particularly familiar with arch based systems, I've only ever used Ubuntu. The fact that other media players (e.g. celluloid and firefox) can play audio correctly suggests it is probably an application issue with vlc or libraries that it depend on. The best I can suggest is report this as a bug. I've been testing the vlc I installed from the tomtomtom repository PPA and can say it works and I have not come across anymore stuttering like I mentioned. I believe Arch based systems have an optional flatpak install which might work although I personally wouldn't as there are substantial security vulnerabilities (https://flatkill.org/), not to mention the resource overhead! But it might help to see if you can get a version of vlc to work as you want it to. When you look at tomtomtom's other avaliable PPAs on the website they have worked on gmusicbrowser ("an open-source jukebox for large collections of mp3/ogg/flac files") and qmplay2 ("a video and audio player which can play most formats and codecs"), very much audio based applications. The PPA might have addressed the issues or the maintainer might have a better understanding or a different approach to how audio works on ubuntu based systems to prevent them from arising. Unless there is an alternative installation method for installing vlc on manjaro I don't know if you will find a quick resolution like I got.


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 43 guests