GNU bug report logs -
#64732
[PATCH 0/2] Add r128gain
Previous Next
Reported by: Parnikkapore <poomklao <at> yahoo.com>
Date: Wed, 19 Jul 2023 15:33:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 64732 in the body.
You can then email your comments to 64732 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#64732
; Package
guix-patches
.
(Wed, 19 Jul 2023 15:33:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Parnikkapore <poomklao <at> yahoo.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Wed, 19 Jul 2023 15:33:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Add the newer, Python-based r128gain.
Parnikkapore (2):
gnu: Add python-ffmpeg-python.
gnu: Add r128gain.
gnu/packages/audio.scm | 32 ++++++++++++++++++++++++++++++++
gnu/packages/python-xyz.scm | 30 ++++++++++++++++++++++++++++++
2 files changed, 62 insertions(+)
base-commit: 1d837aaa32a3a2de8f4a1ac391f92effba50834e
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#64732
; Package
guix-patches
.
(Wed, 19 Jul 2023 15:37:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 64732 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/audio.scm (r128gain): New variable.
---
gnu/packages/audio.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 8a11d2d6cc..db23635f15 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -45,6 +45,7 @@
;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus <at> gmail.com>
;;; Copyright © 2023 Gabriel Wicki <gabriel <at> erlikon.ch>
;;; Copyright © 2023 Zheng Junjie <873216071 <at> qq.com>
+;;; Copyright © 2023 Parnikkapore <poomklao <at> yahoo.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -116,7 +117,9 @@ (define-module (gnu packages audio)
#:use-module (gnu packages pulseaudio) ;libsndfile, libsamplerate
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
+ #:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-science)
+ #:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
#:use-module (gnu packages rdf)
@@ -4691,6 +4694,35 @@ (define-public bs1770gain
loudness of audio and video files to the same level.")
(license license:gpl2+)))
+(define-public r128gain
+ (package
+ (name "r128gain")
+ (version "1.0.7")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/desbma/r128gain.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0zqclskkjb9hfdw9gq6iq4bs9dl1wj9nr8v1jz6s885379q9l8i7"))))
+ (build-system python-build-system)
+ (inputs (list python-crcmod python-ffmpeg-python python-mutagen
+ python-tqdm))
+ (propagated-inputs (list ffmpeg))
+ (native-inputs (list python-future python-requests))
+ (home-page "https://github.com/desbma/r128gain")
+ (synopsis "Fast audio loudness scanner & tagger")
+ (description
+ "r128gain is a multi platform command line tool to scan your audio
+files and tag them with loudness metadata (ReplayGain v2 or Opus R128 gain
+format), to allow playback of several tracks or albums at a similar
+loudness level. r128gain can also be used as a Python module from other
+Python projects to scan and/or tag audio files.")
+ ;; setup.py claims LGPL2+, but this is not corroborated anywhere else
+ (license license:lgpl2.1)))
+
(define-public filteraudio
(let ((revision "1")
(commit "2fc669581e2a0ff87fba8de85861b49133306094"))
--
2.41.0
Information forwarded
to
lars <at> 6xq.net, jgart <at> dismail.de, guix-patches <at> gnu.org
:
bug#64732
; Package
guix-patches
.
(Wed, 19 Jul 2023 15:37:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 64732 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/python-xyz.scm (python-ffmpeg-python): New variable.
---
The failed tests are asserts getting values that are close to, but not exactly,
equal. There's also one more test failure that has not yet made it into a
release.
gnu/packages/python-xyz.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 755b0af4b6..2dee31aa5d 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -139,6 +139,7 @@
;;; Copyright © 2023 Dominik Delgado Steuter <d <at> delgado.nrw>
;;; Copyright © 2023 Ivan Vilata-i-Balaguer <ivan <at> selidor.net>
;;; Copyright © 2023 Ontje Lünsdorf <ontje.luensdorf <at> dlr.de>
+;;; Copyright © 2023 Parnikkapore <poomklao <at> yahoo.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -8918,6 +8919,35 @@ (define-public python-lfdfiles
experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
(license license:bsd-3)))
+(define-public python-ffmpeg-python
+ (package
+ (name "python-ffmpeg-python")
+ (version "0.2.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/kkroening/ffmpeg-python.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0mmydmfz3yiclbgi4lqrv9fh2nalafg4bkm92y2qi50mwqgffk8f"))))
+ (build-system python-build-system)
+ (arguments
+ ;; Some tests fail.
+ `(#:tests? #f))
+ (inputs (list python-future))
+ (propagated-inputs (list ffmpeg))
+ (native-inputs (list python-future python-numpy python-pytest
+ python-pytest-mock python-pytest-runner))
+ (home-page "https://github.com/kkroening/ffmpeg-python")
+ (synopsis "Python bindings for FFmpeg - with complex filtering support")
+ (description
+ "ffmpeg-python allows you to write FFmpeg filtergraphs in familiar
+Python terms, taking care of running ffmpeg with the correct command-line
+arguments. It handles arbitrarily large (directed-acyclic) signal graphs.")
+ (license license:asl2.0)))
+
(define-public python-imageio-ffmpeg
(package
(name "python-imageio-ffmpeg")
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#64732
; Package
guix-patches
.
(Wed, 19 Jul 2023 23:41:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 64732 <at> debbugs.gnu.org (full text, mbox):
> The failed tests are asserts getting values that are close to, but not exactly,
> equal.
Hi Parnikkapore,
Sounds like it might be a matter of adjusting the rel_tol and abs_tol upstream if related to isclose or similar being called in a test:
https://docs.python.org/3/library/math.html?highlight=math%20close#math.isclose
Might be worth doing that...
I'll try to take a closer look at this soon and the tests. Thanks for the patch!
all best,
jgart
https://whereis.みんな/
Information forwarded
to
guix-patches <at> gnu.org
:
bug#64732
; Package
guix-patches
.
(Thu, 20 Jul 2023 02:37:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 64732 <at> debbugs.gnu.org (full text, mbox):
Hi jgart,
There's some evidence¹ that the failing tests are a consequence of them being written for FFmpeg 4, not having been updated for changed behavior in FFmpeg 5+.
¹: https://github.com/kkroening/ffmpeg-python/issues/636
While we have the option of using ffmpeg-4 as the input, that doesn't seem like a good option. There's a PR that fixes this, but the AUR simply ignores test failures. I'll probably disable the 2 failing tests and cherry-pick the collections.Iterable commit as a patch.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#64732
; Package
guix-patches
.
(Thu, 20 Jul 2023 04:10:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 64732 <at> debbugs.gnu.org (full text, mbox):
I'll probably disable the 2
> failing tests and cherry-pick the collections.Iterable commit as a patch.
Hi Parnikkapore,
It is favorable to disable just those two tests than to disable the whole test suite, yes. Can you send a new patch with that change?
It would be much appreciated. Just Cc me when you have v2.
thanks,
jgart
Information forwarded
to
guix-patches <at> gnu.org
:
bug#64732
; Package
guix-patches
.
(Thu, 20 Jul 2023 15:55:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 64732 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/audio.scm (r128gain): New variable.
---
gnu/packages/audio.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 8a11d2d6cc..db23635f15 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -45,6 +45,7 @@
;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus <at> gmail.com>
;;; Copyright © 2023 Gabriel Wicki <gabriel <at> erlikon.ch>
;;; Copyright © 2023 Zheng Junjie <873216071 <at> qq.com>
+;;; Copyright © 2023 Parnikkapore <poomklao <at> yahoo.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -116,7 +117,9 @@ (define-module (gnu packages audio)
#:use-module (gnu packages pulseaudio) ;libsndfile, libsamplerate
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
+ #:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-science)
+ #:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
#:use-module (gnu packages rdf)
@@ -4691,6 +4694,35 @@ (define-public bs1770gain
loudness of audio and video files to the same level.")
(license license:gpl2+)))
+(define-public r128gain
+ (package
+ (name "r128gain")
+ (version "1.0.7")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/desbma/r128gain.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0zqclskkjb9hfdw9gq6iq4bs9dl1wj9nr8v1jz6s885379q9l8i7"))))
+ (build-system python-build-system)
+ (inputs (list python-crcmod python-ffmpeg-python python-mutagen
+ python-tqdm))
+ (propagated-inputs (list ffmpeg))
+ (native-inputs (list python-future python-requests))
+ (home-page "https://github.com/desbma/r128gain")
+ (synopsis "Fast audio loudness scanner & tagger")
+ (description
+ "r128gain is a multi platform command line tool to scan your audio
+files and tag them with loudness metadata (ReplayGain v2 or Opus R128 gain
+format), to allow playback of several tracks or albums at a similar
+loudness level. r128gain can also be used as a Python module from other
+Python projects to scan and/or tag audio files.")
+ ;; setup.py claims LGPL2+, but this is not corroborated anywhere else
+ (license license:lgpl2.1)))
+
(define-public filteraudio
(let ((revision "1")
(commit "2fc669581e2a0ff87fba8de85861b49133306094"))
--
2.41.0
Information forwarded
to
lars <at> 6xq.net, jgart <at> dismail.de, guix-patches <at> gnu.org
:
bug#64732
; Package
guix-patches
.
(Thu, 20 Jul 2023 15:55:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 64732 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/python-xyz.scm (python-ffmpeg-python): New variable.
---
gnu/packages/python-xyz.scm | 50 +++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 755b0af4b6..9097f3f027 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -139,6 +139,7 @@
;;; Copyright © 2023 Dominik Delgado Steuter <d <at> delgado.nrw>
;;; Copyright © 2023 Ivan Vilata-i-Balaguer <ivan <at> selidor.net>
;;; Copyright © 2023 Ontje Lünsdorf <ontje.luensdorf <at> dlr.de>
+;;; Copyright © 2023 Parnikkapore <poomklao <at> yahoo.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -8918,6 +8919,55 @@ (define-public python-lfdfiles
experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
(license license:bsd-3)))
+(define-public python-ffmpeg-python
+ (package
+ (name "python-ffmpeg-python")
+ (version "0.2.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/kkroening/ffmpeg-python.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0mmydmfz3yiclbgi4lqrv9fh2nalafg4bkm92y2qi50mwqgffk8f"))
+ (snippet
+ #~(begin
+ (use-modules (guix build utils))
+ (substitute* "ffmpeg/_run.py"
+ (("collections\\.Iterable")
+ "collections.abc.Iterable"))))))
+ (build-system python-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'disable-failing-tests
+ (lambda* _
+ (substitute* "ffmpeg/tests/test_ffmpeg.py"
+ (("([ \t]*)def test_pipe\\(" all indent)
+ (string-append indent
+ "@pytest.mark.skip"
+ "(reason=\"Not working under FFmpeg 5+\")\n"
+ all))
+ (("([ \t]*)def test__probe\\(" all indent)
+ (string-append indent
+ "@pytest.mark.skip"
+ "(reason=\"Not working under FFmpeg 5+\")\n"
+ all))))))))
+ (inputs (list python-future))
+ (propagated-inputs (list ffmpeg))
+ (native-inputs (list python-future python-numpy python-pytest
+ python-pytest-mock python-pytest-runner))
+ (home-page "https://github.com/kkroening/ffmpeg-python")
+ (synopsis "Python bindings for FFmpeg - with complex filtering support")
+ (description
+ "ffmpeg-python allows you to write FFmpeg filtergraphs in familiar
+Python terms, taking care of running ffmpeg with the correct command-line
+arguments. It handles arbitrarily large (directed-acyclic) signal graphs.")
+ (license license:asl2.0)))
+
(define-public python-imageio-ffmpeg
(package
(name "python-imageio-ffmpeg")
base-commit: 1d837aaa32a3a2de8f4a1ac391f92effba50834e
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#64732
; Package
guix-patches
.
(Thu, 20 Jul 2023 17:01:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 64732 <at> debbugs.gnu.org (full text, mbox):
Hi Parnikkapore,
Thanks for v2.
From a quick glance at the patch are you aware of the -k flag in Pytest that allows to disable tests?
https://docs.pytest.org/en/7.4.x/reference/reference.html#command-line-flags
It is a common pattern to use that flag in Guix Python packages for this purpose. I would look in (gnu packages python-xyz) for examples.
Is there some other reason why you're using substitute* to disable the tests?
all best,
jgart
Information forwarded
to
lars <at> 6xq.net, jgart <at> dismail.de, guix-patches <at> gnu.org
:
bug#64732
; Package
guix-patches
.
(Fri, 21 Jul 2023 06:57:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 64732 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/python-xyz.scm (python-ffmpeg-python): New variable.
---
I was not aware, thank you! The "flag the tests in the source" method
is the one I spotted when looking around python-xyz.
Included in this email is a v3 that uses the -k flag.
gnu/packages/python-xyz.scm | 42 +++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 755b0af4b6..10cadd6e15 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -139,6 +139,7 @@
;;; Copyright © 2023 Dominik Delgado Steuter <d <at> delgado.nrw>
;;; Copyright © 2023 Ivan Vilata-i-Balaguer <ivan <at> selidor.net>
;;; Copyright © 2023 Ontje Lünsdorf <ontje.luensdorf <at> dlr.de>
+;;; Copyright © 2023 Parnikkapore <poomklao <at> yahoo.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -8918,6 +8919,47 @@ (define-public python-lfdfiles
experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
(license license:bsd-3)))
+(define-public python-ffmpeg-python
+ (package
+ (name "python-ffmpeg-python")
+ (version "0.2.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/kkroening/ffmpeg-python.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0mmydmfz3yiclbgi4lqrv9fh2nalafg4bkm92y2qi50mwqgffk8f"))
+ (snippet
+ #~(begin
+ (use-modules (guix build utils))
+ (substitute* "ffmpeg/_run.py"
+ (("collections\\.Iterable")
+ "collections.abc.Iterable"))))))
+ (build-system python-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest" "-vv"
+ "-k" "not test_pipe and not test__probe")))))))
+ (inputs (list python-future))
+ (propagated-inputs (list ffmpeg))
+ (native-inputs (list python-future python-numpy python-pytest
+ python-pytest-mock python-pytest-runner))
+ (home-page "https://github.com/kkroening/ffmpeg-python")
+ (synopsis "Python bindings for FFmpeg - with complex filtering support")
+ (description
+ "ffmpeg-python allows you to write FFmpeg filtergraphs in familiar
+Python terms, taking care of running ffmpeg with the correct command-line
+arguments. It handles arbitrarily large (directed-acyclic) signal graphs.")
+ (license license:asl2.0)))
+
(define-public python-imageio-ffmpeg
(package
(name "python-imageio-ffmpeg")
base-commit: 1d837aaa32a3a2de8f4a1ac391f92effba50834e
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#64732
; Package
guix-patches
.
(Fri, 21 Jul 2023 06:57:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 64732 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/audio.scm (r128gain): New variable.
---
gnu/packages/audio.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 8a11d2d6cc..db23635f15 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -45,6 +45,7 @@
;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus <at> gmail.com>
;;; Copyright © 2023 Gabriel Wicki <gabriel <at> erlikon.ch>
;;; Copyright © 2023 Zheng Junjie <873216071 <at> qq.com>
+;;; Copyright © 2023 Parnikkapore <poomklao <at> yahoo.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -116,7 +117,9 @@ (define-module (gnu packages audio)
#:use-module (gnu packages pulseaudio) ;libsndfile, libsamplerate
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
+ #:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-science)
+ #:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
#:use-module (gnu packages rdf)
@@ -4691,6 +4694,35 @@ (define-public bs1770gain
loudness of audio and video files to the same level.")
(license license:gpl2+)))
+(define-public r128gain
+ (package
+ (name "r128gain")
+ (version "1.0.7")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/desbma/r128gain.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0zqclskkjb9hfdw9gq6iq4bs9dl1wj9nr8v1jz6s885379q9l8i7"))))
+ (build-system python-build-system)
+ (inputs (list python-crcmod python-ffmpeg-python python-mutagen
+ python-tqdm))
+ (propagated-inputs (list ffmpeg))
+ (native-inputs (list python-future python-requests))
+ (home-page "https://github.com/desbma/r128gain")
+ (synopsis "Fast audio loudness scanner & tagger")
+ (description
+ "r128gain is a multi platform command line tool to scan your audio
+files and tag them with loudness metadata (ReplayGain v2 or Opus R128 gain
+format), to allow playback of several tracks or albums at a similar
+loudness level. r128gain can also be used as a Python module from other
+Python projects to scan and/or tag audio files.")
+ ;; setup.py claims LGPL2+, but this is not corroborated anywhere else
+ (license license:lgpl2.1)))
+
(define-public filteraudio
(let ((revision "1")
(commit "2fc669581e2a0ff87fba8de85861b49133306094"))
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#64732
; Package
guix-patches
.
(Sat, 22 Jul 2023 13:07:01 GMT)
Full text and
rfc822 format available.
Message #38 received at 64732 <at> debbugs.gnu.org (full text, mbox):
Hi Parnikkapore,
See the comment I left in this GitHub issue thread:
https://github.com/kkroening/ffmpeg-python/issues/760#issuecomment-1646579040
Let's wait for a moment to hear back on that project's status.
all best,
jgart
Information forwarded
to
guix-patches <at> gnu.org
:
bug#64732
; Package
guix-patches
.
(Sat, 22 Jul 2023 13:52:01 GMT)
Full text and
rfc822 format available.
Message #41 received at 64732 <at> debbugs.gnu.org (full text, mbox):
Hi all,
jgart suggested on the GitHub thread that we pick a new commit from upstream instead of patching the release.
Should we use https://github.com/kkroening/ffmpeg-python/commit/6189cd6861a90f6f52e6a8ba2db0fada54134194 (the commit that fixes the issue upstream) or https://github.com/kkroening/ffmpeg-python/commit/df129c7ba30aaa9ffffb81a48f53aa7253b0b4e6 (the last ever commit before the project went silent)?
Information forwarded
to
guix-patches <at> gnu.org
:
bug#64732
; Package
guix-patches
.
(Sat, 22 Jul 2023 13:55:01 GMT)
Full text and
rfc822 format available.
Message #44 received at 64732 <at> debbugs.gnu.org (full text, mbox):
Lars,
Should these be patched to refer to our ffmpeg?
https://github.com/kkroening/ffmpeg-python/blob/df129c7ba30aaa9ffffb81a48f53aa7253b0b4e6/ffmpeg/_run.py#L302
And a call to subprocess.check_call in the tests:
https://github.com/kkroening/ffmpeg-python/blob/df129c7ba30aaa9ffffb81a48f53aa7253b0b4e6/ffmpeg/tests/test_ffmpeg.py#L29
WDYT if we document our policy for patching executables. Currently, this practice is tribal knowledge that Guixers receive during patch review but we don't have it officially in writing anywhere (e.g. manual, cookbook, etc)
Ludo WDYT
all best,
jgart
Information forwarded
to
guix-patches <at> gnu.org
:
bug#64732
; Package
guix-patches
.
(Sat, 22 Jul 2023 14:35:02 GMT)
Full text and
rfc822 format available.
Message #47 received at 64732 <at> debbugs.gnu.org (full text, mbox):
> Ludo WDYT
Or anyone else on the team:
Zimoun WDYT ;()
Efraim WDYT ;()
yours truly,
jgart
Information forwarded
to
guix-patches <at> gnu.org
:
bug#64732
; Package
guix-patches
.
(Sat, 22 Jul 2023 16:00:02 GMT)
Full text and
rfc822 format available.
Message #50 received at 64732 <at> debbugs.gnu.org (full text, mbox):
Hi,
> Should these be patched to refer to our ffmpeg?
>
> https://github.com/kkroening/ffmpeg-python/blob/df129c7ba30aaa9ffffb81a48f53aa7253b0b4e6/ffmpeg/_run.py#L302
yes.
> And a call to subprocess.check_call in the tests:
>
> https://github.com/kkroening/ffmpeg-python/blob/df129c7ba30aaa9ffffb81a48f53aa7253b0b4e6/ffmpeg/tests/test_ffmpeg.py#L29
Probably fine. The tests will find the only (and correct) ffmpeg if it’s an input.
Lars
Information forwarded
to
guix-patches <at> gnu.org
:
bug#64732
; Package
guix-patches
.
(Sat, 22 Jul 2023 18:14:01 GMT)
Full text and
rfc822 format available.
Message #53 received at 64732 <at> debbugs.gnu.org (full text, mbox):
> Probably fine. The tests will find the only (and correct) ffmpeg if it’s an input.
Hi Lars,
The tests will only ever use the guix installed ffmpeg in the inputs even if the user installed ffmpeg via dnf on Fedora, for example?
I haven't tested that edge case myself.
happy hacking,
jgart
Information forwarded
to
guix-patches <at> gnu.org
:
bug#64732
; Package
guix-patches
.
(Mon, 24 Jul 2023 19:12:02 GMT)
Full text and
rfc822 format available.
Message #56 received at 64732 <at> debbugs.gnu.org (full text, mbox):
>> Should these be patched to refer to our ffmpeg?
>>
>> https://github.com/kkroening/ffmpeg-python/blob/df129c7ba30aaa9ffffb81a48f53aa7253b0b4e6/ffmpeg/_run
>> py#L302
>
> yes.
Lars,
Thanks.
Parnikkapore,
Can you send another revision patching the ffmpeg executable?
No need to patch the ffmpeg executable in the tests as those are run hermetically in a container and will only ever use/find the Guix-installed ffmpeg.
all best,
jgart
Information forwarded
to
guix-patches <at> gnu.org
:
bug#64732
; Package
guix-patches
.
(Fri, 04 Aug 2023 15:06:02 GMT)
Full text and
rfc822 format available.
Message #59 received at 64732 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/audio.scm (r128gain): New variable.
---
Ditto.
gnu/packages/audio.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 8a11d2d6cc..39f7f5496b 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -45,6 +45,7 @@
;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus <at> gmail.com>
;;; Copyright © 2023 Gabriel Wicki <gabriel <at> erlikon.ch>
;;; Copyright © 2023 Zheng Junjie <873216071 <at> qq.com>
+;;; Copyright © 2023 Parnikkapore <poomklao <at> yahoo.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -116,7 +117,9 @@ (define-module (gnu packages audio)
#:use-module (gnu packages pulseaudio) ;libsndfile, libsamplerate
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
+ #:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-science)
+ #:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
#:use-module (gnu packages rdf)
@@ -4691,6 +4694,45 @@ (define-public bs1770gain
loudness of audio and video files to the same level.")
(license license:gpl2+)))
+(define-public r128gain
+ (package
+ (name "r128gain")
+ (version "1.0.7")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/desbma/r128gain.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0zqclskkjb9hfdw9gq6iq4bs9dl1wj9nr8v1jz6s885379q9l8i7"))))
+ (build-system python-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'hardcode-ffmpeg
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "r128gain/__init__.py"
+ (("ffmpeg_path or \"ffmpeg\"")
+ (string-append "ffmpeg_path or \""
+ (search-input-file inputs "bin/ffmpeg")
+ "\""))))))))
+ (inputs (list python-crcmod python-ffmpeg-python python-mutagen
+ python-tqdm ffmpeg))
+ (native-inputs (list python-future python-requests))
+ (home-page "https://github.com/desbma/r128gain")
+ (synopsis "Fast audio loudness scanner & tagger")
+ (description
+ "r128gain is a multi platform command line tool to scan your audio
+files and tag them with loudness metadata (ReplayGain v2 or Opus R128 gain
+format), to allow playback of several tracks or albums at a similar
+loudness level. r128gain can also be used as a Python module from other
+Python projects to scan and/or tag audio files.")
+ ;; setup.py claims LGPL2+, but this is not corroborated anywhere else
+ (license license:lgpl2.1)))
+
(define-public filteraudio
(let ((revision "1")
(commit "2fc669581e2a0ff87fba8de85861b49133306094"))
--
2.41.0
Information forwarded
to
lars <at> 6xq.net, jgart <at> dismail.de, guix-patches <at> gnu.org
:
bug#64732
; Package
guix-patches
.
(Fri, 04 Aug 2023 15:06:02 GMT)
Full text and
rfc822 format available.
Message #62 received at 64732 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/python-xyz.scm (python-ffmpeg-python): New variable.
---
Here's a v4 that hardcodes and no longer propagates ffmpeg. One of the tests check the
command to be run, including the ffmpeg command used, so that test has to be patched too.
gnu/packages/python-xyz.scm | 48 +++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 755b0af4b6..23d14db449 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -139,6 +139,7 @@
;;; Copyright © 2023 Dominik Delgado Steuter <d <at> delgado.nrw>
;;; Copyright © 2023 Ivan Vilata-i-Balaguer <ivan <at> selidor.net>
;;; Copyright © 2023 Ontje Lünsdorf <ontje.luensdorf <at> dlr.de>
+;;; Copyright © 2023 Parnikkapore <poomklao <at> yahoo.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -8918,6 +8919,53 @@ (define-public python-lfdfiles
experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
(license license:bsd-3)))
+(define-public python-ffmpeg-python
+ ;; The latest release (0.2.0) is old and its test suite crashs on Python 3.10.
+ (let ((commit "df129c7ba30aaa9ffffb81a48f53aa7253b0b4e6") (revision "0"))
+ (package
+ (name "python-ffmpeg-python")
+ (version (git-version "0.2.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/kkroening/ffmpeg-python.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1zj4ac37n4igfj21zy405mdlvbpv6jyb12wfpszf8zkhhj2qby4c"))))
+ (build-system python-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'hardcode-ffmpeg
+ (lambda* (#:key inputs #:allow-other-keys)
+ (define ffmpeg (search-input-file inputs "bin/ffmpeg"))
+ (substitute* "ffmpeg/_run.py"
+ (("cmd='ffmpeg'")
+ (string-append "cmd='" ffmpeg "'")))
+ (substitute* "ffmpeg/tests/test_ffmpeg.py"
+ (("out_file.compile\\(\\) == \\['ffmpeg'")
+ (string-append "out_file.compile() == ['" ffmpeg "'")))))
+ ;; Some tests fail with ffmpeg 5+
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest" "-vv"
+ "-k" "not test_pipe and not test__probe")))))))
+ (inputs (list ffmpeg))
+ (propagated-inputs (list python-future))
+ (native-inputs (list python-future python-numpy python-pytest
+ python-pytest-mock python-pytest-runner))
+ (home-page "https://github.com/kkroening/ffmpeg-python")
+ (synopsis "Python bindings for FFmpeg - with complex filtering support")
+ (description
+ "ffmpeg-python allows you to write FFmpeg filtergraphs in familiar
+Python terms, taking care of running ffmpeg with the correct command-line
+arguments. It handles arbitrarily large (directed-acyclic) signal graphs.")
+ (license license:asl2.0))))
+
(define-public python-imageio-ffmpeg
(package
(name "python-imageio-ffmpeg")
base-commit: 1d837aaa32a3a2de8f4a1ac391f92effba50834e
--
2.41.0
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Sun, 20 Aug 2023 21:10:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Parnikkapore <poomklao <at> yahoo.com>
:
bug acknowledged by developer.
(Sun, 20 Aug 2023 21:10:02 GMT)
Full text and
rfc822 format available.
Message #67 received at 64732-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
Parnikkapore <poomklao <at> yahoo.com> skribis:
> * gnu/packages/python-xyz.scm (python-ffmpeg-python): New variable.
[...]
> * gnu/packages/audio.scm (r128gain): New variable.
Applied with the changes below.
Thanks,
Ludo’.
[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index f890e82eb0..b786375599 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -4730,8 +4730,8 @@ (define-public r128gain
format), to allow playback of several tracks or albums at a similar
loudness level. r128gain can also be used as a Python module from other
Python projects to scan and/or tag audio files.")
- ;; setup.py claims LGPL2+, but this is not corroborated anywhere else
- (license license:lgpl2.1)))
+ ;; 'setup.py' claims LGPL2+, 'LICENSE' is LGPLv2.1.
+ (license license:lgpl2.1+)))
(define-public filteraudio
(let ((revision "1")
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 18 Sep 2023 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 327 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.