GNU bug report logs - #66271
[PATCH 0/2] Add ffmpeg-normalize

Previous Next

Package: guix-patches;

Reported by: Vinicius Monego <monego <at> posteo.net>

Date: Sat, 30 Sep 2023 03:08:02 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 66271 <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: 66271 <at> debbugs.gnu.org
Cc: Vinicius Monego <monego <at> posteo.net>
Subject: [PATCH 2/2] gnu: Add ffmpeg-normalize.
Date: Sat, 30 Sep 2023 03:08:23 +0000
* gnu/packages/video.scm (ffmpeg-normalize): New variable.
---
 gnu/packages/video.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index a707541b68..44fe322a3b 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -1973,6 +1973,48 @@ (define-public ffmpeg-progress-yield
 It is usually a complement to @code{ffmpeg-normalize}.")
     (license license:expat)))
 
+(define-public ffmpeg-normalize
+  (package
+    (name "ffmpeg-normalize")
+    (version "1.27.7")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "ffmpeg-normalize" version))
+              (sha256
+               (base32
+                "0idqqgsr3p840vx2x3idn851qwghjdbm6v4yrq2kprppyfvglni7"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (replace 'check
+                 (lambda* (#:key tests? #:allow-other-keys)
+                   (when tests?
+                     (invoke "python" "-m" "pytest"
+                             "test/test.py"))))
+               (add-after 'wrap 'wrap-ffmpeg
+                 ;; Wrap ffmpeg on the executable.
+                 (lambda* (#:key inputs outputs #:allow-other-keys)
+                   (let ((ffn (search-input-file outputs
+                                                 "bin/ffmpeg-normalize"))
+                         (ffm (search-input-file inputs "bin/ffmpeg")))
+                     (wrap-program ffn
+                       `("FFMPEG_PATH" = (,ffm)))))))))
+    (native-inputs (list python-pytest))
+    (inputs (list bash-minimal ffmpeg))
+    (propagated-inputs (list ffmpeg-progress-yield
+                             python-colorama
+                             python-colorlog
+                             python-tqdm))
+    (home-page "https://github.com/slhck/ffmpeg-normalize")
+    (synopsis "Normalize audio via ffmpeg")
+    (description "This program normalizes media files to a certain loudness
+level using the EBU R128 loudness normalization procedure.  It can also
+perform RMS-based normalization (where the mean is lifted or attenuated),
+or peak normalization to a certain target level.  Batch processing of several
+input files is possible, including video files.")
+    (license license:expat)))
+
 (define-public vlc
   (package
     (name "vlc")
-- 
2.39.2





This bug report was last modified 1 year and 200 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.