unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#66271] [PATCH 0/2] Add ffmpeg-normalize
@ 2023-09-30  3:06 Vinicius Monego
  2023-09-30  3:08 ` [bug#66271] [PATCH 1/2] gnu: Add ffmpeg-progress-yield Vinicius Monego
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Vinicius Monego @ 2023-09-30  3:06 UTC (permalink / raw)
  To: 66271; +Cc: Vinicius Monego

Vinicius Monego (2):
  gnu: Add ffmpeg-progress-yield.
  gnu: Add ffmpeg-normalize.

 gnu/packages/video.scm | 75 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 75 insertions(+)

-- 
2.39.2





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#66271] [PATCH 1/2] gnu: Add ffmpeg-progress-yield.
  2023-09-30  3:06 [bug#66271] [PATCH 0/2] Add ffmpeg-normalize Vinicius Monego
@ 2023-09-30  3:08 ` Vinicius Monego
  2023-09-30  3:08 ` [bug#66271] [PATCH 2/2] gnu: Add ffmpeg-normalize Vinicius Monego
  2023-10-19 20:30 ` [bug#66271] [PATCH 0/2] " Ludovic Courtès
  2 siblings, 0 replies; 5+ messages in thread
From: Vinicius Monego @ 2023-09-30  3:08 UTC (permalink / raw)
  To: 66271; +Cc: Vinicius Monego

* gnu/packages/video.scm (ffmpeg-progress-yield): New variable.
---
 gnu/packages/video.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 5375424ce6..a707541b68 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -1940,6 +1940,39 @@ (define-public ffmpegthumbnailer
 videoformats depend on the configuration flags of ffmpeg.")
     (license license:gpl2+)))
 
+(define-public ffmpeg-progress-yield
+  (package
+    (name "ffmpeg-progress-yield")
+    (version "0.7.8")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "ffmpeg-progress-yield" version))
+              (sha256
+               (base32
+                "07j6m8p8z8ybl75h0d4xzjl1pvkfzr0i73siysqcgrrahdgsxrls"))))
+    (build-system pyproject-build-system)
+    (arguments
+     ;; Not sure if the test file actually does anything.
+     (list #:phases #~(modify-phases %standard-phases
+                        (replace 'check
+                          (lambda* (#:key tests? #:allow-other-keys)
+                            (when tests?
+                              (invoke "python" "test/test.py"))))
+                        (add-after 'wrap 'wrap-program
+                          ;; Wrap ffmpeg on the executable.
+                          (lambda* (#:key inputs outputs #:allow-other-keys)
+                            (let ((fpy "bin/ffmpeg-progress-yield")
+                                  (ffm "bin/ffmpeg"))
+                              (wrap-program (search-input-file outputs fpy)
+                                `("PATH" ":" prefix
+                                  (,(search-input-file inputs ffm))))))))))
+    (inputs (list bash-minimal ffmpeg))
+    (home-page "https://github.com/slhck/ffmpeg-progress-yield")
+    (synopsis "Run an ffmpeg command with progress")
+    (description "This package allows an ffmpeg command to run with progress.
+It is usually a complement to @code{ffmpeg-normalize}.")
+    (license license:expat)))
+
 (define-public vlc
   (package
     (name "vlc")
-- 
2.39.2





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#66271] [PATCH 2/2] gnu: Add ffmpeg-normalize.
  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
  2023-10-19 20:30 ` [bug#66271] [PATCH 0/2] " Ludovic Courtès
  2 siblings, 0 replies; 5+ messages in thread
From: Vinicius Monego @ 2023-09-30  3:08 UTC (permalink / raw)
  To: 66271; +Cc: Vinicius Monego

* 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





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#66271] [PATCH 0/2] Add ffmpeg-normalize
  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 ` [bug#66271] [PATCH 2/2] gnu: Add ffmpeg-normalize Vinicius Monego
@ 2023-10-19 20:30 ` Ludovic Courtès
  2023-10-30 11:24   ` bug#66271: " Christopher Baines
  2 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2023-10-19 20:30 UTC (permalink / raw)
  To: Vinicius Monego; +Cc: 66271

Hi,

Vinicius Monego <monego@posteo.net> skribis:

>   gnu: Add ffmpeg-progress-yield.
>   gnu: Add ffmpeg-normalize.

LGTM and to qa.guix.  Go for it!

Ludo’.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#66271: [PATCH 0/2] Add ffmpeg-normalize
  2023-10-19 20:30 ` [bug#66271] [PATCH 0/2] " Ludovic Courtès
@ 2023-10-30 11:24   ` Christopher Baines
  0 siblings, 0 replies; 5+ messages in thread
From: Christopher Baines @ 2023-10-30 11:24 UTC (permalink / raw)
  To: Vinicius Monego; +Cc: 66271-done

[-- Attachment #1: Type: text/plain, Size: 322 bytes --]


Ludovic Courtès <ludo@gnu.org> writes:

> Vinicius Monego <monego@posteo.net> skribis:
>
>>   gnu: Add ffmpeg-progress-yield.
>>   gnu: Add ffmpeg-normalize.
>
> LGTM and to qa.guix.  Go for it!

I've gone ahead and pushed this to master as
a0eb6652b3ce386a2d3cceda3dd3723afc87ac59.

Thanks both,

Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-10-30 11:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [bug#66271] [PATCH 2/2] gnu: Add ffmpeg-normalize Vinicius Monego
2023-10-19 20:30 ` [bug#66271] [PATCH 0/2] " Ludovic Courtès
2023-10-30 11:24   ` bug#66271: " Christopher Baines

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).