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
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 -y
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
sudo apt install mpv -y
MPV uses FFmpeg libraries and handles HEVC well.
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
mpv /path/to/file.mkv
ffprobe /path/to/file.mkv
Look for codec_name=h265 (HEVC).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.
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 —
mpv --hwdec=no your-video.mkvffmpeg -i input.mkv -c:v libx264 -crf 23 -c:a aac output.mp4
Parameters explained:
-crf 23 – Quality (lower = better, 18-28 typical)-c:v libx264 – H.264 video codec-c:a aac – AAC audio codecLinux Mint has a built-in tool designed specifically for this purpose. This is the recommended first step for all new users. Installing HEVC (H
Once completed, try opening your .mkv file again. In 90% of cases, this resolves the issue immediately.