summary refs log tree commit diff
diff options
context:
space:
mode:
authorIvan Kozik <ivan@ludios.org>2019-01-20 22:59:14 +0000
committerIvan Kozik <ivan@ludios.org>2019-02-11 00:32:43 +0000
commitde8f760fbd4d8895047c090516841d259b145719 (patch)
tree7b7810a1d91ec11940bfa60aab5c9ca5a46f9f3a
parent5c09d977c794d9243ddac17f6c429b5432431f8f (diff)
downloadnixpkgs-de8f760fbd4d8895047c090516841d259b145719.tar
nixpkgs-de8f760fbd4d8895047c090516841d259b145719.tar.gz
nixpkgs-de8f760fbd4d8895047c090516841d259b145719.tar.bz2
nixpkgs-de8f760fbd4d8895047c090516841d259b145719.tar.lz
nixpkgs-de8f760fbd4d8895047c090516841d259b145719.tar.xz
nixpkgs-de8f760fbd4d8895047c090516841d259b145719.tar.zst
nixpkgs-de8f760fbd4d8895047c090516841d259b145719.zip
ffmpeg, mpv: enable hardware-accelerated decoding with CUDA
NVIDIA users can now use `mpv --hwdec=nvdec` to play videos that the
software decoders cannot keep up with.
-rw-r--r--pkgs/applications/video/mpv/default.nix4
-rw-r--r--pkgs/development/libraries/ffmpeg/generic.nix4
2 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/applications/video/mpv/default.nix b/pkgs/applications/video/mpv/default.nix
index ffbaa9fffdf..0487f9d7ae4 100644
--- a/pkgs/applications/video/mpv/default.nix
+++ b/pkgs/applications/video/mpv/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchurl, fetchFromGitHub, makeWrapper
 , docutils, perl, pkgconfig, python3, which, ffmpeg_4
 , freefont_ttf, freetype, libass, libpthreadstubs, mujs
-, lua, libuchardet, libiconv ? null, darwin
+, nv-codec-headers, lua, libuchardet, libiconv ? null, darwin
 
 , waylandSupport ? false
   , wayland           ? null
@@ -141,7 +141,7 @@ in stdenv.mkDerivation rec {
 
   buildInputs = [
     ffmpeg_4 freetype libass libpthreadstubs
-    luaEnv libuchardet mujs
+    luaEnv libuchardet mujs nv-codec-headers
   ] ++ optional alsaSupport        alsaLib
     ++ optional archiveSupport     libarchive
     ++ optional bluraySupport      libbluray
diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix
index d11ef732a01..72929e127bc 100644
--- a/pkgs/development/libraries/ffmpeg/generic.nix
+++ b/pkgs/development/libraries/ffmpeg/generic.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchurl, pkgconfig, perl, texinfo, yasm
 , alsaLib, bzip2, fontconfig, freetype, gnutls, libiconv, lame, libass, libogg
 , libssh, libtheora, libva, libdrm, libvorbis, libvpx, lzma, libpulseaudio, soxr
-, x264, x265, xvidcore, zlib, libopus, speex
+, x264, x265, xvidcore, zlib, libopus, speex, nv-codec-headers
 , openglSupport ? false, libGLU_combined ? null
 # Build options
 , runtimeCpuDetectBuild ? true # Detect CPU capabilities at runtime
@@ -161,7 +161,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [
     bzip2 fontconfig freetype gnutls libiconv lame libass libogg libssh libtheora
-    libvdpau libvorbis lzma soxr x264 x265 xvidcore zlib libopus speex
+    libvdpau libvorbis lzma soxr x264 x265 xvidcore zlib libopus speex nv-codec-headers
   ] ++ optional openglSupport libGLU_combined
     ++ optional vpxSupport libvpx
     ++ optionals (!isDarwin && !isAarch32) [ libpulseaudio ] # Need to be fixed on Darwin and ARM