Friday, June 13, 2014

Mpv a Better Mplayer?

You may have seen references here and elsewhere to a new kid on the video-player block called Mpv. It's a fork of Mplayer2, which is a fork of Mplayer, which must be feeling so inadequate right now. So how does Mpv compare? It has a few new features but is generally the same as Mplayer, a shell-based video player with a thousand options under the hood. So I thought I'd do a little test comparison, running the same files through each player and see how they measure up in CPU usage. Just for kicks, I'll throw in VLC, too.

For my testing, I used a Powerbook with a 1.5 GHz G4 running Debian Wheezy. As Mpv is only available in the Jessie repository, getting it on Wheezy was a bit of a pain but possible. Also, I used three movie files to compare: a black and white 640 X 480 Xvid file, and two color 720p files, one an mp4 and the other an mkv. This testing isn't all that rigorous or in-depth, but I think it's useful as a general impression and might be an eye-opener. On to the numbers!

I'm too lazy for tables, so here are the CPU percentages for the standard def Xvid (rough average after a few minutes of playing):

Mplayer – 26%-28%
Mplayer2 – 30%
Mpv – 30%
VLC – 34%

And the 720p mp4:

Mplayer – 60%
Mplayer2 – 78%
Mpv – 65%
VLC – 76%

The 720p mkv maxed out the CPU with heavy frame skipping, so the following results are with the skiploopfilter=all option:

Mplayer – 100%, occasional frame skipping
Mplayer2 – 100%, constant frame skipping
Mpv – 100%, occasional frame skipping
VLC – 100%, constant frame skipping

So for CPU efficiency, Mplayer still comes out the best, but Mpv is a definite improvement over Mplayer2. As some additional information, I only used the drop late frames option on the first two files, passed as "-framedrop" in Mplayer & Mplayer2 and "--framedrop=vo" in Mpv (VLC has a corresponding option in its preferences). I also set my file manager to launch these files with a double-click, so I didn't launch them from a terminal.

None of this means Mplayer is automatically a better choice than Mpv. Mpv has several new features, like an improved onscreen display and it can also stream HTTPS links which Mplayer can't. Lately Youtube's been throwing up HTTPS links for its videos, so Mpv is a necessity unless you use Youtube-dl and its --prefer-insecure hack (no longer working) [and for a debate on the etymological propriety of insecure vs. unsecure as can only be found on Github, look here!].

Also, Debian maintainers are having one of their periodic Olympus Mons-sized insanity episodes by eliminating Mplayer from Sid:



Yeah. That happened.

Sid and Jessie users can still get Mplayer from the deb-multimedia.org repositories, but still, Mplayer not part of your distro? Whuh?

I think I mentioned in another post that Mpv worked on G3s out of the box, whereas Mplayer (and VLC) had to be compiled with the "--disable-altivec" configure option. I recently found that the Mplayer and VLC from deb-multimedia.org worked perfectly fine on my G3 running Jessie. I don't know if this is true for Wheezy, but it might be worth a look.

And one last video note for OS X users, Adam A.'s Youtube-dl GUI, PPC Media Center, got a recent update with some Comedy Central fixes among other improvements, so download the latest from that linked post :)