Package: guix-patches;
Reported by: Leo Famulari <leo <at> famulari.name>
Date: Sun, 16 Jan 2022 05:36:01 UTC
Severity: normal
Tags: patch
Done: Marius Bakke <marius <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 53295 in the body.
You can then email your comments to 53295 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
guix-patches <at> gnu.org
:bug#53295
; Package guix-patches
.
(Sun, 16 Jan 2022 05:36:01 GMT) Full text and rfc822 format available.Leo Famulari <leo <at> famulari.name>
:guix-patches <at> gnu.org
.
(Sun, 16 Jan 2022 05:36:01 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Leo Famulari <leo <at> famulari.name> To: guix-patches <at> gnu.org Subject: [PATCH] gnu: Add FFmpeg 5.0. Date: Sun, 16 Jan 2022 00:35:21 -0500
Here's the new major release of FFmpeg. We can add it right away and move users over to it incrementally as we test them — having this new version is useful for people like me who use FFmpeg directly. Also, I always found our FFmpeg packages' use of inheritance to be confusing when making changes to them, so I didn't use it here. * gnu/packages/video.scm (ffmpeg-5): New variable. --- gnu/packages/video.scm | 206 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 205 insertions(+), 1 deletion(-) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index a9996e477e..74012ab76d 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -24,7 +24,7 @@ ;;; Copyright © 2018 Roel Janssen <roel <at> gnu.org> ;;; Copyright © 2018, 2019, 2020, 2021 Marius Bakke <marius <at> gnu.org> ;;; Copyright © 2018, 2019, 2020 Pierre Neidhardt <mail <at> ambrevar.xyz> -;;; Copyright © 2018, 2019, 2020 Leo Famulari <leo <at> famulari.name> +;;; Copyright © 2018, 2019, 2020, 2022 Leo Famulari <leo <at> famulari.name> ;;; Copyright © 2018 Brendan Tildesley <mail <at> brendan.scot> ;;; Copyright © 2018 Arun Isaac <arunisaac <at> systemreboot.net> ;;; Copyright © 2018 Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de> @@ -1530,6 +1530,210 @@ (define-public libva-utils operate properly.") (license license:expat))) +(define-public ffmpeg-5 + (package + (name "ffmpeg") + (version "5.0") + (source (origin + (method url-fetch) + (uri (string-append "https://ffmpeg.org/releases/ffmpeg-" + version ".tar.xz")) + (sha256 + (base32 + "163jmk03nwsiqkpz3k04a48r20w5hhx29rpssh7jq1h5sbviksai")))) + (build-system gnu-build-system) + (inputs + `(("dav1d" ,dav1d) + ("fontconfig" ,fontconfig) + ("freetype" ,freetype) + ("frei0r-plugins" ,frei0r-plugins) + ("gnutls" ,gnutls) + ("opus" ,opus) + ("ladspa" ,ladspa) + ("lame" ,lame) + ("libaom" ,libaom) + ("libass" ,libass) + ("libbluray" ,libbluray) + ("libcaca" ,libcaca) + ("libcdio-paranoia" ,libcdio-paranoia) + ("libdrm" ,libdrm) + ("libtheora" ,libtheora) + ("libva" ,libva) + ("libvdpau" ,libvdpau) + ("libvorbis" ,libvorbis) + ("libvpx" ,libvpx) + ("libx11" ,libx11) + ("libx264" ,libx264) + ("mesa" ,mesa) + ("openal" ,openal) + ("pulseaudio" ,pulseaudio) + ;; XXX: rav1e depends on rust, which currently only works on x86_64. + ;; See also the related configure flag when changing this. + ,@(if (string-prefix? "x86_64" (or (%current-target-system) + (%current-system))) + `(("rav1e" ,rav1e)) + '()) + ("sdl" ,sdl2) + ("soxr" ,soxr) + ("speex" ,speex) + ("srt" ,srt) + ("twolame" ,twolame) + ("vidstab" ,vidstab) + ("x265" ,x265) + ("xvid" ,xvid) + ("zlib" ,zlib))) + (native-inputs + (list bc + perl + pkg-config + texinfo + speex + yasm)) + (arguments + `(#:test-target "fate" + #:configure-flags + ;; possible additional inputs: + ;; --enable-avisynth enable reading of AviSynth script + ;; files [no] + ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no] + ;; --enable-libcelt enable CELT decoding via libcelt [no] + ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394 + ;; and libraw1394 [no] + ;; --enable-libfaac enable AAC encoding via libfaac [no] + ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no] + ;; --enable-libflite enable flite (voice synthesis) support via + ;; libflite [no] + ;; --enable-libgme enable Game Music Emu via libgme [no] + ;; --enable-libgsm enable GSM de/encoding via libgsm [no] + ;; --enable-libiec61883 enable iec61883 via libiec61883 [no] + ;; --enable-libilbc enable iLBC de/encoding via libilbc [no] + ;; --enable-libmodplug enable ModPlug via libmodplug [no] + ;; --enable-libnut enable NUT (de)muxing via libnut, + ;; native (de)muxer exists [no] + ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via + ;; libopencore-amrnb [no] + ;; --enable-libopencore-amrwb enable AMR-WB decoding via + ;; libopencore-amrwb [no] + ;; --enable-libopencv enable video filtering via libopencv [no] + ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via + ;; OpenJPEG [no] + ;; --enable-librtmp enable RTMP[E] support via librtmp [no] + ;; --enable-libschroedinger enable Dirac de/encoding via + ;; libschroedinger [no] + ;; --enable-libshine enable fixed-point MP3 encoding via + ;; libshine [no] + ;; --enable-libssh enable SFTP protocol via libssh [no] + ;; (libssh2 does not work) + ;; --enable-libstagefright-h264 enable H.264 decoding via + ;; libstagefright [no] + ;; --enable-libutvideo enable Ut Video encoding and decoding via + ;; libutvideo [no] + ;; --enable-libv4l2 enable libv4l2/v4l-utils [no] + ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no] + ;; --enable-libvo-amrwbenc enable AMR-WB encoding via + ;; libvo-amrwbenc [no] + ;; --enable-libwavpack enable wavpack encoding via libwavpack [no] + ;; --enable-libxavs enable AVS encoding via xavs [no] + ;; --enable-libzmq enable message passing via libzmq [no] + ;; --enable-libzvbi enable teletext support via libzvbi [no] + ;; --enable-opencl enable OpenCL code + '("--enable-gpl" ; enable optional gpl licensed parts + "--enable-shared" + "--enable-frei0r" + "--enable-fontconfig" + "--enable-gnutls" + "--enable-ladspa" + "--enable-libaom" + "--enable-libass" + "--enable-libbluray" + "--enable-libcaca" + "--enable-libcdio" + "--enable-libdav1d" + "--enable-libfreetype" + "--enable-libmp3lame" + "--enable-libopus" + "--enable-libpulse" + ,@(if (string-prefix? "x86_64" (or (%current-target-system) + (%current-system))) + '("--enable-librav1e") + '()) + "--enable-libsoxr" + "--enable-libspeex" + "--enable-libsrt" + "--enable-libtheora" + "--enable-libtwolame" + "--enable-libvidstab" + "--enable-libvorbis" + "--enable-libvpx" + "--enable-libxvid" + "--enable-libx264" + "--enable-libx265" + "--enable-openal" + "--enable-opengl" + "--enable-libdrm" + "--enable-vaapi" + + "--enable-runtime-cpudetect" + + ;; The HTML pages take 7.2 MiB + "--disable-htmlpages" + + ;; The static libraries are 23 MiB + "--disable-static" + + ;; Runtime cpu detection is not implemented on + ;; MIPS, so we disable some features. + "--disable-mips32r2" + "--disable-mipsdsp" + "--disable-mipsdspr2" + "--disable-mipsfpu") + #:phases + (modify-phases %standard-phases + (replace + 'configure + ;; configure does not work followed by "SHELL=..." and + ;; "CONFIG_SHELL=..."; set environment variables instead + (lambda* (#:key outputs configure-flags #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* "configure" + (("#! /bin/sh") (string-append "#!" (which "sh")))) + (setenv "SHELL" (which "bash")) + (setenv "CONFIG_SHELL" (which "bash")) + (apply invoke + "./configure" + (string-append "--prefix=" out) + ;; Add $libdir to the RUNPATH of all the binaries. + (string-append "--extra-ldflags=-Wl,-rpath=" + out "/lib") + configure-flags)))) + ;; For FFmpeg 5.0, correctly mark all tests that require the + ;; downloadble test samples as such. This fixes an error when the test + ;; suite tries to build a test image from a source that it cannot + ;; download in the build container. Adapted from the upstream source + ;; repository: + ;; https://git.videolan.org/?p=ffmpeg.git;a=commit;h=b1ef5882e35d1a95e9c4838d0933084773055345 + (add-before 'check 'fix-tests + (lambda _ + (substitute* "tests/fate/ffmpeg.mak" + (("FATE_FFMPEG-\\$\\(call ALLYES, FILE") + "FATE_SAMPLES_FFMPEG-$(call ALLYES, FILE")))) + (add-before + 'check 'set-ld-library-path + (lambda _ + ;; Allow $(top_builddir)/ffmpeg to find its dependencies when + ;; running tests. + (let* ((dso (find-files "." "\\.so$")) + (path (string-join (map dirname dso) ":"))) + (format #t "setting LD_LIBRARY_PATH to ~s~%" path) + (setenv "LD_LIBRARY_PATH" path) + #t)))))) + (home-page "https://www.ffmpeg.org/") + (synopsis "Audio and video framework") + (description "FFmpeg is a complete, cross-platform solution to record, +convert and stream audio and video. It includes the libavcodec +audio/video codec library.") + (license license:gpl2+))) + (define-public ffmpeg (package (name "ffmpeg") -- 2.34.0
guix-patches <at> gnu.org
:bug#53295
; Package guix-patches
.
(Mon, 24 Jan 2022 09:25:01 GMT) Full text and rfc822 format available.Message #8 received at 53295 <at> debbugs.gnu.org (full text, mbox):
From: Ludovic Courtès <ludo <at> gnu.org> To: Leo Famulari <leo <at> famulari.name> Cc: 53295 <at> debbugs.gnu.org Subject: Re: bug#53295: [PATCH] gnu: Add FFmpeg 5.0. Date: Mon, 24 Jan 2022 10:24:06 +0100
Hi, Leo Famulari <leo <at> famulari.name> skribis: > Here's the new major release of FFmpeg. > > We can add it right away and move users over to it incrementally as we > test them — having this new version is useful for people like me who use > FFmpeg directly. > > Also, I always found our FFmpeg packages' use of inheritance to be > confusing when making changes to them, so I didn't use it here. > > * gnu/packages/video.scm (ffmpeg-5): New variable. Could you remove input labels? (I think ‘guix style’ can’t help because of the conditional in the middle.) That said, it seems to me there’s a lot of duplication here compared to version 4. So I’d be in favor of inheriting from that one. Now, I agree that sometimes attempting to factorize every bit can lead to hard-to-read packages. Perhaps the solution is to duplicate and tweak just those bits where factorization would make things less clear? Thanks, Ludo’.
Marius Bakke <marius <at> gnu.org>
:Leo Famulari <leo <at> famulari.name>
:Message #13 received at 53295-done <at> debbugs.gnu.org (full text, mbox):
From: Marius Bakke <marius <at> gnu.org> To: Ludovic Courtès <ludo <at> gnu.org>, Leo Famulari <leo <at> famulari.name> Cc: 53295-done <at> debbugs.gnu.org Subject: Re: [bug#53295] [PATCH] gnu: Add FFmpeg 5.0. Date: Mon, 23 May 2022 19:58:46 +0200
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> skriver: > Hi, > > Leo Famulari <leo <at> famulari.name> skribis: > >> Here's the new major release of FFmpeg. >> >> We can add it right away and move users over to it incrementally as we >> test them — having this new version is useful for people like me who use >> FFmpeg directly. >> >> Also, I always found our FFmpeg packages' use of inheritance to be >> confusing when making changes to them, so I didn't use it here. >> >> * gnu/packages/video.scm (ffmpeg-5): New variable. > > Could you remove input labels? (I think ‘guix style’ can’t help because > of the conditional in the middle.) > > That said, it seems to me there’s a lot of duplication here compared to > version 4. So I’d be in favor of inheriting from that one. I went ahead and pushed this patch in 1cb10f696813ef23678029, with the adjustments Ludo recommended + G-expressions; as well as a follow-up that makes ffmpeg <at> 4 inherit from it. Thanks Leo & Ludo!
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#53295
; Package guix-patches
.
(Tue, 24 May 2022 01:04:01 GMT) Full text and rfc822 format available.Message #16 received at 53295-done <at> debbugs.gnu.org (full text, mbox):
From: "Leo Famulari" <leo <at> famulari.name> To: "Marius Bakke" <marius <at> gnu.org>, Ludovic Courtès <ludo <at> gnu.org> Cc: 53295-done <at> debbugs.gnu.org Subject: Re: [bug#53295] [PATCH] gnu: Add FFmpeg 5.0. Date: Mon, 23 May 2022 21:03:20 -0400
Thank you Marius! I've been distracted and busy offline so I very much appreciate you finishing this work! On Mon, May 23, 2022, at 13:58, Marius Bakke wrote: > Ludovic Courtès <ludo <at> gnu.org> skriver: > >> Hi, >> >> Leo Famulari <leo <at> famulari.name> skribis: >> >>> Here's the new major release of FFmpeg. >>> >>> We can add it right away and move users over to it incrementally as we >>> test them — having this new version is useful for people like me who use >>> FFmpeg directly. >>> >>> Also, I always found our FFmpeg packages' use of inheritance to be >>> confusing when making changes to them, so I didn't use it here. >>> >>> * gnu/packages/video.scm (ffmpeg-5): New variable. >> >> Could you remove input labels? (I think ‘guix style’ can’t help because >> of the conditional in the middle.) >> >> That said, it seems to me there’s a lot of duplication here compared to >> version 4. So I’d be in favor of inheriting from that one. > > I went ahead and pushed this patch in 1cb10f696813ef23678029, with the > adjustments Ludo recommended + G-expressions; as well as a follow-up > that makes ffmpeg <at> 4 inherit from it. > > Thanks Leo & Ludo! > > Attachments: > * signature.asc
Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Tue, 21 Jun 2022 11:24:04 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.