10

There used to be a vaapi build of mplayer but it doesn't seem to be maintained any more and doesn't work in Vivid.

Default mplayer2 build from the repo uses 40% of CPU during 720p playback. Same as totem. VLC does have some hardware acceleration support and uses 13% but I liked mplayer's UI more and it used less than 5% with.

Is it currently possible to use mplayer with hardware acceleration on Intel integrated graphics?

Damn Terminal
  • 2,636
  • 7
  • 27
  • 36

2 Answers2

11

OK, I found mpv (a fork of mplayer) which does everything I wanted and carried all the good UI qualities from mplayer2.

To enable vaapi support, run it with mpv --vo=opengl-hq --hwdec=vaapi file.mkv

or add

vo=opengl-hq
hwdec=vaapi

to ~/.config/mpv/mpv.conf.

Previously the answer suggested using vo=vaapi and hwdec=vaapi but this is not a recommended setup anymore. See comments.

Damn Terminal
  • 2,636
  • 7
  • 27
  • 36
  • 2
    mpv works really well, thank you for sharing your solution. On my system, setting "hwdec=auto" is sufficient to get accelerated playback; supposedly, vo=opengl is better than vo=vaapi on newer systems: https://wiki.archlinux.org/index.php/Mpv#Hardware_Decoding – lxgr Apr 29 '15 at 07:51
  • 1
    I switched `vo=opengl-hq` with `hwdec=vaapi` which is what they seem to recommend. – Damn Terminal Apr 29 '15 at 08:09
  • FTR: I noticed that `hwdec=vaapi` doesn't seem to work for me *(i.e. eats to much cpu)*, but `--hwdec=vaapi` option does work. mpv-0.3.4. – Hi-Angel Oct 18 '16 at 12:03
-2

SNA is the best acceleration method. You should check your config file if you have one. Another way is to renice the process. For example:

ps ax|grep mplayer

find the given process and renice it

renice -20 43332

You can do it as root only (maybe it is possible with sudo: sudo renice -20 43332 ).

  • What does `SNA` do? How do I enable it? – Damn Terminal Apr 26 '15 at 14:43
  • 2
    SNA is a better acceleration than any other. You probably won't have `/etc/X11/xorg.conf`. `EXA`, `UXA` are older acceleration methods. Yous check what acceleration method are you using. You can probably do it by `cat /var/log/Xorg.0.log|egrep -i EXA|UXA|SNA` – Pavol Polacko Apr 26 '15 at 14:54
  • Yes. My system does seem to support it `SNA compiled: xserver-xorg-video-intel 2:2.99.917-1~exp1ubuntu2build1`. How can I make use of it in mplayer? – Damn Terminal Apr 26 '15 at 14:57
  • It's using it automatically. :) Could you, please, give us the output of `cat /var/log/Xorg.0.log|egrep -i "EXA|UXA|SNA"` ? And the output of `cat /etc/X11/xorg.conf` ? – Pavol Polacko Apr 26 '15 at 15:02
  • But it clearly isn't. `Mplayer` uses 40-60% cpu when playing a video where `mpv` uses only 7. There is no xorg.conf, [here are the outputs](https://gist.github.com/anonymous/73ff1b70098252daf9c1). – Damn Terminal Apr 26 '15 at 15:03
  • I'm afraid I can't help you with that. You are using SNA, that's good to hear. I didn't know about `mpv`, thanks for that anyway :) – Pavol Polacko Apr 26 '15 at 15:22
  • 4
    SNA is used for accelerated X11 drawing and has nothing to do with (hardware accelerated) video decoding. – lxgr Apr 28 '15 at 09:53