Adding nvenc support to ffmpeg (default off)
I add the nvidia-video-sdk header files, required to make it work. You have to set nvenct=true to ffmpeg-full and nonfreeLicensing=true to ffmpeg-full to use this.
This commit is contained in:
parent
186a6a207d
commit
93912d99d2
@ -99,7 +99,7 @@
|
|||||||
, libxcbshapeExtlib ? true # X11 grabbing shape rendering
|
, libxcbshapeExtlib ? true # X11 grabbing shape rendering
|
||||||
, libXv ? null # Xlib support
|
, libXv ? null # Xlib support
|
||||||
, lzma ? null # xz-utils
|
, lzma ? null # xz-utils
|
||||||
#, nvenc ? null # NVIDIA NVENC support
|
, nvenc ? false, nvidia-video-sdk ? null # NVIDIA NVENC support
|
||||||
, openal ? null # OpenAL 1.1 capture support
|
, openal ? null # OpenAL 1.1 capture support
|
||||||
#, opencl ? null # OpenCL code
|
#, opencl ? null # OpenCL code
|
||||||
#, opencore-amr ? null # AMR-NB de/encoder & AMR-WB decoder
|
#, opencore-amr ? null # AMR-NB de/encoder & AMR-WB decoder
|
||||||
@ -232,6 +232,7 @@ assert libxcbshapeExtlib -> libxcb != null;
|
|||||||
assert openglExtlib -> mesa != null;
|
assert openglExtlib -> mesa != null;
|
||||||
assert opensslExtlib -> gnutls == null && openssl != null && nonfreeLicensing;
|
assert opensslExtlib -> gnutls == null && openssl != null && nonfreeLicensing;
|
||||||
assert x11grabExtlib -> libX11 != null && libXv != null;
|
assert x11grabExtlib -> libX11 != null && libXv != null;
|
||||||
|
assert nvenc -> nvidia-video-sdk != null && nonfreeLicensing;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "ffmpeg-full-${version}";
|
name = "ffmpeg-full-${version}";
|
||||||
@ -356,7 +357,7 @@ stdenv.mkDerivation rec {
|
|||||||
(enableFeature libxcbxfixesExtlib "libxcb-xfixes")
|
(enableFeature libxcbxfixesExtlib "libxcb-xfixes")
|
||||||
(enableFeature libxcbshapeExtlib "libxcb-shape")
|
(enableFeature libxcbshapeExtlib "libxcb-shape")
|
||||||
(enableFeature (lzma != null) "lzma")
|
(enableFeature (lzma != null) "lzma")
|
||||||
#(enableFeature nvenc "nvenc")
|
(enableFeature nvenc "nvenc")
|
||||||
(enableFeature (openal != null) "openal")
|
(enableFeature (openal != null) "openal")
|
||||||
#(enableFeature opencl "opencl")
|
#(enableFeature opencl "opencl")
|
||||||
#(enableFeature (opencore-amr != null && version3Licensing) "libopencore-amrnb")
|
#(enableFeature (opencore-amr != null && version3Licensing) "libopencore-amrnb")
|
||||||
@ -410,6 +411,7 @@ stdenv.mkDerivation rec {
|
|||||||
++ optionals nonfreeLicensing [ faac fdk_aac openssl ]
|
++ optionals nonfreeLicensing [ faac fdk_aac openssl ]
|
||||||
++ optional ((isLinux || isFreeBSD) && libva != null) libva
|
++ optional ((isLinux || isFreeBSD) && libva != null) libva
|
||||||
++ optionals isLinux [ alsaLib libraw1394 libv4l ]
|
++ optionals isLinux [ alsaLib libraw1394 libv4l ]
|
||||||
|
++ optionals nvenc [ nvidia-video-sdk ]
|
||||||
++ optionals stdenv.isDarwin [ Cocoa CoreServices AVFoundation MediaToolbox
|
++ optionals stdenv.isDarwin [ Cocoa CoreServices AVFoundation MediaToolbox
|
||||||
VideoDecodeAcceleration ];
|
VideoDecodeAcceleration ];
|
||||||
|
|
||||||
|
27
pkgs/development/libraries/nvidia-video-sdk/default.nix
Normal file
27
pkgs/development/libraries/nvidia-video-sdk/default.nix
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{ stdenv, fetchurl, unzip }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "nvidia-video-sdk-6.0.1";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://developer.nvidia.com/video-sdk-601";
|
||||||
|
name = "nvidia_video_sdk_6.0.1.zip";
|
||||||
|
sha256 = "08h1vnqsv22js9v3pyim5yb80z87baxb7s2g5gsvvjax07j7w8h5";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ unzip ];
|
||||||
|
|
||||||
|
# We only need the header files. The library files are
|
||||||
|
# in the nvidia_x11 driver.
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/include
|
||||||
|
cp -R Samples/common/inc/* $out/include
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "The NVIDIA Video Codec SDK";
|
||||||
|
homepage = https://developer.nvidia.com/nvidia-video-codec-sdk;
|
||||||
|
license = licenses.unfree;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -8586,6 +8586,8 @@ in
|
|||||||
|
|
||||||
nvidia-texture-tools = callPackage ../development/libraries/nvidia-texture-tools { };
|
nvidia-texture-tools = callPackage ../development/libraries/nvidia-texture-tools { };
|
||||||
|
|
||||||
|
nvidia-video-sdk = callPackage ../development/libraries/nvidia-video-sdk { };
|
||||||
|
|
||||||
ocl-icd = callPackage ../development/libraries/ocl-icd { };
|
ocl-icd = callPackage ../development/libraries/ocl-icd { };
|
||||||
|
|
||||||
ode = callPackage ../development/libraries/ode { };
|
ode = callPackage ../development/libraries/ode { };
|
||||||
|
Loading…
Reference in New Issue
Block a user