Install Hevc Codec For Mkv Video On Linux: Mint Link

Installing HEVC (H.265) codec to play MKV videos on Linux Mint

Below are step-by-step instructions to install the necessary codecs and players so you can play MKV files encoded with HEVC (H.265) on Linux Mint. These steps cover the common Mint releases (based on Ubuntu) and assume a default desktop environment (Cinnamon); commands work in Terminal.

Prerequisites

  1. Update package lists Open Terminal and run:
sudo apt update
sudo apt upgrade -y
  1. Enable the “multiverse” and “universe” repositories (required for some multimedia packages)
sudo add-apt-repository universe
sudo add-apt-repository multiverse
sudo apt update
  1. Install common codec packages (recommended) This installs the Ubuntu-restricted extras package, GStreamer plugins, and FFmpeg:
sudo apt install ubuntu-restricted-extras ffmpeg gstreamer1.0-libav gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly -y
  1. Install VLC (recommended media player with built-in HEVC support) VLC ships its own codecs and typically plays HEVC MKV files out of the box:
sudo apt install vlc -y

If an older VLC version from the Mint repositories fails to decode some HEVC files, install the Snap or Flatpak build:

flatpak install flathub org.videolan.VLC
sudo snap install vlc
  1. Install MPV (alternative lightweight player with good HEVC support)
sudo apt install mpv -y

MPV uses FFmpeg libraries and handles HEVC well.

  1. Hardware-accelerated HEVC playback (optional) Software decoding works but may be CPU-heavy for high-resolution HEVC (4K). For smoother playback, enable hardware acceleration using VA-API (Intel/AMD) or VDPAU/NVIDIA where supported.

a) Intel/AMD (VA-API)

sudo apt install vainfo libva2 i965-va-driver-shaders intel-media-va-driver-non-free -y

Note: Driver package names vary by GPU generation and distribution; use intel-media-driver or i965 driver accordingly. Run:

vainfo

to verify VA-API works.

b) NVIDIA NVIDIA’s proprietary driver plus VDPAU/FFmpeg support is needed. Install the recommended driver via Driver Manager or:

sudo apt install nvidia-driver-XXX

(replace XXX with the recommended version). For VDPAU bindings:

sudo apt install vdpauinfo libvdpau-dev -y

For mpv or VLC, enable hwdec in their settings:

hwdec=auto
  1. Test playback
  1. Troubleshooting
  1. Security and licensing notes HEVC is patent-encumbered in many jurisdictions. Installing restricted extras or proprietary drivers may have licensing implications; follow local laws and distribution policies.

  2. Quick command summary

sudo apt update && sudo apt upgrade -y
sudo add-apt-repository universe
sudo add-apt-repository multiverse
sudo apt update
sudo apt install ubuntu-restricted-extras ffmpeg gstreamer1.0-libav gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly vlc mpv -y

Optional hardware accel:

sudo apt install vainfo libva2 i965-va-driver-shaders intel-media-va-driver-non-free
# or for NVIDIA:
sudo apt install nvidia-driver-XXX vdpauinfo libvdpau-dev

If you want, I can provide commands tailored to your exact Linux Mint version (e.g., 21.2 Victoria) or help enable Flatpak/Snap builds.

To play HEVC (H.265) video content within an MKV container on Linux Mint, you can install the essential multimedia codecs via the terminal or the system menu. Quick Installation Method

The most straightforward way to ensure your system supports HEVC and other restricted formats is to install the mint-meta-codecs (Ctrl+Alt+T). Run the following command: sudo apt update && sudo apt install mint-meta-codecs

Enter your password when prompted and confirm the installation. Alternative: GUI Method

If you prefer not to use the terminal, Linux Mint provides a built-in tool: Launch Menu Sound & Video Install Multimedia Codecs Follow the on-screen prompts to complete the installation. Recommended Media Players

If you still encounter playback issues after installing the codecs, consider using a player that includes its own built-in codec library, bypassing the need for system-wide configuration: VLC Media Player install hevc codec for mkv video on linux mint link

: A highly reliable player that supports HEVC out of the box. You can find it on the official VLC website or install it via sudo apt install vlc

: Known for its ability to play virtually any format without external codecs. It is available for download at the SMPlayer official site

: The default player in Linux Mint, which acts as a frontend for

and generally handles HEVC well if system codecs are present. Troubleshooting HEVC Playback Install multimedia codecs - Linux Mint Forums Nov 6, 2556 BE —


"No video output" or green screen

Using FFmpeg:

ffmpeg -i input.mkv -c:v libx264 -crf 23 -c:a aac output.mp4

Parameters explained:

Method 1: The "Multimedia Codecs" Installer (Easiest)

Linux Mint has a built-in tool designed specifically for this purpose. This is the recommended first step for all new users. Installing HEVC (H

  1. Open your Menu (bottom-left corner).
  2. Type "Multimedia Codecs" and open the application labeled Multimedia Codecs Installer.
  3. You will be presented with a list of essential codecs. Ensure the box for "Media codecs" is checked.
  4. Click Install.
  5. You may be prompted to enter your password. Do so and wait for the process to finish.

Once completed, try opening your .mkv file again. In 90% of cases, this resolves the issue immediately.