Bomi is a powerful mpv-based media player


To watch movies on a computer, each user has his own favorite player:
  • the one to which he is accustomed;
  • the one he customized for his beloved;
  • player who won't let you down.

And the question “how to watch movies” has long been closed for him.
But progress does not stand still, new software appears, new approaches to image processing, old libraries receive updates. Therefore, I propose to take a look at one opensource project that has become widespread in narrow circles :-)

Meet, mpv media player.

Story

The history of mpv player begins in 2012, when a group of enthusiasts decided to make their own version of a media player. But they didn’t start from scratch, but “forked” the great and mighty MPlayer, which at that time was the “de facto” standard for viewing videos in the world of free software. In other words, they took the MPlayer source codes and began to build their application based on them. In the world of open source software, this is common practice and there is nothing wrong with it. The main thing is to comply with all formalities with license agreements.

Mpv is actively developing. The following command shows us that in less than 2 months since the beginning of the year, 248 commits were made, which indirectly indicates active development. The latest stable version dates back to 02/14/2018.

Git clone https://github.com/mpv-player/mpv.git git log --since="2018-01-01" | egrep "Author:" | wc -l

MPlayer has not released any updates for a long time (the latest stable version dates back to 02/16/2016). There are some movements in the development branch, but not as active as we would like:

Svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer svn log --limit 100 | egrep 2018 | wc -l 8 commit"s

only 8 commits.

Advantages

The main advantages of mpv for me are:

  • support for all kinds of video formats (all codecs are taken from);
  • no need to install the application (download the file and use it immediately);
  • support for video accelerators;
  • working with Vaporsynth (more on that later);
  • Linux and Windows support;
  • support for custom scripts (interface, video filters, statistics);

Well, as a bonus that inspires confidence and adds weight and seriousness to the entire project, these are libraries. Mpv is essentially a framework, so the user is given not only the opportunity to download the player and watch movies, but also use libraries to write his own media player (by the way, many have done this). and then sell it.

Installation

Installing MPV is no different from installing other media players. You can install ready-made packages (Linux, Windows), or you can build them from sources.

Ready-made packages

Ubuntu

Installation on Ubuntu does not raise any issues. The sequence of actions is standard: add a repo, update, install the package.

Sudo add-apt-repository ppa:mc3man/mpv-tests sudo apt-get update sudo apt-get install mpv

CentOS

The same steps in CentOS:

Yum -y install http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm yum update yum install vlc smplayer ffmpeg mpv

Windows

MPV for Windows is distributed as an executable file and several supporting libraries. There is no installer as such. There is no need to install anything. Download the required assembly from this page: https://mpv.srsfckn.biz/. And you can watch the movie right away:

Just run mpv.exe and drag the movie file into the window that appears.

Android

Mpv has its own port for Android. You can download the application from Play Market:

https://play.google.com/store/apps/details?id=is.xyz.mpv&hl=ru

Build from source

Here's the interesting part 🙂 MPV depends on several packages, such as FFmpeg and libass. Before you can build MPV, you will first have to build and install dependencies in the system. And then dependencies dependencies and so on. This is Linux :) In order not to bother with this, you can download an assembly script from the network, which will do it all itself (well, almost everything).

But before the script, you need to install NVidia drivers and SDK. This is only if you want to watch movies using gpu.

Download the latest SDK for your platform:

https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64

And then we run the installer, which will do everything itself:

Cuda_9.1.85_387.26_linux.run

Download the script from github, which I mentioned above and which will help us with assembling mpv from sources:

Git clone https://github.com/mpv-player/mpv-build.git

The script itself will “pull up” the necessary dependencies, but you will have to install something yourself:

Sudo apt-get install autoconf automake libfribidi-dev libasound2-dev libegl1-mesa-dev libfontconfig-dev libfreetype6-dev libfribidi-dev libgl1-mesa-dev libtool libx11-dev libxext-dev libxinerama-dev libxrandr-dev libxv-dev pkg- config python x11proto-core-dev nasm yasm libxss-dev

Go to the mpv-build folder

CD mpv-build

