all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Vinicius Monego <monego@posteo.net>
To: 66271@debbugs.gnu.org
Cc: Vinicius Monego <monego@posteo.net>
Subject: [bug#66271] [PATCH 2/2] gnu: Add ffmpeg-normalize.
Date: Sat, 30 Sep 2023 03:08:23 +0000	[thread overview]
Message-ID: <f495969f0b0dee8b67e8bd5b6c4ad1a53995f9be.1696042974.git.monego@posteo.net> (raw)
In-Reply-To: <cover.1696042974.git.monego@posteo.net>

* 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





  parent reply	other threads:[~2023-09-30  3:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-30  3:06 [bug#66271] [PATCH 0/2] Add ffmpeg-normalize Vinicius Monego
2023-09-30  3:08 ` [bug#66271] [PATCH 1/2] gnu: Add ffmpeg-progress-yield Vinicius Monego
2023-09-30  3:08 ` Vinicius Monego [this message]
2023-10-19 20:30 ` [bug#66271] [PATCH 0/2] Add ffmpeg-normalize Ludovic Courtès
2023-10-30 11:24   ` bug#66271: " Christopher Baines

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f495969f0b0dee8b67e8bd5b6c4ad1a53995f9be.1696042974.git.monego@posteo.net \
    --to=monego@posteo.net \
    --cc=66271@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.