GNU bug report logs -
#34050
[PATCH] gnu: Add libaom and activate AV1 support in ffmpeg.
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34050 in the body.
You can then email your comments to 34050 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#34050
; Package
guix-patches
.
(Sat, 12 Jan 2019 00:42:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Arne Babenhauserheide <arne_bab <at> web.de>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sat, 12 Jan 2019 00:42:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
* gnu/packages/video.scm (libaom): New variable.
* gnu/packages/video.scm (ffmpeg): Add libaom support.
[inputs] new input libaom.
[arguments] new configure-flag --enable-libaom.
---
gnu/packages/video.scm | 38 +++++++++++++++++++++++++++++++++++++-
1 file changed, 37 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 52facebe4..97ae20b05 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -236,6 +236,40 @@ A/52 standard is used in a variety of applications, including digital
television and DVD. It is also known as AC-3.")
(license license:gpl2+)))
+(define-public libaom
+ (package
+ (name "libaom")
+ (version "22b150bf040608028a56d8bf39e72f771383d836") ;; master
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://aomedia.googlesource.com/aom/")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1pdd5h3n42607n6qmggz4yv8izhjr2kl6knb3kh7gh4v0vy47h1r"))))
+ (build-system cmake-build-system)
+ (native-inputs
+ `(("git" ,git)
+ ("perl" ,perl)
+ ("pkg-config" ,pkg-config)
+ ("python" ,python))) ; to detect the version
+ (arguments
+ `(#:tests? #f ;no check target
+ #:configure-flags
+ ;; build dynamic library
+ (list "-DBUILD_SHARED_LIBS=YES"
+ "-DENABLE_PIC=TRUE"
+ "-DAOM_TARGET_CPU=generic"
+ (string-append "-DCMAKE_INSTALL_PREFIX="
+ (assoc-ref %outputs "out")))))
+ (home-page "https://aomedia.googlesource.com/aom/")
+ (synopsis "AV1 Codec Library")
+ (description "libaom is the reference encoder of AV1.")
+ (license license:bsd-2)))
+
+
(define-public libmpeg2
(package
(name "libmpeg2")
@@ -700,6 +734,7 @@ standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
("opus" ,opus)
("ladspa" ,ladspa)
("lame" ,lame)
+ ("libaom" ,libaom)
("libass" ,libass)
("libbluray" ,libbluray)
("libcaca" ,libcaca)
@@ -778,7 +813,8 @@ standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
;; --enable-libzmq enable message passing via libzmq [no]
;; --enable-libzvbi enable teletext support via libzvbi [no]
;; --enable-opencl enable OpenCL code
- '("--enable-avresample"
+ '("--enable-libaom" ; for AV1
+ "--enable-avresample"
"--enable-gpl" ; enable optional gpl licensed parts
"--enable-shared"
"--enable-frei0r"
--
2.19.2
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#34050
; Package
guix-patches
.
(Sat, 12 Jan 2019 12:14:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 34050 <at> debbugs.gnu.org (full text, mbox):
There’s a problem with my patch: ffmpeg-3.4 inherits the values of ffmpeg but does not support the --enable-aom option.
How can I filter it?
This is the definition:
(define-public ffmpeg-3.4
(package
(inherit ffmpeg)
(version "3.4.5")
(source (origin
(method url-fetch)
(uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
version ".tar.xz"))
(sha256
(base32
"0b59qk5wpc5ksiha76jbhb859g5gxa4w0k6afh3kgvgajiivs73l"))))))
Best wishes,
Arne
Information forwarded
to
guix-patches <at> gnu.org
:
bug#34050
; Package
guix-patches
.
(Sun, 13 Jan 2019 22:20:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 34050 <at> debbugs.gnu.org (full text, mbox):
Hello Arne,
"Arne Babenhauserheide" <Arne_Bab <at> web.de> skribis:
> There’s a problem with my patch: ffmpeg-3.4 inherits the values of ffmpeg but does not support the --enable-aom option.
>
> How can I filter it?
You can use ‘substitute-keyword-arguments’, along these lines:
(define ffmpeg-3.4
(package
(inherit ffmpeg)
;; …
(arguments (substitute-keyword-arguments (package-arguments ffmpeg)
…))))
See the other packages that use it as examples.
HTH!
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#34050
; Package
guix-patches
.
(Tue, 15 Jan 2019 15:25:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 34050 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sat, Jan 12, 2019 at 01:13:09PM +0100, Arne Babenhauserheide wrote:
> There’s a problem with my patch: ffmpeg-3.4 inherits the values of ffmpeg but does not support the --enable-aom option.
>
> How can I filter it?
Take a look at ((guix utils) substitute-keyword-arguments) and examples
of it being used in existing packages. Basically, you'll inherit the
arguments of ffmpeg but replace #:configure-flags with something
appropriate for ffmpeg-3.4.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#34050
; Package
guix-patches
.
(Fri, 18 Jan 2019 23:15:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 34050 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
The following patch now avoids breaking ffmpeg-3.4.
From f4406df33f1ed6dd64757f43ea7354fd5a88d2d3 Mon Sep 17 00:00:00 2001
From: Arne Babenhauserheide <arne_bab <at> web.de>
Date: Sat, 12 Jan 2019 01:24:58 +0100
Subject: [PATCH] gnu: Add libaom and activate AV1 support in ffmpeg.
* gnu/packages/video.scm (libaom): New variable.
* gnu/packages/video.scm (ffmpeg): Add libaom support.
[inputs] new input libaom.
[arguments] new configure-flag --enable-libaom.
* gnu/packages/video.scm (ffmpeg-3.4): filter out libaom.
[inputs] remove inherited libaom
[arguments] remove inherited configure-flag --enable-libaom
---
gnu/packages/video.scm | 45 +++++++++++++++++++++++++++++++++++++++++-
1 file changed, 44 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 947c498c0..a2d56293f 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -237,6 +237,40 @@ A/52 standard is used in a variety of applications, including digital
television and DVD. It is also known as AC-3.")
(license license:gpl2+)))
+(define-public libaom
+ (package
+ (name "libaom")
+ (version "22b150bf040608028a56d8bf39e72f771383d836") ;; master
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://aomedia.googlesource.com/aom/")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1pdd5h3n42607n6qmggz4yv8izhjr2kl6knb3kh7gh4v0vy47h1r"))))
+ (build-system cmake-build-system)
+ (native-inputs
+ `(("git" ,git)
+ ("perl" ,perl)
+ ("pkg-config" ,pkg-config)
+ ("python" ,python))) ; to detect the version
+ (arguments
+ `(#:tests? #f ;no check target
+ #:configure-flags
+ ;; build dynamic library
+ (list "-DBUILD_SHARED_LIBS=YES"
+ "-DENABLE_PIC=TRUE"
+ "-DAOM_TARGET_CPU=generic"
+ (string-append "-DCMAKE_INSTALL_PREFIX="
+ (assoc-ref %outputs "out")))))
+ (home-page "https://aomedia.googlesource.com/aom/")
+ (synopsis "AV1 Codec Library")
+ (description "libaom is the reference encoder of AV1.")
+ (license license:bsd-2)))
+
+
(define-public libmpeg2
(package
(name "libmpeg2")
@@ -701,6 +735,7 @@ standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
("opus" ,opus)
("ladspa" ,ladspa)
("lame" ,lame)
+ ("libaom" ,libaom)
("libass" ,libass)
("libbluray" ,libbluray)
("libcaca" ,libcaca)
@@ -787,6 +822,7 @@ standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
"--enable-fontconfig"
"--enable-gnutls"
"--enable-ladspa"
+ "--enable-libaom"
"--enable-libass"
"--enable-libbluray"
"--enable-libcaca"
@@ -869,7 +905,14 @@ audio/video codec library.")
version ".tar.xz"))
(sha256
(base32
- "0b59qk5wpc5ksiha76jbhb859g5gxa4w0k6afh3kgvgajiivs73l"))))))
+ "0b59qk5wpc5ksiha76jbhb859g5gxa4w0k6afh3kgvgajiivs73l"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments ffmpeg)
+ ((#:configure-flags flags)
+ `(delete "--enable-libaom" ,flags))))
+ (inputs (fold alist-delete
+ (package-inputs ffmpeg)
+ '("libaom")))))
(define-public ffmpegthumbnailer
(package
--
2.19.2
--
Unpolitisch sein
heißt politisch sein
ohne es zu merken
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#34050
; Package
guix-patches
.
(Tue, 05 Mar 2019 03:19:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 34050 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sat, Jan 19, 2019 at 12:13:49AM +0100, Arne Babenhauserheide wrote:
> The following patch now avoids breaking ffmpeg-3.4.
>
> From f4406df33f1ed6dd64757f43ea7354fd5a88d2d3 Mon Sep 17 00:00:00 2001
> From: Arne Babenhauserheide <arne_bab <at> web.de>
> Date: Sat, 12 Jan 2019 01:24:58 +0100
> Subject: [PATCH] gnu: Add libaom and activate AV1 support in ffmpeg.
>
> * gnu/packages/video.scm (libaom): New variable.
> * gnu/packages/video.scm (ffmpeg): Add libaom support.
> [inputs] new input libaom.
> [arguments] new configure-flag --enable-libaom.
> * gnu/packages/video.scm (ffmpeg-3.4): filter out libaom.
> [inputs] remove inherited libaom
> [arguments] remove inherited configure-flag --enable-libaom
Sorry, this fell through the cracks.
I noticed that ffmpeg-for-stepmania (FFmpeg 2) isn't addressed by this
patch.
So, I built ffmpeg-3.4 without filtering out the libaom stuff and it
does build, so I'm wondering how it breaks?
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#34050
; Package
guix-patches
.
(Tue, 05 Mar 2019 15:58:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 34050 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Leo Famulari <leo <at> famulari.name> writes:
> On Sat, Jan 19, 2019 at 12:13:49AM +0100, Arne Babenhauserheide wrote:
>> The following patch now avoids breaking ffmpeg-3.4.
>>
>> From f4406df33f1ed6dd64757f43ea7354fd5a88d2d3 Mon Sep 17 00:00:00 2001
>> From: Arne Babenhauserheide <arne_bab <at> web.de>
>> Date: Sat, 12 Jan 2019 01:24:58 +0100
>> Subject: [PATCH] gnu: Add libaom and activate AV1 support in ffmpeg.
>>
>> * gnu/packages/video.scm (libaom): New variable.
>> * gnu/packages/video.scm (ffmpeg): Add libaom support.
>> [inputs] new input libaom.
>> [arguments] new configure-flag --enable-libaom.
>> * gnu/packages/video.scm (ffmpeg-3.4): filter out libaom.
>> [inputs] remove inherited libaom
>> [arguments] remove inherited configure-flag --enable-libaom
>
> Sorry, this fell through the cracks.
>
> I noticed that ffmpeg-for-stepmania (FFmpeg 2) isn't addressed by this
> patch.
I did not know about it …
> So, I built ffmpeg-3.4 without filtering out the libaom stuff and it
> does build, so I'm wondering how it breaks?
It broke because ffmpeg-3.4 does not have the --enable-libaom configure
flag.
What’s the exact patch you applied?
Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein
ohne es zu merken
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#34050
; Package
guix-patches
.
(Tue, 05 Mar 2019 20:09:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 34050 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Tue, Mar 05, 2019 at 04:57:33PM +0100, Arne Babenhauserheide wrote:
> It broke because ffmpeg-3.4 does not have the --enable-libaom configure
> flag.
>
> What’s the exact patch you applied?
I'm seeing the build fail now. Auto-compilation of my Git tree must not
have been working previously. Testing...
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#34050
; Package
guix-patches
.
(Tue, 05 Mar 2019 20:13:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 34050 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sat, Jan 19, 2019 at 12:13:49AM +0100, Arne Babenhauserheide wrote:
> From f4406df33f1ed6dd64757f43ea7354fd5a88d2d3 Mon Sep 17 00:00:00 2001
> From: Arne Babenhauserheide <arne_bab <at> web.de>
> Date: Sat, 12 Jan 2019 01:24:58 +0100
> Subject: [PATCH] gnu: Add libaom and activate AV1 support in ffmpeg.
>
> * gnu/packages/video.scm (libaom): New variable.
> * gnu/packages/video.scm (ffmpeg): Add libaom support.
> [inputs] new input libaom.
> [arguments] new configure-flag --enable-libaom.
> * gnu/packages/video.scm (ffmpeg-3.4): filter out libaom.
> [inputs] remove inherited libaom
> [arguments] remove inherited configure-flag --enable-libaom
Okay, looks good in general.
> +(define-public libaom
> + (package
> + (name "libaom")
> + (version "22b150bf040608028a56d8bf39e72f771383d836") ;; master
Typically we only package tagged releases. I think the latest libaom
release is 'v1.0.0-errata1'. Can we use that or did it not work for you?
If you didn't try it, I can do it here.
[signature.asc (application/pgp-signature, inline)]
Reply sent
to
Leo Famulari <leo <at> famulari.name>
:
You have taken responsibility.
(Tue, 05 Mar 2019 23:31:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Arne Babenhauserheide <arne_bab <at> web.de>
:
bug acknowledged by developer.
(Tue, 05 Mar 2019 23:31:02 GMT)
Full text and
rfc822 format available.
Message #34 received at 34050-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Tue, Mar 05, 2019 at 03:12:07PM -0500, Leo Famulari wrote:
> On Sat, Jan 19, 2019 at 12:13:49AM +0100, Arne Babenhauserheide wrote:
> > +(define-public libaom
> > + (package
> > + (name "libaom")
> > + (version "22b150bf040608028a56d8bf39e72f771383d836") ;; master
>
> Typically we only package tagged releases. I think the latest libaom
> release is 'v1.0.0-errata1'. Can we use that or did it not work for you?
> If you didn't try it, I can do it here.
To answer my own question, 1.0.0-errata1 installs a broken pkg-config
.pc file [0].
This is fixed in a later commit [1] ... we might as well use the commit
you chose originally, which is later than the pkg-config fix commit.
This library's decoder is *very* expensive — it can't even decode
1280x720 in realtime on my Ivy Bridge i5-3230M. I'm sure it only gets
faster as they keep working on it.
I changed the libaom package to be more idiomatic about versioning from
Git [2] and edited the synopsis and description, and pushed as
84eb265eb8076876d2b569bcdff1e44b44b4b295
Thanks a lot!
[0]
https://bugs.chromium.org/p/aomedia/issues/detail?id=1988
[1]
https://aomedia.googlesource.com/aom/+/0ddc150516b7672101265eac032a11a9aae4cb53
[2]
https://www.gnu.org/software/guix/manual/en/html_node/Version-Numbers.html
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#34050
; Package
guix-patches
.
(Wed, 06 Mar 2019 19:25:01 GMT)
Full text and
rfc822 format available.
Message #37 received at 34050-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Leo Famulari <leo <at> famulari.name> writes:
> On Tue, Mar 05, 2019 at 03:12:07PM -0500, Leo Famulari wrote:
>> On Sat, Jan 19, 2019 at 12:13:49AM +0100, Arne Babenhauserheide wrote:
>> > +(define-public libaom
>> > + (package
>> > + (name "libaom")
>> > + (version "22b150bf040608028a56d8bf39e72f771383d836") ;; master
>>
>> Typically we only package tagged releases. I think the latest libaom
>> release is 'v1.0.0-errata1'. Can we use that or did it not work for you?
>> If you didn't try it, I can do it here.
>
> To answer my own question, 1.0.0-errata1 installs a broken pkg-config
> .pc file [0].
Thank you for checking!
(I do not remember why I chose the commit instead of the tag)
> This is fixed in a later commit [1] ... we might as well use the commit
> you chose originally, which is later than the pkg-config fix commit.
Sounds good.
> This library's decoder is *very* expensive — it can't even decode
> 1280x720 in realtime on my Ivy Bridge i5-3230M. I'm sure it only gets
> faster as they keep working on it.
I take it that you did not test the encoder yet … it takes roughly an
hour per second :-)
But this is a reference for seeing the quality, not for fast de- and
encoding.
> I changed the libaom package to be more idiomatic about versioning from
> Git [2] and edited the synopsis and description, and pushed as
> 84eb265eb8076876d2b569bcdff1e44b44b4b295
>
> Thanks a lot!
Thank you for taking care of the patch!
Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein
ohne es zu merken
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#34050
; Package
guix-patches
.
(Wed, 06 Mar 2019 20:03:02 GMT)
Full text and
rfc822 format available.
Message #40 received at 34050-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Wed, Mar 06, 2019 at 08:24:03PM +0100, Arne Babenhauserheide wrote:
> I take it that you did not test the encoder yet … it takes roughly an
> hour per second :-)
Wooooow! I had heard it was very slow so I only tested the decoder.
I'm looking forward to dav1d and rav1e or some other implementations
leading us to the AV1+Opus promised land ;)
[signature.asc (application/pgp-signature, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 04 Apr 2019 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 360 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.