From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 617DF15815E for ; Sat, 10 Feb 2024 21:25:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1F990E2A89; Sat, 10 Feb 2024 21:25:00 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E44FEE2A87 for ; Sat, 10 Feb 2024 21:24:59 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D9579343072 for ; Sat, 10 Feb 2024 21:24:58 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5F86A358 for ; Sat, 10 Feb 2024 21:24:56 +0000 (UTC) From: "James Le Cuirot" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "James Le Cuirot" Message-ID: <1707600194.2e0e7b01a0c127d0b15a50ae27c6af9b9fb63c8f.chewi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-video/ffmpeg/Manifest media-video/ffmpeg/ffmpeg-6.1.1-r3.ebuild media-video/ffmpeg/ffmpeg-9999.ebuild media-video/ffmpeg/metadata.xml X-VCS-Directories: media-video/ffmpeg/ X-VCS-Committer: chewi X-VCS-Committer-Name: James Le Cuirot X-VCS-Revision: 2e0e7b01a0c127d0b15a50ae27c6af9b9fb63c8f X-VCS-Branch: master Date: Sat, 10 Feb 2024 21:24:56 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 040cd236-7382-451c-ba77-a98f6af3119f X-Archives-Hash: 49b57e9abaf7ba944ac8656cbac8e48c commit: 2e0e7b01a0c127d0b15a50ae27c6af9b9fb63c8f Author: James Le Cuirot gentoo org> AuthorDate: Sat Dec 16 17:45:32 2023 +0000 Commit: James Le Cuirot gentoo org> CommitDate: Sat Feb 10 21:23:14 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e0e7b01 media-video/ffmpeg: Conditionally apply patch set for playback on SoCs As much as we hate deviating from upstream, this patch set is really important for smooth playback on SoCs commonly used for ARM and RISC-V, including the Raspberry Pi. We will enable the "soc" USE flag by default on these architectures. These are different patch sets floating around, but this one from John Cox of Kynesim is the most comprehensive. It is the only one that enables smooth playback for the Pi under Kodi, while benefiting other systems at the same time. John keeps the set reasonably in sync with upstream. The road is long, but the hope is that the changes will eventually be upstreamed. Note that LibreELEC only applies this patch set specifically for its Pi builds, while using lighter sets for some other builds, but they have told me that if we're only going to use one set then this is the one to have. Following this, also drop legacy Raspberry Pi support as media-libs/raspberrypi-userland is being last-rited. Signed-off-by: James Le Cuirot gentoo.org> media-video/ffmpeg/Manifest | 1 + .../{ffmpeg-9999.ebuild => ffmpeg-6.1.1-r3.ebuild} | 28 ++++++++++++++++------ media-video/ffmpeg/ffmpeg-9999.ebuild | 3 +-- media-video/ffmpeg/metadata.xml | 6 +++++ 4 files changed, 29 insertions(+), 9 deletions(-) diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest index 1aa25cb51598..4175fef70c6f 100644 --- a/media-video/ffmpeg/Manifest +++ b/media-video/ffmpeg/Manifest @@ -7,3 +7,4 @@ DIST ffmpeg-6.0.tar.xz 10234012 BLAKE2B c70884911f3a3e40fe87473f241a2a56b303f5ab DIST ffmpeg-6.0.tar.xz.asc 520 BLAKE2B be294d375108b57bca3c687620ce2517c54c99012d82dc7aa1a83d5fe6d5453bd3c8620fdfb743df780cf588983a06a66a458c4e3e454dbe535cbba9da30c48c SHA512 a64cd0f8578fcea4537f5a38634c930d66c8ba4abd3e8e9dcffaeb95c3ad2e754d7bc4fbb5272409d4d32abf8180ef83f7204c6a570b52a37e635efd96cb94ed DIST ffmpeg-6.1.1.tar.xz 10458600 BLAKE2B 77827ff92b47c773ed82e7b7793dbb135c370fe23501169cb1eab08ff5ede77cfd5b397e8fb1d38756812cc82277898fd5c74b7d8495842556570c0c5570daeb SHA512 fca3f8635f29182e3ae0fe843a8a53614e4b47e22c11508df3ff7cdbafbb4b5ee0d82d9b3332871f7c1032033b1cad2f67557d7c5f7f7d85e2adadca122965d5 DIST ffmpeg-6.1.1.tar.xz.asc 520 BLAKE2B 801cd976d10363d1f9fc302351b330cb57e609a266407627ef378172f28974f4a18435b8a77b9cc7a8ff7b75701185211739f685629bbda961c3588c15af1221 SHA512 0e10c1f560bab0812d759d286656593dea5940f02bb52d88d9ba7f10b12b9cc3d7aa2a41c5f7a45b319069e04dce22dc1286b3c1ba685b35cd6d04cd81c5a0f5 +DIST ffmpeg-rpi-6.1.patch 1356823 BLAKE2B 094404eac6d1e43ac094634fa662ce312807013b8af3f80ced03b3d85f2547f803c71181b567c4db2756b2ea54b9bbaf7516a1f72a389d0889c2531edd177275 SHA512 7bdb857146d01ac54ce23c0b2bf32f0255419af52217aed873036cdc82678c3c7ac0e9557ed316fd316faf41c011778bcec277cc4de4d3b7fd9f5eab4078da69 diff --git a/media-video/ffmpeg/ffmpeg-9999.ebuild b/media-video/ffmpeg/ffmpeg-6.1.1-r3.ebuild similarity index 95% copy from media-video/ffmpeg/ffmpeg-9999.ebuild copy to media-video/ffmpeg/ffmpeg-6.1.1-r3.ebuild index 461eb1559ef2..f512e9d9ac81 100644 --- a/media-video/ffmpeg/ffmpeg-9999.ebuild +++ b/media-video/ffmpeg/ffmpeg-6.1.1-r3.ebuild @@ -14,6 +14,10 @@ EAPI=8 # doing so since such a case is unlikely. FFMPEG_SUBSLOT=58.60.60 +SOC_PATCHES=( + ffmpeg-rpi-6.1.patch +) + SCM="" if [ "${PV#9999}" != "${PV}" ] ; then SCM="git-r3" @@ -25,14 +29,15 @@ inherit flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM} DESCRIPTION="Complete solution to record/convert/stream audio and video. Includes libavcodec" HOMEPAGE="https://ffmpeg.org/" +SRC_URI="soc? ( "${SOC_PATCHES[@]/#/https://dev.gentoo.org/~chewi/distfiles/}" )" if [ "${PV#9999}" != "${PV}" ] ; then - SRC_URI="" + : elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot - SRC_URI="mirror://gentoo/${P}.tar.xz" + SRC_URI+=" mirror://gentoo/${P}.tar.xz" else # Release VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/ffmpeg.asc inherit verify-sig - SRC_URI="https://ffmpeg.org/releases/${P/_/-}.tar.xz" + SRC_URI+=" https://ffmpeg.org/releases/${P/_/-}.tar.xz" SRC_URI+=" verify-sig? ( https://ffmpeg.org/releases/${P/_/-}.tar.xz.asc )" BDEPEND=" verify-sig? ( sec-keys/openpgp-keys-ffmpeg )" @@ -84,7 +89,7 @@ FFMPEG_FLAG_MAP=( # decoders amr:libopencore-amrwb amr:libopencore-amrnb codec2:libcodec2 +dav1d:libdav1d fdk:libfdk-aac jpeg2k:libopenjpeg jpegxl:libjxl bluray:libbluray gme:libgme gsm:libgsm - libaribb24 mmal modplug:libmodplug opus:libopus qsv:libvpl libilbc librtmp ssh:libssh + libaribb24 modplug:libmodplug opus:libopus qsv:libvpl libilbc librtmp ssh:libssh speex:libspeex srt:libsrt svg:librsvg nvenc:ffnvcodec vorbis:libvorbis vpx:libvpx zvbi:libzvbi # libavfilter options @@ -108,7 +113,7 @@ FFMPEG_ENCODER_FLAG_MAP=( ) IUSE=" - alsa chromium doc +encode oss +pic sndio static-libs test v4l + alsa chromium doc +encode oss +pic sndio static-libs test v4l soc ${FFMPEG_FLAG_MAP[@]%:*} ${FFMPEG_ENCODER_FLAG_MAP[@]%:*} " @@ -251,7 +256,6 @@ RDEPEND=" libxml2? ( dev-libs/libxml2:=[${MULTILIB_USEDEP}] ) lv2? ( media-libs/lv2[${MULTILIB_USEDEP}] media-libs/lilv[${MULTILIB_USEDEP}] ) lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] ) - mmal? ( media-libs/raspberrypi-userland ) modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] ) openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] ) opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) @@ -264,6 +268,7 @@ RDEPEND=" sdl? ( media-libs/libsdl2[sound,video,${MULTILIB_USEDEP}] ) shaderc? ( media-libs/shaderc[${MULTILIB_USEDEP}] ) sndio? ( media-sound/sndio:=[${MULTILIB_USEDEP}] ) + soc? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] ) srt? ( >=net-libs/srt-1.3.0:=[${MULTILIB_USEDEP}] ) ssh? ( >=net-libs/libssh-0.6.0:=[sftp,${MULTILIB_USEDEP}] ) @@ -342,6 +347,7 @@ REQUIRED_USE=" glslang? ( vulkan !shaderc ) libv4l? ( v4l ) shaderc? ( vulkan !glslang ) + soc? ( libdrm ) test? ( encode ) ${GPL_REQUIRED_USE} ${CPU_REQUIRED_USE}" @@ -354,6 +360,8 @@ S=${WORKDIR}/${P/_/-} PATCHES=( "${FILESDIR}"/chromium-r2.patch + "${FILESDIR}"/${PN}-6.1-wint-conversion.patch + "${FILESDIR}"/${PN}-6.0-fix-lto-type-mismatch.patch "${FILESDIR}"/${PN}-6.1-opencl-parallel-gmake-fix.patch ) @@ -380,6 +388,9 @@ src_prepare() { export revision=git-N-${FFMPEG_REVISION} fi + use soc && + eapply "${SOC_PATCHES[@]/#/${DISTDIR}/}" + default # -fdiagnostics-color=auto gets appended after user flags which @@ -393,6 +404,9 @@ src_prepare() { multilib_src_configure() { local myconf=( ) + # Conditional patch options + use soc && myconf+=( --enable-v4l2-request --enable-libudev --enable-sand ) + # bug 842201 use ia64 && tc-is-gcc && append-flags \ -fno-tree-ccp \ @@ -578,5 +592,5 @@ multilib_src_install_all() { dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES" - use amf && newenvd "${FILESDIR}"/amf-env-vulkan-override 99amf-env-vulkan-override + use amf && elog "To use AMF, prefix the ffmpeg call with the 'vk_pro' wrapper script, e.g. `vk_pro ffmpeg -vcodec h264_amf [...]`" } diff --git a/media-video/ffmpeg/ffmpeg-9999.ebuild b/media-video/ffmpeg/ffmpeg-9999.ebuild index 461eb1559ef2..e79ef6ab48eb 100644 --- a/media-video/ffmpeg/ffmpeg-9999.ebuild +++ b/media-video/ffmpeg/ffmpeg-9999.ebuild @@ -84,7 +84,7 @@ FFMPEG_FLAG_MAP=( # decoders amr:libopencore-amrwb amr:libopencore-amrnb codec2:libcodec2 +dav1d:libdav1d fdk:libfdk-aac jpeg2k:libopenjpeg jpegxl:libjxl bluray:libbluray gme:libgme gsm:libgsm - libaribb24 mmal modplug:libmodplug opus:libopus qsv:libvpl libilbc librtmp ssh:libssh + libaribb24 modplug:libmodplug opus:libopus qsv:libvpl libilbc librtmp ssh:libssh speex:libspeex srt:libsrt svg:librsvg nvenc:ffnvcodec vorbis:libvorbis vpx:libvpx zvbi:libzvbi # libavfilter options @@ -251,7 +251,6 @@ RDEPEND=" libxml2? ( dev-libs/libxml2:=[${MULTILIB_USEDEP}] ) lv2? ( media-libs/lv2[${MULTILIB_USEDEP}] media-libs/lilv[${MULTILIB_USEDEP}] ) lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] ) - mmal? ( media-libs/raspberrypi-userland ) modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] ) openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] ) opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) diff --git a/media-video/ffmpeg/metadata.xml b/media-video/ffmpeg/metadata.xml index b4a5b53e7ee1..f309fd82b53b 100644 --- a/media-video/ffmpeg/metadata.xml +++ b/media-video/ffmpeg/metadata.xml @@ -4,6 +4,11 @@ media-video@gentoo.org + + chewi@gentoo.org + James Le Cuirot + chromium and soc USE flags + Enables support for AMD's Advanced Media Framework (AMF) Enables Adaptive Multi-Rate Audio support @@ -65,6 +70,7 @@ Use media-libs/shaderc to compile GLSL Enable app-arch/snappy support. Required for e.g. Vidvox Hap encoder. Enable support for the media-sound/sndio backend + Apply additional patches for efficient playback on some SoCs (e.g. ARM, RISC-V). Enable support for Secure Reliable Transport (SRT) via net-libs/srt Enable SSH/sftp support via net-libs/libssh. Enables AV1 encoding support via media-libs/svt-av1.