Video player with hardware acceleration (save battery)

Discussion in 'Digital Video' started by Roman2K~, Jun 28, 2015.

  1. Roman2K~, Jun 28, 2015
    Last edited: Aug 1, 2015

    Roman2K~ macrumors 6502a

    Joined:
    Mar 11, 2011
    #1
    Finally found one that works well on OS X, other than Quicktime which only supports the MP4 container for H264 videos.

    It's called mpv, a fork of mplayer2, itself a fork of MPlayer. Among the improvements, GPU video decoding. And it improves CPU usage a lot: 4 times more efficient in my experience. In other words, excellent news for battery life!

    Here's a quick comparison of CPU usage on an MKV (H264, AC3) on a base rMB, where "process" is a percentage relative to 400% (4 logical cores) used by the mpv process only and "global" is the global system+user percentage relative to 100% all processes included, as reported by Activity Monitor:
    • VLC (software): process = 32% / global = 15%
    • mpv (software): process = 26% / global = 13.5%
    • mpv (hardware): process = 7% / global = 10.5% :cool:
    Hardware acceleration isn't enabled by default. To enable it, add the hwdec option to your mpv profile:
    Code:
    $ echo "hwdec=auto" >> ~/.config/mpv/mpv.conf
    
    mpv is actively maintained, too (see its repo). I love that they don't waste energy into making a mouse-friendly GUI. Just pure content, ultimate configurability and maintainable code.

    Notes about the competition:
    • VLC is supposed to support VDA but I couldn't find a way to enable it. And judging by the CPU usage with default settings, it's clearly not enabled by default.
    • MPlayerX seems to support it too (EnableHWAccel2 option) but with their new monetizing installer and a dead repository as if they've gone closed source, I wouldn't touch it with a 10 ft pole, ugh.
     
  2. dubydoo macrumors member

    Joined:
    Mar 29, 2014
    #2
    Just wanted to thank you for this tip! Works like a charm!
     
  3. Roman2K~ thread starter macrumors 6502a

    Joined:
    Mar 11, 2011
    #3
    You're welcome! ;)

    Still using it myself since the post. On a base Retina MacBook, playing a 720p MKV (video: x264 @ 5 MB/s) with 100% battery at 50% brightness, Wi-Fi off and headphones plugged in:
    • VLC: 6h40m remaining
    • mpv: 9h30m remaining
     
  4. wchigo macrumors 6502

    wchigo

    Joined:
    Apr 6, 2015
    #4
    Sorry, as a huge newbie to the deeper aspects of OS X, would you be able to point me to where I would need to enter that code? I looked in the mpv "how to" and it said to look for the system-wide config file in presumably /etc/mpv or /usr/local/etc/mpv but neither of them came up with any results...
     
  5. Hook85 macrumors member

    Hook85

    Joined:
    Jul 15, 2015
    Location:
    Sheffield, UK
    #5
    Make sure that you have dropped the app into the applications folder and run mpv at least once (if you don't you'll get an error message).

    Open Terminal and then just copy and paste the command in. Hit return. WHAM BAM.
     
  6. wchigo macrumors 6502

    wchigo

    Joined:
    Apr 6, 2015
    #6
    Okay, I did put the app into the Applications folder and ran it once before putting the code in Terminal. I didn't get any kind of message, so I wasn't sure if it worked or not... Cheers mate
     
  7. Hook85 macrumors member

    Hook85

    Joined:
    Jul 15, 2015
    Location:
    Sheffield, UK
    #7
    If you didn't get a message it worked. You only get an error if it fails.
     
  8. Roman2K~ thread starter macrumors 6502a

    Joined:
    Mar 11, 2011
    #8
    Yes, sorry I didn't go into greater details as to how to proceed. That felt like out of topic. Glad you got it right and thanks to Hook85 for helping.
     
  9. wchigo macrumors 6502

    wchigo

    Joined:
    Apr 6, 2015
    #9
    That's ok, the fact that you posted this topic and got the info out there is already good enough. Gotta start figuring some things out on my own as well, I was just a little confused when I didn't see anything after I entered the code in Terminal. Cheers to you too mate
     

Share This Page