From 0c4a83a006819df1b846884125271ab4b8b0faf0 Mon Sep 17 00:00:00 2001 From: Murilo Date: Thu, 19 Sep 2024 23:00:52 -0300 Subject: [PATCH] nongnu: Add ffmpeg-nvenc. * nongnu/packages/video.scm (ffmpeg-nvenc): New variable. Signed-off-by: Hilton Chain --- nongnu/packages/video.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/nongnu/packages/video.scm b/nongnu/packages/video.scm index 8c7fa1b..5c6ca46 100644 --- a/nongnu/packages/video.scm +++ b/nongnu/packages/video.scm @@ -17,6 +17,30 @@ #:use-module (nongnu packages chromium) #:use-module (nongnu packages nvidia)) +(define-public ffmpeg-nvenc + (package/inherit ffmpeg + (name "ffmpeg-nvenc") + (inputs + (modify-inputs + (package-inputs ffmpeg) + (prepend nv-codec-headers))) + (arguments + (substitute-keyword-arguments (package-arguments ffmpeg) + ((#:configure-flags flags) + ;; Currently only interested in NVENC. + ;; Might be better to make a ffmpeg-nonfree with all nonfree codecs + ;; in the future. + #~(cons* "--enable-cuvid" + "--enable-ffnvcodec" + "--enable-encoder=hevc_nvenc" + "--enable-encoder=h264_nvenc" + #$flags)))) + (description + (string-append + (package-description ffmpeg) + " This build of FFmpeg includes the nonfree NVIDIA encoder for +@code{h264_nvenc} and @code{hevc_nvenc} hardware encoding on NVIDIA GPUs.")))) + (define-public gmmlib (package (name "gmmlib")