From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 7DvpK/au42GMugAAgWs5BA (envelope-from ) for ; Sun, 16 Jan 2022 06:36:54 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id ExtnKPau42EudgAA9RJhRA (envelope-from ) for ; Sun, 16 Jan 2022 06:36:54 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F39FA426CD for ; Sun, 16 Jan 2022 06:36:53 +0100 (CET) Received: from localhost ([::1]:46300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n8yDl-0006fS-7B for larch@yhetil.org; Sun, 16 Jan 2022 00:36:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8yCw-0006dB-5S for guix-patches@gnu.org; Sun, 16 Jan 2022 00:36:09 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:49421) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n8yCv-0004xc-Sa for guix-patches@gnu.org; Sun, 16 Jan 2022 00:36:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n8yCv-0002yH-RG for guix-patches@gnu.org; Sun, 16 Jan 2022 00:36:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53295] [PATCH] gnu: Add FFmpeg 5.0. Resent-From: Leo Famulari Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 16 Jan 2022 05:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53295 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53295@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164231134511395 (code B ref -1); Sun, 16 Jan 2022 05:36:01 +0000 Received: (at submit) by debbugs.gnu.org; 16 Jan 2022 05:35:45 +0000 Received: from localhost ([127.0.0.1]:42324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8yCW-0002xa-Co for submit@debbugs.gnu.org; Sun, 16 Jan 2022 00:35:44 -0500 Received: from lists.gnu.org ([209.51.188.17]:47788) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8yCR-0002xK-5F for submit@debbugs.gnu.org; Sun, 16 Jan 2022 00:35:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44644) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8yCQ-0006RL-IZ for guix-patches@gnu.org; Sun, 16 Jan 2022 00:35:30 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:46231) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8yCN-0004db-9J for guix-patches@gnu.org; Sun, 16 Jan 2022 00:35:30 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 77A835C0091; Sun, 16 Jan 2022 00:35:25 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sun, 16 Jan 2022 00:35:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=from:to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=mesmtp; bh=3epKWnAn9UmlV3AnSV6UOnA Ouay6wc0L1M+MuiPe5Mo=; b=Jtg/stwiZMJCnViraJlWGBCetkAUde/xUoF3Zyv WhLlY3u/U6Kj+UYChKjGoWbIcHPs3xeeqbgR2GOwERn+kOKSOo43TAuGG5w2pwWJ y1QRH0HPi7NDPbvpmOGF6WQJVuzhaSKeVbnOTRj4PY7rlk+SACxo8WF6tdcxJ3pb IV04= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=3epKWn An9UmlV3AnSV6UOnAOuay6wc0L1M+MuiPe5Mo=; b=bqPiE6gDZ/AZGi66ruICv8 4AG+vpvGL1o29HsVAealA2peGrT7WHldWXepQIWCxHDGsxEE9kkRsQuAVYW8aJ72 CxRcnJoeUG1zLIS7GoCd7FC5oZv9VL9+z+cdbaMJ3JGJjaF1V5WYJfEaQ0RNPdzS T/qSxM789JZ0VJCnXfD7KnEP5O1WGb31t1viB+8ocTXaOHQ/nmnNYEnIrCY0YOBT E7CE5t2x48c9u5axG2Oo+5T1258j7JuE3sFfVM3WnIWHrlUuDvs+BJBgr3QzPiu6 Gq69Msy1H7w5HDlfmBqApI7rCBwNOXfbnOgmpDiaO0UCxxZFalxAyHUDCtjIbDsw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrtdekgdekfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecufghrlhcuvffnffculdduuddmnecujfgurhephffvuf ffkffogggtgfesthekredtredtjeenucfhrhhomhepnfgvohcuhfgrmhhulhgrrhhiuceo lhgvohesfhgrmhhulhgrrhhirdhnrghmvgeqnecuggftrfgrthhtvghrnhepudetveeufe egkeeiffdvveehuefhffeutdeiiedtudeujedvtdeuledvieeitdetnecuffhomhgrihhn pehffhhmphgvghdrohhrghdpvhhiuggvohhlrghnrdhorhhgnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgvohesfhgrmhhulhgrrhhirdhn rghmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sun, 16 Jan 2022 00:35:25 -0500 (EST) From: Leo Famulari Date: Sun, 16 Jan 2022 00:35:21 -0500 Message-Id: X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=66.111.4.29; envelope-from=leo@famulari.name; helo=out5-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1642311414; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=3epKWnAn9UmlV3AnSV6UOnAOuay6wc0L1M+MuiPe5Mo=; b=mHuJkkC70qsorD5UJCeZeWnQrrpNoMs/fr9iCFHug77zD4/cg7GzYEX7qraU6pTkN9x4kU TBpivGVq7KbtREjCpqniXDTbENrP8dY4RNMcd7eu4LjLP+ekbaVY7OAApsdPM4xLIQL3uT 30KI070B16Zd69eXjAoq17KspSKC30xmf5m1jW6nMezRs1rs81eKHS6ZsjiXb2en9iIcTL laMFfab/5Mf4wcq7iUigmKmG1TlkhJj/j66VcGBlBY68x5SOjzPztq5huEIO8OuE88KnWs ySn/TSx0IWD5tQx0pSpmUF8QHLZjiYW0R+ShtIZInoB5g+rgnNmP0OF1ej+v5w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642311414; a=rsa-sha256; cv=none; b=CHzo7KeJvR43JnEOkVmh2Vj/NNM4ST8NDWUasRCKARQMiSq8r4DTFLtztZSaGhZOzvt1rM PFOKCFDcnPhsL/KuyHXTS/kLX5YhqVPsXhUXLITz1ZnS0U2m8sCFbq0sEY7l4PMiv2tsfL MYmry5pcxpcrUWUcJRosg320Ai2/nRW9HG2FoLXvZ3LOsJAB4Md9H0jppy7z6NJHsiEiBh foTvU6A3r1A5kZn7xkW6rPXty40EsZrXhyijZiY8QmukMaoWn4H2kAQbHXcVZQhBdvcLfe EgrQuwQ3SltTxDfgVtv5uKN2Mp+X0a/1f33Mxe+Y18DYQ5qZza1rEegv6ULhYg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=famulari.name header.s=mesmtp header.b="Jtg/stwi"; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=bqPiE6gD; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.42 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=famulari.name header.s=mesmtp header.b="Jtg/stwi"; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=bqPiE6gD; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: F39FA426CD X-Spam-Score: -1.42 X-Migadu-Scanner: scn1.migadu.com X-TUID: miJsv7bZ6BXh 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 ;;; Copyright © 2018, 2019, 2020, 2021 Marius Bakke ;;; Copyright © 2018, 2019, 2020 Pierre Neidhardt -;;; Copyright © 2018, 2019, 2020 Leo Famulari +;;; Copyright © 2018, 2019, 2020, 2022 Leo Famulari ;;; Copyright © 2018 Brendan Tildesley ;;; Copyright © 2018 Arun Isaac ;;; Copyright © 2018 Björn Höfling @@ -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