Skip to content

kairin/ubuntu-video-playback

Repository files navigation

Ubuntu Video Playback Configuration

Complete guide for setting up video playback with hardware acceleration on Ubuntu 25.10 with NVIDIA GPU.

System Information

  • OS: Ubuntu 25.10 (Questing Quetzal)
  • Kernel: Linux 6.17.0-6-generic
  • GPU: NVIDIA GeForce RTX 4080 SUPER
  • Driver: NVIDIA 580.95.05 (open kernel)
  • Date Configured: 2025-11-19

Problem Statement

The system was unable to play video files due to missing multimedia codecs and video acceleration libraries.

Solution Overview

This repository documents the complete configuration process to enable:

  • Video playback for common formats (H.264, HEVC, VP8, VP9, AV1, etc.)
  • Hardware-accelerated video decoding/encoding using NVIDIA GPU
  • Multiple video players (VLC, MPV)
  • GStreamer multimedia framework support

What Was Installed

Core Multimedia Packages

  • ubuntu-restricted-extras - Proprietary codecs (H.264, AAC, MP3, etc.)
  • gstreamer1.0-plugins-bad - Additional video/audio codecs
  • gstreamer1.0-plugins-ugly - MP3, x264, and essential codecs
  • gstreamer1.0-libav - FFmpeg wrapper for GStreamer
  • ffmpeg - Core multimedia framework (v7.1.1)

Video Players

  • vlc - Full-featured media player (v3.0.21)
  • mpv - Lightweight, powerful media player (v0.40.0)

Dependencies (121 packages)

Complete list includes codec libraries, GStreamer plugins, Qt5 libraries, and multimedia dependencies.

Hardware Acceleration Support

Currently Working

  • VDPAU: NVIDIA's legacy video API
  • CUDA/CUVID: Native NVIDIA hardware decoding
  • NVENC/NVDEC: Hardware encoding/decoding

FFmpeg NVIDIA Support

  • Decoders: AV1, H.264, HEVC, VP8, VP9, MPEG1/2/4, VC1, MJPEG (CUVID)
  • Encoders: AV1, H.264, HEVC (NVENC)

Quick Start

Installation

See INSTALLATION.md for detailed step-by-step instructions.

# Quick install (all packages)
sudo apt update
sudo apt install -y ubuntu-restricted-extras \
  gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \
  gstreamer1.0-libav ffmpeg vlc mpv

Testing Video Playback

Using VLC:

vlc /path/to/video.mp4

Using MPV:

mpv /path/to/video.mp4

Using FFmpeg:

ffmpeg -i /path/to/video.mp4 -f null -

NVIDIA Hardware Acceleration

See NVIDIA_ACCELERATION.md for complete setup guide.

Outstanding Recommendations

To enable VA-API support for broader application compatibility:

# Install NVIDIA VA-API driver
sudo apt install nvidia-vaapi-driver

# Install diagnostic tools
sudo apt install vdpauinfo vainfo libva-utils

Configuration Files

VLC Hardware Acceleration

Settings → Input/Codecs → Hardware-accelerated decoding → VA-API video decoder via DRM

MPV Hardware Acceleration

Add to ~/.config/mpv/mpv.conf:

hwdec=nvdec
vo=gpu

Verification Commands

# Check NVIDIA GPU status
nvidia-smi

# List hardware acceleration methods
ffmpeg -hwaccels

# Test NVIDIA decoding
ffmpeg -hwaccel cuda -i video.mp4 -f null -

# Test NVIDIA encoding
ffmpeg -i input.mp4 -c:v h264_nvenc -preset p7 -tune hq output.mp4

# Check VDPAU (after installing vdpauinfo)
vdpauinfo

# Check VA-API (after installing vainfo and nvidia-vaapi-driver)
vainfo

Repository Structure

.
├── README.md                   # This file
├── INSTALLATION.md             # Detailed installation steps
├── NVIDIA_ACCELERATION.md      # NVIDIA acceleration guide
├── install.sh                  # Automated installation script
└── configs/
    ├── mpv.conf               # MPV configuration
    └── vlc-settings.md        # VLC configuration guide

Troubleshooting

Videos Still Won't Play

  1. Restart your media player
  2. Try a different player (VLC vs MPV)
  3. Check codec support: ffmpeg -codecs | grep <format>
  4. Verify hardware acceleration: nvidia-smi

Hardware Acceleration Not Working

  1. Check NVIDIA driver: nvidia-smi
  2. Verify NVDEC libraries: dpkg -l | grep libnvidia-decode
  3. Test with ffmpeg: ffmpeg -hwaccel cuda -i video.mp4 -f null -

Additional Resources

License

Documentation is provided as-is for personal use.

Contributing

This is a personal configuration repository. Feel free to fork and adapt for your own use.

About

Complete Ubuntu 25.10 video playback setup with NVIDIA hardware acceleration (RTX 4080 SUPER)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages