Users of the Raspberry Pi 5 often find that while Chromium successfully plays YouTube videos with audio over HDMI, VLC media player fails to output sound. This discrepancy typically stems from differences in how the two applications handle PulseAudio or PipeWire service discovery and hardware acceleration paths rather than a system-wide audio failure.
Understanding the Audio Backend Discrepancy
The core of this issue lies in the underlying audio servers used by modern Linux distributions on the Raspberry Pi OS. While both Chromium and VLC require access to the audio subsystem, they interact with it differently. Chromium is tightly integrated with the desktop environment and generally auto-detects the active PulseAudio or PipeWire socket without requiring explicit configuration. It relies heavily on the browser's internal GStreamer pipelines which are pre-configured to route media through the standard user-space audio daemon. VLC, however, is a standalone application that may not automatically locate the correct audio device if the environment variables for the audio server are not correctly exported or if the user lacks permissions to access the shared socket. On the Raspberry Pi 5, the transition from older ALSA-based direct hardware access to higher-level abstractions like PipeWire has exposed these compatibility gaps. If VLC cannot see the PulseAudio or PipeWire instance running under your user account, it will either fail to start playback silently or produce video without any accompanying audio track.Verifying Service Status and Permissions
Before diving into complex configurations, you must ensure that the audio server is actually running and accessible. Open a terminal on your Raspberry Pi 5 and check the status of the PipeWire service, which is the default on recent versions of Raspberry Pi OS. You can do this by runningsystemctl --user status pipewire. If the service is inactive, start it using systemctl --user start pipewire and enable it for future boots with systemctl --user enable pipewire.
Next, verify that the PulseAudio compatibility layer is also active if you are relying on legacy applications. Run systemctl --user status pulseaudio. If these services are running but VLC still fails, the issue might be permission-related. Ensure your user belongs to the appropriate audio groups. Although less common on modern managed systems, checking group membership with groups can reveal if your user is missing the audio group, which grants necessary privileges to access hardware devices directly.
Configuring VLC for PipeWire or PulseAudio
If the services are running, you need to explicitly tell VLC which audio module to use. Launch VLC and navigate to Tools > Preferences. Click on the All settings radio button at the bottom left to switch from Simple to Advanced view. In the left-hand tree menu, expand Audio and select Output modules. Change the Output module dropdown from Automatic to PulseAudio or PipeWire, depending on which service is dominant in your setup. After selecting the specific output module, click Save and restart VLC. This forces the application to bypass its automatic detection logic, which may be failing due to subtle environment mismatches. If you prefer command-line usage, you can specify the output module directly when launching VLC by adding the--aout=pa flag (for PulseAudio) or --aout=pipewire to your command string. This immediate test confirms whether the backend selection was the root cause of the silence.
Checking HDMI Audio Routing
Sometimes the issue is not with VLC itself but with the system routing audio specifically to the HDMI port. Use thepavucontrol tool (PulseAudio Volume Control) to manage audio streams visually. Install it via sudo apt install pavucontrol if it is not already present. Open Pavucontrol and go to the Configuration tab. Ensure that your HDMI audio profile is set to "Digital Stereo (HDMI)" rather than falling back to analog or being disabled.
Navigate to the Playback tab while VLC is attempting to play a video. You should see a volume bar moving in sync with the audio. If the bar is static, VLC is not sending data to the audio server. If the bar moves but you hear no sound, check the Output Devices tab to ensure the correct HDMI sink is selected as the fallback device. This step is crucial because multiple audio sinks can exist simultaneously, and the wrong one might be prioritized by the system.