How to Install VLC Media Player on Ubuntu 24.04
Step-by-step guide to install VLC media player on Ubuntu 24.04 LTS using APT and Snap, with multimedia codecs and hardware acceleration setup.

5 min read
Step-by-step guide to install VLC media player on Ubuntu 24.04 LTS using APT and Snap, with multimedia codecs and hardware acceleration setup.
- Prerequisites and Supported Releases
- Method 1: Installing VLC via APT (Native Debian Package)
- Method 2: Installing VLC via Snap (Direct from VideoLAN)
Desktop Linux users frequently need a reliable, feature-packed media player capable of rendering local video files, streaming network protocols, playing physical optical media, and transcoding audio on the fly. When you install vlc media player on ubuntu 24.04, you acquire the gold standard in media playback software, built on a robust modular core with integrated decoders for nearly every audio and video format in existence.
On Ubuntu 24.04 LTS, VLC can be installed either as a traditional native Debian package through APT or as a self-contained containerized Snap package maintained directly by VideoLAN. Each installation method offers distinct operational advantages regarding sandboxing, dependency isolation, and update delivery speeds. This guide details both installation avenues, essential multimedia codec configuration, and hardware playback acceleration.
VLC Media Player is a universally popular open-source media player that plays virtually any video, audio, or streaming format without requiring external codec packs. This guide demonstrates how to install VLC media player on Ubuntu 24.04 LTS using both the official APT repository and the Snap Store, complete with hardware acceleration and encrypted DVD support.
Prerequisites and Supported Releases
This guide is thoroughly verified on Ubuntu 24.04 LTS (Noble Numbat) & Ubuntu 22.04 LTS. The instructions apply cleanly to cloud instances (AWS EC2, Google Compute Engine, DigitalOcean, Hetzner), bare-metal servers, and local virtual machines.
Before proceeding, ensure you have the following requirements satisfied:
- A desktop installation of Ubuntu 24.04 LTS with GNOME or another graphical desktop environment.
- A user account with sudo administrative privileges.
- An active Internet connection to download installation packages.
- At least 300 MB of available disk space.
Method 1: Installing VLC via APT (Native Debian Package)
The vlc-plugin-access-extra package adds extended protocol handlers for specialized live streaming networks and uncommon audio/video hardware devices.
# Enable the universe repository if not already active
sudo add-apt-repository universe -y
# Refresh package index
sudo apt update
# Install VLC Media Player and browser integration plugins
sudo apt install -y vlc vlc-plugin-access-extra
Method 2: Installing VLC via Snap (Direct from VideoLAN)
The Snap package automatically configures sandboxed desktop permissions and will self-update in the background whenever VideoLAN pushes new point releases.
# Install VLC from the stable Snap channel
sudo snap install vlc
Comparing APT vs Snap Installation for VLC
Both installation mechanisms result in a fully operational VLC player. Review the trade-offs below to determine which method aligns best with your workstation workflow.
| Attribute | APT Package (Native) | Snap Package (VideoLAN) |
|---|---|---|
| Startup Time | Faster initial cold start | Slightly slower first launch |
| Update Cycle | Stable point releases tied to Ubuntu | Instant updates from VideoLAN |
| File Access | Direct unrestricted local filesystem | Sandboxed (requires home/removable-media connect) |
| Desktop Integration | Native GTK/Qt system theme match | Bundled theme runtime |
| Disk Footprint | Shared system libraries (~120 MB) | Self-contained bundle (~320 MB) |
Step 3: Enabling Encrypted DVD and Restricted Codec Support
The reconfiguration process automatically downloads, compiles, and installs the libdvdcss2 library, allowing VLC to decrypt and play copy-protected DVD discs.
# Install restricted multimedia extras
sudo apt install -y ubuntu-restricted-extras libdvd-pkg
# Reconfigure libdvd-pkg to build and install libdvdcss2
sudo dpkg-reconfigure libdvd-pkg
Step 4: Launching VLC and Setting it as Default Media Player
You can launch VLC from your terminal by typing vlc or by opening your desktop application menu and searching for VLC media player.
To configure VLC as the default application for video and audio files across your desktop, open GNOME Settings or configure default associations via the command line.
# Launch VLC Media Player in the background
vlc &
# Set VLC as the default desktop handler for MP4 video
xdg-mime default vlc.desktop video/mp4
# Set VLC as the default desktop handler for MKV video
xdg-mime default vlc.desktop video/x-matroska
Step 5: Enabling Hardware Accelerated Video Decoding
When playing high-resolution 4K or 1080p 60fps video, press Ctrl+I in VLC and inspect the Statistics tab. Input bitrate should remain smooth while system CPU usage remains under 10%.
Hardware acceleration offloads intensive video decoding from your CPU to your integrated or dedicated graphics processor, lowering CPU utilization and dramatically extending battery life on laptops.
Open VLC and navigate to Tools > Preferences (or press Ctrl+P). Click on the Input / Codecs tab.
Locate the dropdown labeled Hardware-accelerated decoding and select VA-API video decoder (for Intel and AMD graphics) or Automatic. Click Save and restart VLC.
Step 6: Completely Uninstalling VLC from Ubuntu 24.04
If you decide to remove VLC Media Player, execute the removal command corresponding to your chosen installation method.
# If installed via APT:
sudo apt purge -y vlc vlc-plugin-access-extra
sudo apt autoremove -y
# If installed via Snap:
sudo snap remove vlc
# Optionally clear personal cache and playlist settings:
rm -rf ~/.config/vlc ~/.cache/vlc
Troubleshooting and Common Errors
When configuring Ubuntu servers, unexpected permission errors, network timeouts, or lock contention can occur. Review these common issues and verified resolutions:
VLC Snap cannot access video files located on an external USB hard drive.
Cause: Snap application isolation blocks access to /media and /mnt mount points by default.
Resolution: Connect the removable-media Snap plug using the command line.
sudo snap connect vlc:removable-media
Video displays a green or black screen while audio plays normally.
Cause: Hardware decoding incompatibility or misconfigured OpenGL/X11 video output driver.
Resolution: In VLC Preferences > Video, change Output from 'Automatic' to 'XVideo output (X11)' or disable hardware acceleration under Input / Codecs.
vlc --vout=xvideo
VLC crashes with 'Cannot run as root' message.
Cause: VLC incorporates security checks preventing root user execution to protect against malicious media file exploits.
Resolution: Always execute VLC as a standard unprivileged user. If necessary, use sed to patch the VLC binary check.
sed -i 's/geteuid/getppid/' /usr/bin/vlc
Security Best Practices and Hardening
Never run graphical media players as the root user.
Media files can embed malicious overflow exploits targeting codec decoders; running VLC as an unprivileged user ensures process sandboxing limits potential damage.
Related Ubuntu Tutorials and Documentation
Deepen your Linux system administration skills with our related production-tested guides:
- How to Install and Use FFmpeg on Ubuntu 24.04 — Transcode, inspect, and optimize media streams using the underlying FFmpeg framework.
- How to Install Google Chrome Web Browser on Ubuntu 24.04 — Configure modern desktop web browsing alongside multimedia workstations.
- How to Uninstall Software Packages on Ubuntu — Learn how to cleanly remove applications, configurations, and residual packages.
Authoritative References and Official Documentation

The Linux Command Line, 2nd Edition: A Complete Introduction
Frequently Asked Questions
Quick answers to common questions and configurations
Ctrl+N (Open Network Stream), paste the RTSP, RTMP, or HTTP stream URL into the input field, and click Play.Editorial Disclosure: Website Vidya is supported by our readers. When you purchase hosting, tools, or software through our verified partner links, we may earn an affiliate commission at no extra cost to you. We only recommend solutions we trust and rigorously verify.
Rajesh Ray
I’m Rajesh Rai, a full-stack developer, Linux administrator, and technology enthusiast passionate about making complex technology easier to understand and use.
Most Read Guides
TrendingUbuntu Server Not Booting? 10 Simple Steps to Fix It Fast
How to Create a 3D Button in HTML and CSS: Easy Steps
How to Install Python and Pip on Ubuntu 24.04 LTS
How to Install Nginx on Ubuntu 24.04
How to Install Python on Ubuntu 24.04 LTS
Related Technical Guides
Tested runbooks, server administration walkthroughs, and troubleshooting guides
Join the Conversation & Perspective
Have thoughts, counterpoints, or reflections on this story? Engage directly with fellow readers and editorial contributors.
No comments on this guide yet. Be the first to share your thoughts or ask a question!