Website Vidya
Linux & ServersStep-by-Step Guide

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.

RR
Rajesh RayLead Systems Educator
Published:
5 min read
PDF Cheat Sheet
How to Install VLC Media Player on Ubuntu 24.04
AI Executive SummaryWebsiteVidya AI

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.

Key Highlights
  • Prerequisites and Supported Releases
  • Method 1: Installing VLC via APT (Native Debian Package)
  • Method 2: Installing VLC via Snap (Direct from VideoLAN)
Grounded in full engineering runbookWebsiteVidya AI Engine

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.

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.

Advertisement

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.

Advertisement
AttributeAPT Package (Native)Snap Package (VideoLAN)
Startup TimeFaster initial cold startSlightly slower first launch
Update CycleStable point releases tied to UbuntuInstant updates from VideoLAN
File AccessDirect unrestricted local filesystemSandboxed (requires home/removable-media connect)
Desktop IntegrationNative GTK/Qt system theme matchBundled theme runtime
Disk FootprintShared 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

Advertisement

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.

Deepen your Linux system administration skills with our related production-tested guides:

Authoritative References and Official Documentation

Frequently Asked Questions

Quick answers to common questions and configurations

4 FAQs
Yes. VLC includes native Chromecast discovery. Open VLC, click Playback > Renderer in the top menu bar, and select your local network Chromecast device.
Yes, provided your hardware supports hardware-accelerated video decoding (VA-API for Intel/AMD or NVDEC for Nvidia). Ensure hardware acceleration is set to Automatic or VA-API in VLC Preferences.
Press Ctrl+N (Open Network Stream), paste the RTSP, RTMP, or HTTP stream URL into the input field, and click Play.
For seamless desktop theme integration and unrestricted access to local and network drives, choose APT. For the newest VLC release directly from VideoLAN with bundled codecs, choose Snap.
RR
Written byVerified Author

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.

SPAM-FREE MODERATED DISCOURSE

Join the Conversation & Perspective

Have thoughts, counterpoints, or reflections on this story? Engage directly with fellow readers and editorial contributors.

AT
MP
JV
+2

No comments on this guide yet. Be the first to share your thoughts or ask a question!

Recommended Reading10 Guides

Related Technical Guides

Tested runbooks, server administration walkthroughs, and troubleshooting guides

Featured Infrastructure PartnerUp to 75% OFF + 3 Months Free

Supercharge Your Linux & Cloud Workloads with Hostinger

Deploy high-speed NVMe KVM VPS, Docker containers, and LiteSpeed-accelerated WordPress servers in under 60 seconds with full root access, dedicated IPv4, and 24/7 technical support.

Pure NVMe SSD StorageFull Root Access & SSHFree Domain & Unlimited SSL99.9% Uptime SLA
Plans from$2.99/mo
Claim Hostinger DealAffiliate link • Special discount applied at checkout