Top Related Projects
VLC media player - All pull requests are ignored, please use MRs on https://code.videolan.org/videolan/vlc
Kodi is an award-winning free and open source home theater/media center software and entertainment hub for digital media. With its beautiful interface and powerful skinning engine, it's available for Android, BSD, Linux, macOS, iOS, tvOS and Windows.
Mirror of https://git.ffmpeg.org/ffmpeg.git
MPC-HC's main repository. For support use our Trac: https://trac.mpc-hc.org/
The Free Software Media System
The modern video player for macOS.
Quick Overview
mpv is a free, open-source, and cross-platform media player. It supports a wide variety of video file formats, audio formats, and subtitle formats, and offers a minimalist yet powerful command-line interface along with a basic GUI.
Pros
- Lightweight and efficient, with low resource usage
- Highly customizable through config files and scripts
- Excellent video quality with advanced scaling algorithms
- Extensive keyboard shortcuts for quick control
Cons
- Steep learning curve for advanced features
- Minimal GUI, which may not appeal to all users
- Less user-friendly for beginners compared to some other media players
- Limited built-in playlist management features
Getting Started
To get started with mpv:
- Download mpv from the official website or your package manager.
- Install it on your system.
- Open a terminal or command prompt.
- Run mpv with a video file:
mpv path/to/your/video.mp4
- Use keyboard shortcuts to control playback:
- Space: Play/Pause
- Left/Right arrows: Seek backward/forward
- 9/0: Decrease/Increase volume
- q: Quit
For more advanced usage, create a config file at ~/.config/mpv/mpv.conf
(Linux/macOS) or %APPDATA%\mpv\mpv.conf
(Windows) to customize settings:
# Example mpv.conf
vo=gpu
profile=gpu-hq
scale=ewa_lanczossharp
cscale=ewa_lanczossharp
video-sync=display-resample
interpolation
tscale=oversample
This configuration enables high-quality video output with improved scaling and interpolation.
Competitor Comparisons
VLC media player - All pull requests are ignored, please use MRs on https://code.videolan.org/videolan/vlc
Pros of VLC
- More feature-rich with a wide range of built-in codecs and streaming capabilities
- Cross-platform support with native GUI for various operating systems
- Extensive plugin ecosystem for additional functionality
Cons of VLC
- Larger codebase and resource footprint
- Less customizable and harder to integrate into other applications
- Slower development cycle for new features and updates
Code Comparison
VLC (C):
int libvlc_media_player_play(libvlc_media_player_t *p_mi)
{
vlc_player_t *player = p_mi->player;
vlc_player_Lock(player);
int ret = vlc_player_Start(player);
vlc_player_Unlock(player);
return ret;
}
MPV (C):
int mpv_play(mpv_handle *ctx)
{
return mpv_command(ctx, (const char*[]){"playlist-play-index", "current", NULL});
}
The code snippets show the play function implementation in both projects. VLC uses a more complex structure with locking mechanisms, while MPV relies on a simpler command-based approach.
Kodi is an award-winning free and open source home theater/media center software and entertainment hub for digital media. With its beautiful interface and powerful skinning engine, it's available for Android, BSD, Linux, macOS, iOS, tvOS and Windows.
Pros of XBMC
- Full-featured media center with a rich user interface and extensive customization options
- Supports a wide range of media formats and streaming services
- Offers add-ons and plugins for extended functionality
Cons of XBMC
- Heavier resource usage due to its comprehensive feature set
- Steeper learning curve for configuration and customization
- Slower startup time compared to lightweight players
Code Comparison
XBMC (C++):
bool CVideoPlayer::OpenInputStream()
{
if (m_pInputStream.use_count() > 1)
throw std::runtime_error("Input stream is in use");
m_pInputStream.reset();
m_pInputStream = CInputStreamFactory::CreateInputStream(m_item);
if (!m_pInputStream)
return false;
return true;
}
MPV (C):
int mp_input_add_cmd_fd(struct mp_input_src *src, int fd, int select,
void (*read_func)(void *ctx, int fd),
void *ctx, const char *name)
{
if (src->num_fds == MP_MAX_FDS)
return -1;
struct mp_input_fd *fds = &src->fds[src->num_fds++];
*fds = (struct mp_input_fd){
.fd = fd,
.select = select,
.read_func = read_func,
.ctx = ctx,
.name = name,
};
return 0;
}
Both projects use low-level programming languages for performance, but XBMC's codebase is more complex due to its extensive feature set, while MPV focuses on efficient media playback with a simpler architecture.
Mirror of https://git.ffmpeg.org/ffmpeg.git
Pros of FFmpeg
- Broader functionality: FFmpeg is a complete multimedia framework for encoding, decoding, and processing audio/video
- More extensive command-line tools for various multimedia tasks
- Larger community and more frequent updates
Cons of FFmpeg
- Steeper learning curve due to its extensive features and options
- Less user-friendly for simple playback tasks compared to mpv
- Requires more setup and configuration for basic media playback
Code Comparison
mpv:
mp.add_key_binding("ctrl+s", "screenshot", function()
mp.commandv("screenshot")
end)
FFmpeg:
ffmpeg -i input.mp4 -vf "select='eq(pict_type,I)'" -vsync vfr thumb%04d.png
The mpv example shows a simple Lua script for taking screenshots, while the FFmpeg example demonstrates a more complex command for extracting keyframes from a video.
FFmpeg offers more powerful and flexible multimedia processing capabilities, making it ideal for advanced users and developers. mpv, on the other hand, provides a more streamlined and user-friendly experience for media playback, with a focus on simplicity and performance.
Both projects have their strengths, and the choice between them depends on the specific use case and user requirements.
MPC-HC's main repository. For support use our Trac: https://trac.mpc-hc.org/
Pros of MPC-HC
- User-friendly interface with a traditional Windows look and feel
- Built-in codecs for easy playback of various file formats
- Lightweight and efficient, especially on older hardware
Cons of MPC-HC
- Development has slowed down, with less frequent updates
- Limited cross-platform support (primarily Windows-focused)
- Fewer advanced customization options compared to MPV
Code Comparison
MPC-HC (C++):
BOOL CMPlayerCApp::InitInstance()
{
// Initialize COM
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
// ... (initialization code)
}
MPV (C):
int mpv_main(int argc, char *argv[])
{
struct MPContext *mpctx = mp_create();
// ... (initialization code)
return mp_initialize(mpctx, argc, argv) ? -1 : 0;
}
Both projects use C/C++ for their core functionality, but MPV's codebase is generally considered more modular and extensible. MPC-HC's code is more tightly integrated with the Windows API, while MPV aims for greater platform independence.
The Free Software Media System
Pros of Jellyfin
- Full-featured media server with web interface, transcoding, and user management
- Supports a wide range of client devices and platforms
- Open-source alternative to proprietary media servers like Plex or Emby
Cons of Jellyfin
- More complex setup and configuration compared to MPV's simplicity
- Higher resource usage due to server-client architecture and transcoding features
- Steeper learning curve for users new to media server software
Code Comparison
MPV (player.c):
int mpv_play(mpv_handle *ctx)
{
return mpv_command(ctx, (const char*[]){"playlist-play-index", "current", NULL});
}
Jellyfin (MediaBrowser.Controller/Playback/PlaybackManager.cs):
public async Task Play(PlayRequest request)
{
var result = await GetPlaybackInfo(request).ConfigureAwait(false);
await PlayInternal(request, result).ConfigureAwait(false);
}
While MPV focuses on direct playback control, Jellyfin's code demonstrates its server-side playback management with asynchronous operations and more complex request handling.
The modern video player for macOS.
Pros of IINA
- Modern, user-friendly macOS-native interface
- Built-in features like picture-in-picture and touch bar support
- Extensive customization options through preferences panel
Cons of IINA
- Limited to macOS platform
- May have slightly higher resource usage due to additional features
- Potentially slower update cycle compared to mpv
Code Comparison
IINA (Swift):
override func viewDidLoad() {
super.viewDidLoad()
playerCore.startMPV()
setupUIAndObservers()
}
mpv (C):
int main(int argc, char *argv[])
{
mpv_handle *ctx = mpv_create();
mpv_initialize(ctx);
mpv_command_string(ctx, "loadfile test.mp4");
mpv_wait_event(ctx, -1);
}
Summary
IINA is a macOS-specific media player built on top of mpv, offering a more polished and user-friendly experience for Mac users. It includes additional features and a native interface but is limited to a single platform. mpv, on the other hand, is a cross-platform, lightweight player with broader compatibility and potentially faster updates. The choice between the two depends on the user's platform preference and desired feature set.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
mpv
- External links
- Overview
- System requirements
- Downloads
- Changelog
- Compilation
- Release cycle
- Bug reports
- Contributing
- License
- Contact
External links
Overview
mpv is a free (as in freedom) media player for the command line. It supports a wide variety of media file formats, audio and video codecs, and subtitle types.
There is a FAQ.
Releases can be found on the release list.
System requirements
- A not too ancient Linux (usually, only the latest releases of distributions are actively supported), Windows 10 1607 or later, or macOS 10.15 or later.
- A somewhat capable CPU. Hardware decoding might help if the CPU is too slow to
decode video in realtime, but must be explicitly enabled with the
--hwdec
option. - A not too crappy GPU. mpv's focus is not on power-efficient playback on
embedded or integrated GPUs (for example, hardware decoding is not even
enabled by default). Low power GPUs may cause issues like tearing, stutter,
etc. On such GPUs, it's recommended to use
--profile=fast
for smooth playback. The main video output uses shaders for video rendering and scaling, rather than GPU fixed function hardware. On Windows, you might want to make sure the graphics drivers are current. In some cases, ancient fallback video output methods can help (such as--vo=xv
on Linux), but this use is not recommended or supported.
mpv does not go out of its way to break on older hardware or old, unsupported operating systems, but development is not done with them in mind. Keeping compatibility with such setups is not guaranteed. If things work, consider it a happy accident.
Downloads
For semi-official builds and third-party packages please see mpv.io/installation.
Changelog
There is no complete changelog; however, changes to the player core interface are listed in the interface changelog.
Changes to the C API are documented in the client API changelog.
The release list has a summary of most of the important changes on every release.
Changes to the default key bindings are indicated in restore-old-bindings.conf.
Compilation
Compiling with full features requires development files for several external libraries. Mpv requires meson to build. Meson can be obtained from your distro or PyPI.
After creating your build directory (e.g. meson setup build
), you can view a list
of all the build options via meson configure build
. You could also just simply
look at the meson_options.txt
file. Logs are stored in meson-logs
within
your build directory.
Example:
meson setup build
meson compile -C build
meson install -C build
For libplacebo, meson can use a git check out as a subproject for a convenient way to compile mpv if a sufficient libplacebo version is not easily available in the build environment. It will be statically linked with mpv. Example:
mkdir -p subprojects
git clone https://code.videolan.org/videolan/libplacebo.git --depth=1 --recursive subprojects/libplacebo
Essential dependencies (incomplete list):
- gcc or clang
- X development headers (xlib, xrandr, xext, xscrnsaver, xpresent, libvdpau, libGL, GLX, EGL, xv, ...)
- Audio output development headers (libasound/ALSA, pulseaudio)
- FFmpeg libraries (libavutil libavcodec libavformat libswscale libavfilter and either libswresample or libavresample)
- libplacebo
- zlib
- iconv (normally provided by the system libc)
- libass (OSD, OSC, text subtitles)
- Lua (optional, required for the OSC pseudo-GUI and youtube-dl integration)
- libjpeg (optional, used for screenshots only)
- uchardet (optional, for subtitle charset detection)
- nvdec and vaapi libraries for hardware decoding on Linux (optional)
Libass dependencies (when building libass):
- gcc or clang, yasm on x86 and x86_64
- fribidi, freetype, fontconfig development headers (for libass)
- harfbuzz (required for correct rendering of combining characters, particularly for correct rendering of non-English text on macOS, and Arabic/Indic scripts on any platform)
FFmpeg dependencies (when building FFmpeg):
- gcc or clang, yasm on x86 and x86_64
- OpenSSL or GnuTLS (have to be explicitly enabled when compiling FFmpeg)
- libx264/libmp3lame/libfdk-aac if you want to use encoding (have to be explicitly enabled when compiling FFmpeg)
- For native DASH playback, FFmpeg needs to be built with --enable-libxml2 (although there are security implications, and DASH support has lots of bugs).
- AV1 decoding support requires dav1d.
- For good nvidia support on Linux, make sure nv-codec-headers is installed and can be found by configure.
Most of the above libraries are available in suitable versions on normal Linux distributions. For ease of compiling the latest git master of everything, you may wish to use the separately available build wrapper (mpv-build) which first compiles FFmpeg libraries and libass, and then compiles the player statically linked against those.
If you want to build a Windows binary, see Windows compilation.
Release cycle
Once or twice a year, a release is cut off from the current development state and is assigned a 0.X.0 version number. No further maintenance is done, except in the event of security issues.
The goal of releases is to make Linux distributions happy. Linux distributions are also expected to apply their own patches in case of bugs.
Releases other than the latest release are unsupported and unmaintained.
See the release policy document for more information.
Bug reports
Please use the issue tracker provided by GitHub to send us bug reports or feature requests. Follow the template's instructions or the issue will likely be ignored or closed as invalid.
Questions can be asked in the discussions or on IRC (see Contact below).
Contributing
Please read contribute.md.
For small changes you can just send us pull requests through GitHub. For bigger changes come and talk to us on IRC before you start working on them. It will make code review easier for both parties later on.
You can check the wiki or the issue tracker for ideas on what you could contribute with.
License
GPLv2 "or later" by default, LGPLv2.1 "or later" with -Dgpl=false
.
See details.
History
This software is based on the MPlayer project. Before mpv existed as a project, the code base was briefly developed under the mplayer2 project. For details, see the FAQ.
Contact
Most activity happens on the IRC channel and the GitHub issue tracker.
- GitHub issue tracker: issue tracker (report bugs here)
- Discussions: discussions
- User IRC Channel:
#mpv
onirc.libera.chat
- Developer IRC Channel:
#mpv-devel
onirc.libera.chat
Top Related Projects
VLC media player - All pull requests are ignored, please use MRs on https://code.videolan.org/videolan/vlc
Kodi is an award-winning free and open source home theater/media center software and entertainment hub for digital media. With its beautiful interface and powerful skinning engine, it's available for Android, BSD, Linux, macOS, iOS, tvOS and Windows.
Mirror of https://git.ffmpeg.org/ffmpeg.git
MPC-HC's main repository. For support use our Trac: https://trac.mpc-hc.org/
The Free Software Media System
The modern video player for macOS.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot