Efficient MKV H.264 player with GPU decoding for Mac OS X
I regularly watch MKV files with H.264 1080p video on my retina MBP 15" (late 2013, Intel GPU only), and up until now, I did so using the latest version of VLC. Unfortunately the battery drains pretty quickly with this setup and I decided to investigate alternatives. In trying to be a little scientific, I created a spreadsheet listing the CPU time used (checked in Activity Monitor) for each alternative that I tested. For all testing, I played the first 1 minute of a video clip of my choosing, with H.264 1080p video and DTS audio, as well as remuxing it to M4V format using MP4Tools, and in the process transcoding the audio to AAC 2-channel (the video was untouched). I measured the CPU time used after playing this first minute of the clip in Activity Monitor. Tests were performed with the computer plugged in to AC, and the resolution set to 1920 x 1200 (recall this is a retina MBP 15"). The video was playing in the foreground, in windowed mode, maximized to use all the horizontal resolution available.
The baseline is QuickTime Player, playing the M4V version of the file, with hardware accelerated decoding supposedly enabled. This used up 4.51 CPU seconds.
Using VLC version 2.12, I got the following results:
- MKV file, software decoding: 28.89 CPU seconds;
- MKV file, hardware accelerated decoding: 22.82 CPU seconds;
- M4V file, software decoding: 29.76 CPU seconds;
- M4V file, hardware accelerated decoding: 22.44 CPU seconds.
In MPlayerX version 1.0.21 (1718), I got the following results (no mention is made to hardware acceleration since I couldn't find a way to enable or disable it, and have no idea what is the default behavior):
- MKV file: 15.92 CPU seconds;
- M4V file: 15.74 CPU seconds.
Finally I tried Movist version 1.3.3, which supports using QuickTime or FFmpeg as the decoder, and also has a checkbox for hardware acceleration. However, I was unable to decode the MKV version of the file using the QuickTime decoder. The results are:
- MKV file, software decoding, FFmpeg decoder: 31.96 CPU seconds;
- MKV file, hardware accelerated decoding, FFmpeg decoder: 8.31 CPU seconds;
- M4V file, software decoding, FFmpeg decoder: 30.73 CPU seconds;
- M4V file, hardware accelerated decoding, FFmpeg decoder: 9.04 CPU seconds;
- M4V file, software decoding, QuickTime decoder: 37.03 CPU seconds;
- M4V file, hardware accelerated decoding, QuickTime decoder: 8.12 CPU seconds.
As can be seen, Movist using the FFmpeg decoder and hardware accelerated decoding is the most efficient alternative compared to VLC or MPlayerX, but still noticeably less efficient than QuickTime at decoding M4V files. The ideal solution would be playing MKV under QuickTime Player, but it appears Perian no longer works in Mavericks.
Give MPV a shot. The project is located on github if you wish to compile your own version. Information on compiling can be found here.
It aims to cut out the legacy code of mplayer and bring together the benefits of mplayer2. The result is quite impressive, though still in its infancy for OS X.
Unofficial builds can be found here. I am testing mpv_20131222004653_git-4833e92 compiled on Dec 22, 2013 and can tell you it works.
Additionally, you may wish to adopt some of the better configuration options, as outlined by pigoz himself.
As per your question, you may want to focus directly on opengl-hq
which focused directly on offloading the video stream to the GPU.
In my testing, I've found MPV to trump MPlayer OSX Extended by up to half while playing back MKV files.