Accelerated Video Playback: Difference between revisions

imported>Makefu
m (add note for nixos-19.03)
imported>Makefu
m (syntax highlight)
Line 8: Line 8:


Sample configuration:
Sample configuration:
 
<syntaxHighlight lang=nix>
  {
{
    ...
  ...
    nixpkgs.config.packageOverrides = pkgs: {
  nixpkgs.config.packageOverrides = pkgs: {
      vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
    vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
    };
  };
    hardware.opengl = {
  hardware.opengl = {
      enable = true;
    enable = true;
      extraPackages = with pkgs; [
    extraPackages = with pkgs; [
        vaapiIntel
      vaapiIntel
        vaapiVdpau
      vaapiVdpau
        libvdpau-va-gl
      libvdpau-va-gl
        intel-media-driver # only available starting nixos-19.03 or the current nixos-unstable
      intel-media-driver # only available starting nixos-19.03 or the current nixos-unstable
      ];
    ];
    };
  };
    ...
  ...
  }
}
 
</syntaxHighlight>


== Prepared Hardware configuration ==
== Prepared Hardware configuration ==
Line 41: Line 41:
for mpv to use hardware acceleration for VP9 on Intel Broadwell:
for mpv to use hardware acceleration for VP9 on Intel Broadwell:


<syntaxHighlight>
<syntaxHighlight lang=ini>
hwdec=vaapi
hwdec=vaapi
vo=gpu
vo=gpu