And we start the build process on 4 cores:

./rebuild -j4

During the build, the script downloads the latest versions of the libraries, builds them, and then statically (which means “statically” can be read) builds mpv using these libraries.

While building mpv from sources, this summary will appear on the screen, your task is to ensure that there are no red lines here (you just need to install the packages). The fact is that mpv will work with red lines, but some functionality will be lost.

The result of the script will be one file: mpv. It is located here:

Cd mpv/build

The file size is impressive, because all codecs were “linked” into player:

Watching a movie

Now the most interesting thing - how to watch a movie?

CPU usage

To watch a movie using mpv on the command line, just type:

./mpv ~/sample4kvideo.mp4 --log-file mpv.log

If you run mpv with default settings (without using additional keys), then the processor will decode the video stream. If the processor is low-power, then it may not cope with decoding and the movement in the frame will be jerky, “drops” will appear. Unable to cope with the information flooding into it, the processor will begin to skip frames. For example, in the following example you can see how the Intel i-7 cannot process all frames of 4k video and began to “drop”. Here, for example, is the output of the mpv command in the console:

$ ./mpv ~/sample4kvideo.mp4 --log-file mpv.log can"t find selected font provider AV: 00:00:24 / 00:01:47 (23%) A-V: 0.421 Dropped: 8 Audio/Video desynchronization detected! Possible reasons include too slow hardware, temporary CPU spikes, broken drivers, and broken files. Audio position will not match to the video (see A-V status field) 31%) A-V: 0.403 Dropped: 22 Audio/Video desynchronization detected! Possible reasons include too slow hardware, temporary CPU spikes, broken drivers, and broken files. 00:00:34 / 00:01:47 (31%) A-V: 0.573 Dropped: 28

The recorded log file shows that the central CPU was selected for video decoding and the line “Using software decoding” directly indicates this:

[ 0.149][v] Using software decoding. [ 0.149][v] Detected 8 logical cores. [ 0.149][v] Requesting 9 threads for decoding. [ 0.151][v] Selected codec: h264 (H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10)

GPU usage

Mpv allows you to use the power of the graphics accelerator to watch a movie. All the work of decoding the video stream is taken over by the graphics core. On systems with a weak central processing unit (CPU), the help of the gpu can be significant, especially when watching 4K video. In fact, you can get rid of “drops”, as is the case with using the CPU.

In mpv, the “hwdec” key is responsible for gpu support. With “—hwdec=auto” mpv itself will find the optimal way to run on a graphics accelerator:

./mpv --hwdec=auto --vo=opengl ~/sample4kvideo.mp4 --log-file mpv.log

There are no “drops” in output. And in the log the line “Using hardware decoding (nvdec)” clearly indicates that we used our video card to decode the video stream:

[ 0.287][i] Using hardware decoding (nvdec). [ 0.287][v] Decoder format: 3840x2160 cuda bt.709/bt.709/bt.1886/limited/auto CL=mpeg2/4/h264 (auto 0.000000/0.000000/0.000000) [ 0.287][v] 3840x2160 bt .709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264

In addition to viewing the log file, there is another way that the gpu was involved. To do this, while watching a movie, run “nvidia-smi” with the dmon key. The “dec” column will indicate the % load on the gpu when decoding video:

GUI for mpv

A number of media players with a familiar graphical shell are built on the basis of the mpv library. So if you are not tempted by launching a player from the console with a bunch of parameters, then there is the usual method with the GUI (windows, menus and buttons) :)

Baka

gnome-mpv

Same laconic as the previous one. Minimum settings. But it is included in the standard Ubuntu repository.

Sudo apt-get update sudo apt-get install gnome-mpv

SMPlayer

Compared to previous players based on the mpv library, this one is simply a monster. Allows you to configure both external (skins) and advanced video decoder options. There are builds for Linux and Windows:

https://www.smplayer.info/en/downloads

conclusions

In this article we got acquainted with mpv player - a free program for playing video and audio content. We looked at installation methods for Linux and Windows. We compiled mpv player from sources. We looked at a way to watch videos using a graphics accelerator.

