Video PlaybackMidnightBSD provides comprehensive support for video playback through various media players available via mports. This guide covers the available video players, hardware acceleration options, codec support, and troubleshooting common video playback issues.
Available in mports: mpv, vlc, mplayer, xine, kodi, totem, dragon, parole, cheese, ffmpeg, streamlink, and more.
User Group Membership:
doas pw groupmod video -m username
Xorg Configuration: For GUI players, ensure X11 is working. See Xorg documentation.
Audio Configuration: Ensure sound is working. See Sound documentation.
| Player | Type | Description | Package |
|---|---|---|---|
| MPV | CLI/Minimal GUI | Lightweight, highly configurable, excellent performance | mpv |
| VLC | GUI | Full-featured, cross-platform, built-in codecs | vlc |
| MPlayer | CLI/Minimal GUI | Mature player with extensive format support | mplayer |
| Kodi | GUI/Media Center | Full media center for TV, movies, music | kodi |
| Xine | GUI | Traditional media player with plugin architecture | xine |
| Totem | GUI (GNOME) | Simple GNOME media player | totem |
| Dragon | GUI (KDE) | KDE media player | dragon |
| Parole | GUI (XFCE) | XFCE media player using GStreamer | xfce4-parole |
Recommendation: For most users, MPV is recommended. VLC is a good alternative with GUI.
MPV is a lightweight, highly configurable media player with excellent performance and comprehensive format support.
Installation:
# doas mport install mpv
Basic Usage:
# Play a local file mpv /path/to/video.mp4 # Play with subtitles mpv --sub-file=/path/to/subtitles.srt /path/to/video.mp4 # Play from URL mpv https://example.com/video.mp4 # Fullscreen mpv --fullscreen /path/to/video.mp4
Common Options:
--fullscreen or -fs - Fullscreen mode--sub-file=FILE - Load subtitles--volume=50 - Set initial volume (0-100)--speed=1.25 - Set playback speed--hwdec=auto - Enable hardware decoding--profile=gpu-hq - High-quality GPU profileKeyboard Controls:
Configuration File: ~/.config/mpv/mpv.conf
fullscreen=yes vo=gpu hwdec=auto profile=gpu-hq volume=75 cache=yes screenshot-directory=~/Pictures
Hardware Decoding:
mpv --hwdec=vaapi video.mp4 # VA-API mpv --hwdec=vdpau video.mp4 # VDPAU mpv --hwdec=auto video.mp4 # Automatic
Install Codecs:
# doas mport install ffmpeg libva libvdpau
VLC is a full-featured, cross-platform media player with extensive format support and user-friendly interface.
Installation:
# doas mport install vlc
Basic Usage:
vlc # Launch GUI vlc /path/to/video.mp4 # Play file from CLI vlc dvd:///dev/cd0 # Play DVD
Hardware Acceleration: Open Tools → Preferences → Input / Codecs, choose
an available hardware-accelerated decoder, and inspect VLC's messages while playing a file to confirm it
is active. The current VLC mport does not build its VA-API option.
Convert Media: Media → Convert/Save...
Stream Media: Media → Open Network Stream...
Preferences: Tools → Preferences (Show All for advanced settings)
MPlayer is a mature media player with extensive format support and configurability.
Installation:
# doas mport install mplayer mplayer-skins
Basic Usage:
mplayer /path/to/video.mp4 # Play file mplayer dvd:///dev/cd0 # Play DVD mplayer -fs /path/to/video.mp4 # Fullscreen
Video Output Drivers:
mplayer -vo xv video.mp4 # X11 Video extension mplayer -vo opengl video.mp4 # OpenGL mplayer -vo vdpau video.mp4 # VDPAU mplayer -vo vaapi video.mp4 # VA-API
Audio Output Drivers:
mplayer -ao pulse video.mp4 # PulseAudio mplayer -ao oss video.mp4 # OSS audio
Hardware Acceleration:
mplayer -vc ffh264vdpau,ffmpeg12vdpau -vo vdpau video.mp4
Configuration: ~/.mplayer/config
Kodi is a full media center application designed for home theater PCs with a beautiful,
user-friendly interface optimized for TV.
Installation:
# doas mport install kodi
Basic Usage:
kodi # Launch Kodi kodi-standalone # Launch in fullscreen
Setup:
Hardware Acceleration: Enable in Settings → Player → Videos → Acceleration
Useful Add-ons: YouTube, Netflix, PVR IPTV Simple Client, Subtitles
Xine:
# doas mport install xine
xine /path/to/video.mp4
Totem (GNOME):
# doas mport install totem
totem /path/to/video.mp4
Dragon (KDE):
# doas mport install dragon
dragon /path/to/video.mp4
Parole (XFCE):
# doas mport install xfce4-parole
parole /path/to/video.mp4
Hardware acceleration can significantly improve video playback performance, especially for HD content.
Supported Hardware: Depends on the GPU, kernel driver, and an installed VA-API back end.
Installation:
doas mport install libva
The current mports tree provides the VA-API library and tools but no separate Intel or AMD VA-API
driver package. Check vainfo on the target system before selecting this back end.
Verify:
vainfo
Usage:
mpv --hwdec=vaapi video.mp4
Supported Hardware: NVIDIA (GeForce 8+), AMD (Radeon HD 2000+)
Installation:
doas mport install libvdpau nvidia-driver # NVIDIA doas mport install libvdpau mesa-gallium-vdpau # AMD open-source
Verify:
vdpauinfo
Usage:
mpv --hwdec=vdpau video.mp4 mplayer -vc ffh264vdpau -vo vdpau video.mp4
Supported Hardware: Sandy Bridge+
Installation:
doas mport install intel-media-sdk libva
intel-media-sdk provides Intel media encode/decode components. VA-API playback also needs
a compatible driver; confirm the available capabilities with vainfo.
Usage:
mpv --hwdec=vaapi video.mp4
Supported Hardware: GeForce GTX 600+
Installation:
doas mport install nvidia-driver libvdpau
Usage:
mpv --hwdec=vdpau video.mp4 # VDPAU
Driver Configuration:
kldload nvidia-modeset # Load NVIDIA kernel module sysrc kld_list+=nvidia-modeset # Enable at boot nvidia-smi # Check driver status
Verify Hardware Acceleration:
mpv --hwdec=auto --verbose video.mp4 # Check for hwdec messages vainfo # VA-API info vdpauinfo # VDPAU info
Common Video Codecs: H.264/AVC, H.265/HEVC, AV1, VP9, VP8, MPEG-2, MPEG-4, VC-1/WMV, Theora
Common Video Containers: MP4, MKV, WebM, AVI, MOV, FLV, TS/M2TS, OGG, WMV/ASF
Install Codec Support:
doas mport install ffmpeg libx264 x265 libvpx libtheora # DVD support doas mport install libdvdcss libdvdnav libdvdread # Blu-ray support doas mport install libbluray libaacs # AV1 support doas mport install dav1d
Check File Information:
ffprobe /path/to/video.mp4 ffmpeg -codecs # List supported codecs ffmpeg -formats # List supported formats
Streamlink: CLI tool for extracting streams from YouTube, Twitch, and other sites.
Installation:
# doas mport install streamlink
Basic Usage:
# List available streams streamlink https://youtube.com/watch?v=ID --stream-types # Play best quality with MPV streamlink https://youtube.com/watch?v=ID best -p mpv # Play with VLC streamlink https://youtube.com/watch?v=ID best -p vlc # Save stream to file streamlink https://youtube.com/watch?v=ID best -o video.mp4
Streaming with MPV/VLC:
# MPV mpv https://youtube.com/watch?v=VIDEO_ID mpv https://twitch.tv/channel_name # VLC vlc https://example.com/stream.m3u8 vlc rtsp://server/stream
No Video Output:
echo $DISPLAYmpv -vo xv,opengl,gl video.mp4kldstat | grep drmid username (ensure in video group)mpv -vo x11 video.mp4Choppy/Stuttering Playback:
htopmpv --hwdec=auto video.mp4mpv --cache=5000 video.mp4No Audio:
mixermpv -ao pulse,oss,alsa video.mp4Missing Codec:
doas mport install ffmpegdoas mport install libx264 x265 libvpxffprobe video.mp4mpv --hwdec=no video.mp4Hardware Acceleration Not Working:
vainfo, vdpauinfokldstat | grep drmls -la /dev/dri/doas pw groupmod video -m usernamempv --hwdec=auto video.mp4, then test
--hwdec=vaapi or --hwdec=vdpau individuallyDiagnostic Commands:
# Video file information ffprobe /path/to/video.mp4 # Hardware acceleration info vainfo vdpauinfo # GPU information kldstat | grep drm # Player version mpv --version vlc --version mplayer -v # Verbose logging mpv -v /path/to/video.mp4 vlc -vvv /path/to/video.mp4
Performance Monitoring:
htop # CPU usage nvidia-smi # NVIDIA GPU info intel_gpu_top # Intel GPU info
Configuration Files:
# MPV ~/.config/mpv/mpv.conf # VLC ~/.config/vlc/vlcrc # MPlayer ~/.mplayer/config # Kodi ~/.kodi/userdata/guisettings.xml