Skip to Content

Codecs und Videowiedergabe

Aufgrund von Patent- und Lizenzbeschränkungen enthält Ubuntu bestimmte Multimedia-Codecs nicht standardmäßig. In diesem Artikel wird erläutert, wie Sie die vollständige Codec-Unterstützung und Videoplayer installieren.

Ubuntu-Restricted-Extras installieren

ubuntu-restricted-extras ist ein Metapaket, das die am häufigsten benötigten Codecs und Schriftarten auf einmal installiert:

sudo apt install ubuntu-restricted-extras -y

Dieses Paket beinhaltet:

  • MP3, AAC und andere Audio-Codecs (GStreamer-Plugins)
  • H.264 und andere Videocodecs
  • Microsoft TrueType-Kernschriftarten
  • Unrar-Extraktionstool

Während der Installation müssen Sie möglicherweise die EULA-Lizenzvereinbarung für Microsoft-Schriftarten akzeptieren.

Zusätzliche Codecs installieren

GStreamer-Plugins

GStreamer ist Ubuntus Standard-Multimedia-Framework:

# Base plugins sudo apt install gstreamer1.0-plugins-base -y # Good plugins sudo apt install gstreamer1.0-plugins-good -y # Bad plugins (may have patent issues) sudo apt install gstreamer1.0-plugins-bad -y # Ugly plugins (have patent issues but widely used) sudo apt install gstreamer1.0-plugins-ugly -y # FFmpeg integration sudo apt install gstreamer1.0-libav -y # Install all at once sudo apt install gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav -y

FFmpeg

FFmpeg ist das leistungsstärkste Multimedia-Verarbeitungstool:

sudo apt install ffmpeg -y ffmpeg -version

Gemeinsame Operationen:

# Video format conversion ffmpeg -i input.avi -c:v libx264 -c:a aac output.mp4 # Extract audio ffmpeg -i video.mp4 -vn -c:a libmp3lame audio.mp3 # Compress video ffmpeg -i input.mp4 -c:v libx264 -crf 23 -preset medium output.mp4 # Trim video ffmpeg -i input.mp4 -ss 00:01:00 -to 00:03:00 -c copy clip.mp4 # Convert to GIF ffmpeg -i input.mp4 -vf "fps=15,scale=480:-1" output.gif

VA-API und VDPAU-Hardwarebeschleunigung

# VA-API (AMD and Intel) sudo apt install va-driver-all libva2 vainfo -y vainfo # VDPAU (NVIDIA) sudo apt install vdpau-driver-all libvdpau1 vdpauinfo -y vdpauinfo

Videoplayer

VLC

VLC ist der Videoplayer mit dem umfassendsten Funktionsumfang und unterstützt nahezu alle Formate:

# Method 1: apt install sudo apt install vlc -y # Method 2: Snap install sudo snap install vlc # Method 3: Flatpak install flatpak install flathub org.videolan.VLC -y

VLC verfügt über eigene integrierte Codecs, sodass die meisten Formate auch ohne Installation von Ubuntu-Restricted-Extras abgespielt werden können.

mpv

mpv ist ein leichter, aber leistungsstarker Videoplayer, der bei Linux-Benutzern sehr beliebt ist:

sudo apt install mpv -y

Grundlegende Verwendung:

# Play a video mpv video.mp4 # Play a network video mpv https://example.com/video.mp4 # Play a YouTube video (requires yt-dlp) mpv "https://www.youtube.com/watch?v=VIDEO_ID"

mpv-Konfigurationsdatei ~/.config/mpv/mpv.conf:

# Hardware decoding hwdec=auto # High-quality scaling profile=gpu-hq # Default volume volume=80 # Subtitle font size sub-font-size=40 # Screenshot save path screenshot-directory=~/Pictures/mpv # Enable OSD osd-bar=yes

MPV-Tastaturkürzel:

AbkürzungAktion
SpacePause/Wiedergabe
fVollbild umschalten
← / →5 Sekunden zurück-/vorspulen
↑ / ↓60 Sekunden zurück-/vorspulen
9 / 0Lautstärke verringern/erhöhen
sScreenshot
vUntertitel umschalten

Zelluloid (GNOME MPV)

Ein grafisches GTK-Frontend für mpv, besser geeignet für den GNOME-Desktop:

sudo apt install celluloid -y

Showtime

Der standardmäßige GNOME-Videoplayer, vorinstalliert in Ubuntu 26.04 – keine manuelle Installation erforderlich. Showtime kann gängige Formate abspielen, nachdem Codecs installiert wurden. Für eine breitere Formatkompatibilität wird weiterhin VLC oder mpv empfohlen.

Audiowiedergabe

Audio-Codecs installieren

sudo apt install libavcodec-extra -y

Popmusik-Player

# Rhythmbox (GNOME default) sudo apt install rhythmbox -y # Audacious (lightweight) sudo apt install audacious -y # Spotify sudo snap install spotify

DVD- und Blu-ray-Wiedergabe

DVD-Wiedergabe

sudo apt install libdvd-pkg -y sudo dpkg-reconfigure libdvd-pkg

Blu-ray-Unterstützung

sudo apt install libbluray-bdj libaacs0 -y mkdir -p ~/.config/aacs # You will need to obtain a KEYDB.cfg file from the internet

Untertitelunterstützung

# Install subtitle-friendly fonts sudo apt install fonts-noto-cjk fonts-wqy-zenhei fonts-wqy-microhei -y

Untertitel im MPV konfigurieren:

# ~/.config/mpv/mpv.conf sub-auto=fuzzy sub-font="Noto Sans CJK SC" sub-font-size=36 sub-border-size=2

yt-dlp-Video herunterladen

# Install yt-dlp sudo apt install yt-dlp -y # Or install the latest version with pipx (under Python 3.13, the system pip is # restricted by PEP 668, so plain pip install will not work) sudo apt install pipx pipx install yt-dlp # Download a video yt-dlp "https://www.youtube.com/watch?v=VIDEO_ID" # Download best quality yt-dlp -f "bestvideo+bestaudio" "URL" # Download audio only yt-dlp -x --audio-format mp3 "URL"

Nach der Installation der vollständigen Codec-Suite kann Ubuntu 26.04 alle gängigen Audio- und Videoformate reibungslos abspielen.