What was not included in this review:

  • using scripts to configure the interface and properties of the video decoder;
  • setting advanced mpv parameters for the graphics accelerator;
  • advanced options when building from source;
  • connection with Vaporsynth.

SMPlayer can now work with both MPlayer and MPV. What are MPlayer and MPV?

SMPlayer cannot play files on its own. For this he needs playback engine. Until now, SMPlayer has only used MPlayer as its playback engine. But now you can also use MPV.

What is MPV?

mpv is a player with new features and fixes, based on MPlayer.

The most interesting features:

  • Ability to display a couple of subtitles simultaneously
  • Play videos from YouTube, DailyMotion, Vimeo, Vevo and many others.
  • Support for linking in MKV
  • Precise rewind
  • Built-in support for VAAPI and VDA. Improved VDPAU
  • Improved ability to take screenshots.
  • Frame back

How to install MPV

Windows

The Windows installer allows you to select the playback engine to install. Just click on "Playback Engine" and select MPV.

Linux

Visit http://mpv.io/installation/ to get the latest version of MPV for your distribution.
Ubuntu 12.04 (Precise) and 14.04 (Trusty) users can find MPV 0.15.0 at


Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by enabling javascript or Try ConvertXtoDVD Free trial ! :)

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial! :)


Description

mpv is a video player and a fork of mplayer2 and MPlayer. It shares some features with the former projects while introducing many more. While mpv has no official GUI, it has a small controller that is triggered by mouse movement. mpv has an OpenGL based video output that is capable of many features loved by videophiles, such as video scaling with popular high quality algorithms, color management, frame timing, interpolation, and more.

Latest version 0.29.1 / 20190714 Nightly (July 14, 2019)

Download

Visit developer's site

Software License Free software / FOSS (Free download and also Free and Open Source Software)

Supported operating systems Linux

Version history / Release notes / Changelog

Release v0.29.1

Notable Changes for 2018-10-02

