Accelerated Video Playback: Difference between revisions

From NixOS Wiki
imported>Hyperfekt
No edit summary
imported>Mic92
mpv: video acceleration
Line 33: Line 33:
===Chromium===
===Chromium===
Needs a patch for VA-API support, see [https://github.com/NixOS/nixpkgs/issues/21481 nixpkgs#21481] for current status.
Needs a patch for VA-API support, see [https://github.com/NixOS/nixpkgs/issues/21481 nixpkgs#21481] for current status.
===MPV===
@Mic92 needed the following configuration in <code>~/.mpv/config</code>
for mpv to use hardware acceleration for VP9 on Intel Broadwell:
<syntaxHighlight>
hwdec=vaapi
vo=gpu
hwdec-codecs=all
</syntaxHighlight>
This is based on the [https://wiki.archlinux.org/index.php/Mpv#Hardware_decoding archlinux MPV article].


===Other===
===Other===
See the [https://wiki.archlinux.org/index.php/Hardware_video_acceleration#Application_support Arch Linux wiki].
See the [https://wiki.archlinux.org/index.php/Hardware_video_acceleration#Application_support Arch Linux wiki].

Revision as of 10:22, 3 February 2019

This page is meant to help with techniques for getting accelerated video playback working in NixOS.

This is done by adding relevant libva-related packages to the hardware.opengl.extraPackages option.

Additionally, the vaapiIntel package can be overriden to enable Intel's Hybrid Driver.

Sample configuration:

 {
   ...
   nixpkgs.config.packageOverrides = pkgs: {
     vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
   };
   hardware.opengl = {
     enable = true;
     extraPackages = with pkgs; [
       vaapiIntel
       vaapiVdpau
       libvdpau-va-gl
     ];
   };
   ...
 }
 

Prepared Hardware configuration

Sometimes different opengl packages are required to achieve full performance. You can check different configuration repositories for similar hardware configuration:


Applications

Chromium

Needs a patch for VA-API support, see nixpkgs#21481 for current status.

MPV

@Mic92 needed the following configuration in ~/.mpv/config for mpv to use hardware acceleration for VP9 on Intel Broadwell:

hwdec=vaapi
vo=gpu
hwdec-codecs=all

This is based on the archlinux MPV article.

Other

See the Arch Linux wiki.