Fixes and Minor Enhancements
af_rubberband: Fix for A-V drift on seeking.
demux_lavf: Fix EDL playback of certain DASH streams.
demux_lavf: Mark v4l streams as not seekable.
demux_raw: Fix for gapless playback from raw audio input.
encode: Fix for crashes in case of failure to write to output.
encode: Fix for encoding when utilizing lavfi-complex.
Fix to strip HDR peak metadata if attached to SDR video (#6111)
manpage: Misc fixups.
stream_(smb,file): Fix for partial writes to buffers.
stream_libarchive: Fix hang when an out-of-bound seek happens.
vo_gpu: Fix for corruption when multiple compute shaders override each others" block sizes (#6083).
ytdl_hook: Always load "ytdl://" URLs with ytdl_hook first.
ytdl_hook: Fix audio streams not being picked up for some sites.
v0.29.0

Notable Changes for 2018-07-31
This build of mpv 0.29.0 has updated dependencies only:

Crossc 1.3.0+1.g771aad0
potentially fixes some HDR issues (#5960)
ffmpeg 4.1+809.g269daf5985
fribidi 1.0.5
harfbuzz 1.8.4
lcms2 2.9+22.gc2a1cd9
libaom 1.0.0+267.g1f5901759
also fixed a performance issue due to libaom’s idiotic build system (#6001)
libgme 0.6.2+92.g9b23759
libgpg-error 1.32
libjpeg-turbo 2.0.0+0.g574f3a7
libmysofa 0.6+45.g03a73fc
libvpx 1.7.0+734.g2eba08668
x265 2.8+58.h613074c6714f
zimg 2.7.5+31.g654c15b

This release requires FFmpeg 4.0 or newer.

Features
Added
ao/openal: Add better sample format and channel layout selection
ao/openal: Add support for direct channels output
cocoa-cb: initial implementation via opengl-cb API
context_drm_egl: Introduce 30bpp support (requires Mesa 18.0.0_rc4 or later)
osx: add some more menu bar items as suggested by Apples's HIG
vo_gpu: make screenshots use the GL renderer (#5498, #5240)
x11: support Shift+TAB as an input key bind (#5849)
ytdl_hook: support native dash demuxer, if present
Changed
ao_alsa, ao_pulse: reduce requested buffer size
audio: change format negotiation, remove channel remix fudging
client API: deprecate opengl-cb API and introduce a replacement API
demux: lower demuxer cache default sizes from 400MB/400MB to 50MB/150MB
osx: always deactivate the early opengl flush on macOS
scripting: change when/how player waits for scripts being loaded
vo_gpu: various improvements to HDR peak detection
vo_gpu: various improvements to HDR tone mapping
wayland_common: update to stable xdg-shell
ytdl_hook: parse youtube playlist urls to set start index if --ytdl-raw-option=yes-playlist= is specified
Deprecated
af_lavrresample: deprecate this filter
Removed
build: drop support for SDL1 (only applied to ao_sdl)
Options and Commands
Added
add a number of --audio-resample-* options, which should from now on be used instead of --af-defaults=lavrresample:
ao/openal: --openal-direct-channels
command: add --osd-on-seek option defaulting to bar
command: add a change-list command (#5435)
options: add --http-proxy
options: add a builtin low-latency profile
vaapi: add option to select a non-default device path with --vaapi-device (#4320)
video: add option to reduce latency by 1 or 2 frames
vo_gpu: introduce --target-peak (#5521)
Changed
command: change cycle-value command behavior (#5772)
config: replace config dir lua-settings/ with dir script-opts/
options: --lavfi-complex now requires uniquely named filter pads.
options: --ytdl is now always enabled, even for libmpv
options: make --deinterlace=yes always deinterlace (#5219)
options: slightly improve filter help output for lavfi bridge
vo: rename --vo=opengl-cb to --vo=libmpv
Deprecated
encoding: deprecate a bunch of obscure options (--ovoffset, --oaoffset, --ovfirst, --oafirst)
options: deprecate --vf-defaults and --af-defaults
osx: --gpu-context=cocoa with --gpu-api=opengl is now deprecated in favor of --vo=libmpv
Removed
command: remove an old compatibility hack that allowed CLI aliases to be set as property, deprecated in 0.26.0
input: remove legacy command handling for MPlayer commands that were deprecated in 2013
options: drop --opensles-sample-rate, as --audio-samplerate should be used if desired
options: drop deprecated --videotoolbox-format, --ff-aid, --ff-vid, --ff-sid, --ad-spdif-dtshd, --softvol options
options: remove --video-stereo-mode
options: remove deprecated ao/vo auto profiles
options: remove the following encoding options: --ocopyts (now the default, old timestamp handling is gone), --oneverdrop (now default), --oharddup (you need to use --vf=fps=VALUE), -- ofps, --oautofps, --omaxfps
Fixes and Minor Enhancements
HIDRemote: fix volume buttons on macOS 10.13 (#5721)
TOOLS/autoload: Fix broken "disabled" option
TOOLS/autoload: be more robust with slow directory listings (#5618)
ao_sdl: fix default buffer size
build: add static libraries to libmpv.pc
build: bump waf to 2.0.9 (fixes Python 3.7 compatibility)
build: manually add standard library search paths for linking (#5791)
common: round all integer times to milliseconds
demux, player: fix playback of sparse video streams (w/ still images)
demux: support for some kinds of timed metadata (e.g. ICY)
demux_mkv: add V_AV1 identifier for AV1
demux_mkv: support Meridian Lossless Packing in Matroska (#5923)
display additional metadata tags during video playback
drm_atomic: Fix memory leaks in drm_atomic_create
enable cache for FUSE filesystems on OpenBSD and FreeBSD
gpu: prefer 16bit floating point FBO formats to 16bit integer ones
hwdec_vaegl: Fix VAAPI EGL interop used with gpu-context=drm
input.conf: use exact value for [ binding, which does the inverse of ]
input: add a keybinding to toggle hardware decoding
input: minor additions to default key bindings (#973)
osc: fix accidentally skipping files when seeking with slider
player: fix strange behavior on edition switching
player: fix track autoselection of external files yet again
terminal-unix: stop trying to read when terminal disappears (#5842)
video: actually wait for last frame being rendered on EOF
video: fix --video-rotate in some cases
video: fix crash with vdpau when reinitializing rendering (#5447)
vo_gpu: fix anamorphic screenshots (#5619)
vo_vdpau: fix resizing and rotation problems
This listing is not complete. Check DOCS/client-api-changes.rst for a history
of changes to the client API, and DOCS/interface-changes.rst for a history
of changes to other user-visible interfaces.

A complete changelog can be seen by running git log v0.28.2..v0.29.0
in the git repository or by visiting either
v0.28.2...v0.29.0 or
https://git.srsfckn.biz/mpv/log/?qt=range&q=v0.28.2..v0.29.0


View full changelog

All features

Streamlined CLI options

MPlayer's options parser was improved to behave more like other CLI programs, and many option names and semantics were reworked to make them more intuitive and memorable.

On Screen Controller

While mpv has no official GUI, it has a small controller that is triggered by mouse movement.

High quality video output

Mpv has a OpenGL based video output that is capable of many features loved by videophiles, such as video scaling with popular high quality algorithms, color management, frame timing, interpolation, and more.

GPU video decoding

Mpv leverages the FFmpeg hwaccel APIs to support VDPAU, VAAPI, DXVA2, VDA and VideoToolbox video decode acceleration.

A straightforward C API was designed from the ground up to make mpv usable as a library and facilitate easy integration into other applications.

Active development

Mpv is under active development, focusing on code refactoring and cleanups as well as adding features.

Sections/Browse similar tools

Guides and How to"s

Acronyms/Also Known As mpv media player

Notify me when software updated or report software Email me when it has been updated Report this software (dead link/new version)

6 reviews, Showing 1 to 5 reviews

I"m really liking this media player. Once you learn the keyboard commands, you"re all set. Simply drag your media file into the mpv window, sit back, and enjoy. Below are a few of the key controls I use frequently.

Volume Up = 0
Volume Down = 9
Full Screen = f
Exit Full Screen = ESC
Original Video Size = ALT+1
Double Video Size = ALT+2
Enable OSD = DEL
Disable OSD=DEL
Quit and Close mpv = q

All key controls are listed at the link below.

https://mpv.io/manual/stable/

Definitely give mpv a try. It"ll be even better when more Windows frontends are available for it.

Rating
Rating from 0-10.

Browse software by sections

The reason for the creation of the fork was, among other things, overly conservative policies MPlayer to maintain old code, even if it is of extremely low quality. In the project's boundaries MPlayer2 A lot of work has already been done to clean up the code base, but the project MPlayer2 develops too slowly. One can even say that today its development has practically ceased.
The purpose of the project MPV is to create a product in which a continuous process of transferring innovations from repositories will be established mplayer-svn And mplayer2, and also increased the intensity of development, including by eliminating backward compatibility with MPlayer.

From differences from MPlayer2 can be distinguished:

Cleaning the code base from obsolete components.
- Integration of funds for direct playback of content from popular media sites(for example, "mpv https://www.youtube.com/watch?...");
- Improved output implementation using OpenGL;
- Return video encoding tools;
- Improved on-screen display (OSD) based on libass and fully supporting Unicode;
- More concise and not overloaded with information output of statistics to the console;
- Improved support for cue files;
- Support for outputting color subtitles;
- Expanded capabilities for creating screenshots, etc.

Those wishing to test MPV in Ubuntu 13.10 and 14.04 can do this by installing it with the following commands in the terminal:

sudo add-apt-repository ppa:mc3man/mpv-tests
sudo apt-get update
sudo apt-get install mpv


Although the player MPV and is console-based, unlike Mplayer And Mplayer2, it practically does not need a graphical shell (like SMPlayer), since control is carried out through a convenient auto-appearing transparent panel directly on the image. Of course, all standard hotkeys are supported Mplayer, For example:
Key Description
p Pause/play.
Space Pause/play.
Left arrow Go back 10 seconds.
Right Arrow Skip forward 10 seconds.
Arrow to down Go back one minute.
Up arrow Skip forward one minute.
< Go back through the playlist.
> Skip forward through the playlist.
m Turn off the sound.
0 Turn it up louder.
9 Make lower.
f Switch to full screen mode or back.
o Show OSD statistics.
j Switch between possible subtitle options.
# (Shift+3) Switch between possible audio track options.
I (Shift+i) Show file name.
1, 2 Adjusting the contrast.
3, 4 Setting the color scheme.

After installation, the player is built into the context menu RMB in the file manager for all multimedia files (right click on the file).
Basic Settings MPV can be specified in the file /home/username/.mpv/config(or /home/username/.config/mpv/mpv.conf, depending on the version). Personally, I created this simple config for myself, you can use it as an example:

save-position-on-quit=yes
fullscreen=yes
hwdec=vdpau
ao=alsa

Pay attention to the first line - remembering the file playback position when exiting. "Naked" Mplayer, without a shell, it can’t do that! More complete list of parameters. Describe all functions and capabilities MPV within the framework of this article there is no point, due to their absolute immensity.

For all lovers of healthy minimalism.
Good luck with your experiments

Description

The MPV project is developing a new open video player, built on the basis of a fork from the MPlayer2 codebase. The project code is distributed under the GPLv3 license. Out of the box it supports hardware video acceleration using vdpau and vaapi.

Installing MPV with GUI

Only for Ubuntu 12.10 and later

You can install the GUI version from the ppa repository. To install, just add the ppa to the list of repositories:

sudo add-apt-repository ppa:mc3man/mpv-tests

And install the player from it:

sudo apt-get update && sudo apt-get install mpv

Playing video from a command line is carried out with the command:

Mpv "video file name"

If there is no configuration file, create it:

touch ~/ .config/ mpv/ config

    For Nvidia and AMD video cards with free driver:

save-position-on-quit=yes fullscreen =yes #Selecting the optimal decoder hwdec =vdpau subcp =enca:ru:utf8

    For Intel video cards:

#Remember position when exiting save-position-on-quit=yes #Start playing in full screen mode fullscreen =yes #Selecting the optimal decoder hwdec=vaapi #Fixing a problem with Windows subtitle encoding subcp =enca:ru:utf8

MPV and H.265 on proprietary Nvidia driver

Since at the time of the last editing of this item (May 9, 2017), vdpau, even on the newest video cards, cannot work with H.265 profiles other than HEVC_MAIN, you can use the cuda decoder to play such files using a video card. To do this, you can run mpv like this

Mpv "file name" -hwdec =cuda

Or even write it in the config

hwdec=cuda

Player default setting

To set the MPV player as the default, you need to go to System Settings → System Information → Default Applications and then specify for Video player MPV.

Basic keyboard shortcuts (default)

Rewind

    ← → - Rewind/forward 5 seconds.

    Shift + ← Shift + → - Rewind/forward 1 second.

    ↓ - Rewind/forward 1 minute.

    Shift + Shift + ↓ - Rewind/forward 5 seconds.

Subtitles

    Ctrl + ← Ctrl + → - Previous/next subtitles. Subject to some restrictions and may not work at times.

    V - Turns subtitles on/off.

    J / J - Scroll through available subtitles.

    X Z - Adjust the subtitle delay by +/- 0.1 second.

Playback speed

    [ - Reduces playback speed by 10%.

    ] - Increases playback speed by 10%.

    ( - Reduces playback speed by 2 times.

    ) - Increases playback speed by 2 times.

    ← Backspace - Sets normal playback speed.

Playback Control

    Step forward. Pressing once will pause playback. Subsequent clicks will play the next frame one at a time.

    Step back. Pressing once will pause playback. Subsequent clicks will play back one previous frame at a time.

    < >- Move backwards/forwards through the playlist.

    ↵ Enter - Next position in the playlist.

    P / ␣ Space - Pause/resume playback.

    Q - Stop playback and exit.

    Q - Like q but retains the current position. When you reopen the file, playback will, if possible, start from the point where Q was pressed.

Sound control