diff options
Diffstat (limited to 'meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.3.bb')
| -rw-r--r-- | meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.3.bb | 204 |
1 files changed, 204 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.3.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.3.bb new file mode 100644 index 0000000000..c0112757f0 --- /dev/null +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.3.bb | |||
| @@ -0,0 +1,204 @@ | |||
| 1 | SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video." | ||
| 2 | DESCRIPTION = "FFmpeg is the leading multimedia framework, able to decode, encode, transcode, \ | ||
| 3 | mux, demux, stream, filter and play pretty much anything that humans and machines \ | ||
| 4 | have created. It supports the most obscure ancient formats up to the cutting edge." | ||
| 5 | HOMEPAGE = "https://www.ffmpeg.org/" | ||
| 6 | SECTION = "libs" | ||
| 7 | |||
| 8 | LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & ISC & MIT & BSD-2-Clause & BSD-3-Clause & IJG" | ||
| 9 | LICENSE:${PN} = "GPL-2.0-or-later" | ||
| 10 | LICENSE:libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" | ||
| 11 | LICENSE:libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" | ||
| 12 | LICENSE:libavfilter = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" | ||
| 13 | LICENSE:libavformat = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" | ||
| 14 | LICENSE:libavutil = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" | ||
| 15 | LICENSE:libpostproc = "GPL-2.0-or-later" | ||
| 16 | LICENSE:libswresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" | ||
| 17 | LICENSE:libswscale = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" | ||
| 18 | LICENSE_FLAGS = "commercial" | ||
| 19 | |||
| 20 | LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
| 21 | file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ | ||
| 22 | file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \ | ||
| 23 | file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" | ||
| 24 | |||
| 25 | SRC_URI = " \ | ||
| 26 | https://www.ffmpeg.org/releases/${BP}.tar.xz \ | ||
| 27 | file://av1_ordering_info.patch \ | ||
| 28 | file://vulkan_av1_stable_API.patch \ | ||
| 29 | file://vulkan_fix_gcc14.patch \ | ||
| 30 | file://CVE-2024-28661.patch \ | ||
| 31 | file://CVE-2023-49528.patch \ | ||
| 32 | file://CVE-2024-35365.patch \ | ||
| 33 | file://CVE-2024-36618.patch \ | ||
| 34 | file://CVE-2024-35369.patch \ | ||
| 35 | file://CVE-2025-25473.patch \ | ||
| 36 | file://CVE-2025-22921.patch \ | ||
| 37 | " | ||
| 38 | |||
| 39 | SRC_URI[sha256sum] = "bc5f1e4a4d283a6492354684ee1124129c52293bcfc6a9169193539fbece3487" | ||
| 40 | |||
| 41 | # https://nvd.nist.gov/vuln/detail/CVE-2023-39018 | ||
| 42 | # https://github.com/bramp/ffmpeg-cli-wrapper/issues/291 | ||
| 43 | # https://security-tracker.debian.org/tracker/CVE-2023-39018 | ||
| 44 | # https://bugzilla.suse.com/show_bug.cgi?id=CVE-2023-39018 | ||
| 45 | CVE_STATUS[CVE-2023-39018] = "cpe-incorrect: This issue belongs to ffmpeg-cli-wrapper \ | ||
| 46 | (Java wrapper around the FFmpeg CLI) and not ffmepg itself." | ||
| 47 | |||
| 48 | # Introduced: https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/19f7dae81ab2c19643b97da7556383ee3f721e78 | ||
| 49 | # Fixed: https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/43be8d07281caca2e88bfd8ee2333633e1fb1a13 | ||
| 50 | CVE_STATUS[CVE-2025-1373] = "fixed-version: Vulnerable code not present in any release" | ||
| 51 | |||
| 52 | # Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717 | ||
| 53 | ARM_INSTRUCTION_SET:armv4 = "arm" | ||
| 54 | ARM_INSTRUCTION_SET:armv5 = "arm" | ||
| 55 | ARM_INSTRUCTION_SET:armv6 = "arm" | ||
| 56 | |||
| 57 | # Should be API compatible with libav (which was a fork of ffmpeg) | ||
| 58 | # libpostproc was previously packaged from a separate recipe | ||
| 59 | PROVIDES = "libav libpostproc" | ||
| 60 | |||
| 61 | DEPENDS = "nasm-native" | ||
| 62 | |||
| 63 | inherit autotools pkgconfig | ||
| 64 | |||
| 65 | PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc \ | ||
| 66 | alsa bzlib lzma theora zlib \ | ||
| 67 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv xcb', '', d)}" | ||
| 68 | |||
| 69 | # libraries to build in addition to avutil | ||
| 70 | PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice" | ||
| 71 | PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter" | ||
| 72 | PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec" | ||
| 73 | PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat" | ||
| 74 | PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample" | ||
| 75 | PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale" | ||
| 76 | PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc" | ||
| 77 | |||
| 78 | # features to support | ||
| 79 | PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib" | ||
| 80 | PACKAGECONFIG[altivec] = "--enable-altivec,--disable-altivec," | ||
| 81 | PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2" | ||
| 82 | PACKAGECONFIG[fdk-aac] = "--enable-libfdk-aac --enable-nonfree,--disable-libfdk-aac,fdk-aac" | ||
| 83 | PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl" | ||
| 84 | PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm" | ||
| 85 | PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack" | ||
| 86 | PACKAGECONFIG[libopus] = "--enable-libopus,--disable-libopus,libopus" | ||
| 87 | PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis" | ||
| 88 | PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz" | ||
| 89 | PACKAGECONFIG[mfx] = "--enable-libmfx,--disable-libmfx,intel-mediasdk" | ||
| 90 | PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame" | ||
| 91 | PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl" | ||
| 92 | PACKAGECONFIG[sdl2] = "--enable-sdl2,--disable-sdl2,virtual/libsdl2" | ||
| 93 | PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex" | ||
| 94 | PACKAGECONFIG[srt] = "--enable-libsrt,--disable-libsrt,srt" | ||
| 95 | PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora libogg" | ||
| 96 | PACKAGECONFIG[v4l2] = "--enable-libv4l2,--disable-libv4l2,v4l-utils" | ||
| 97 | PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva" | ||
| 98 | PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau" | ||
| 99 | PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx" | ||
| 100 | PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264" | ||
| 101 | PACKAGECONFIG[x265] = "--enable-libx265,--disable-libx265,x265" | ||
| 102 | PACKAGECONFIG[xcb] = "--enable-libxcb,--disable-libxcb,libxcb" | ||
| 103 | PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv" | ||
| 104 | PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib" | ||
| 105 | |||
| 106 | # Check codecs that require --enable-nonfree | ||
| 107 | USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}" | ||
| 108 | |||
| 109 | def cpu(d): | ||
| 110 | for arg in (d.getVar('TUNE_CCARGS') or '').split(): | ||
| 111 | if arg.startswith('-mcpu='): | ||
| 112 | return arg[6:] | ||
| 113 | return 'generic' | ||
| 114 | |||
| 115 | EXTRA_OECONF = " \ | ||
| 116 | --disable-stripping \ | ||
| 117 | --enable-pic \ | ||
| 118 | --enable-shared \ | ||
| 119 | --enable-pthreads \ | ||
| 120 | ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \ | ||
| 121 | \ | ||
| 122 | --cross-prefix=${TARGET_PREFIX} \ | ||
| 123 | \ | ||
| 124 | --ld='${CCLD}' \ | ||
| 125 | --cc='${CC}' \ | ||
| 126 | --cxx='${CXX}' \ | ||
| 127 | --arch=${TARGET_ARCH} \ | ||
| 128 | --target-os='linux' \ | ||
| 129 | --enable-cross-compile \ | ||
| 130 | --extra-cflags='${CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}' \ | ||
| 131 | --extra-ldflags='${LDFLAGS}' \ | ||
| 132 | --sysroot='${STAGING_DIR_TARGET}' \ | ||
| 133 | ${EXTRA_FFCONF} \ | ||
| 134 | --libdir=${libdir} \ | ||
| 135 | --shlibdir=${libdir} \ | ||
| 136 | --datadir=${datadir}/ffmpeg \ | ||
| 137 | ${@bb.utils.contains('AVAILTUNES', 'mips32r2', '', '--disable-mipsdsp --disable-mipsdspr2', d)} \ | ||
| 138 | --cpu=${@cpu(d)} \ | ||
| 139 | --pkg-config=pkg-config \ | ||
| 140 | " | ||
| 141 | |||
| 142 | EXTRA_OECONF:append:linux-gnux32 = " --disable-asm" | ||
| 143 | |||
| 144 | EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r6', '--disable-mips64r2 --disable-mips32r2', '', d)}" | ||
| 145 | EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r2', '--disable-mips64r6 --disable-mips32r6', '', d)}" | ||
| 146 | EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mips32r2', '--disable-mips64r6 --disable-mips32r6', '', d)}" | ||
| 147 | EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mips32r6', '--disable-mips64r2 --disable-mips32r2', '', d)}" | ||
| 148 | EXTRA_OECONF:append:mips = " --extra-libs=-latomic --disable-mips32r5 --disable-mipsdsp --disable-mipsdspr2 \ | ||
| 149 | --disable-loongson2 --disable-loongson3 --disable-mmi --disable-msa" | ||
| 150 | EXTRA_OECONF:append:riscv32 = " --extra-libs=-latomic --disable-rvv --disable-asm" | ||
| 151 | EXTRA_OECONF:append:armv5 = " --extra-libs=-latomic" | ||
| 152 | EXTRA_OECONF:append:powerpc = " --extra-libs=-latomic" | ||
| 153 | EXTRA_OECONF:append:armv7a = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}" | ||
| 154 | EXTRA_OECONF:append:armv7ve = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}" | ||
| 155 | |||
| 156 | # gold crashes on x86, another solution is to --disable-asm but thats more hacky | ||
| 157 | # ld.gold: internal error in relocate_section, at ../../gold/i386.cc:3684 | ||
| 158 | |||
| 159 | LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" | ||
| 160 | LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -fuse-ld=bfd ', '', d)}" | ||
| 161 | |||
| 162 | EXTRA_OEMAKE = "V=1" | ||
| 163 | |||
| 164 | do_configure() { | ||
| 165 | export TMPDIR="${B}/tmp" | ||
| 166 | mkdir -p ${B}/tmp | ||
| 167 | ${S}/configure ${EXTRA_OECONF} | ||
| 168 | sed -i -e "s,^X86ASMFLAGS=.*,& --debug-prefix-map=${S}=${TARGET_DBGSRC_DIR} --debug-prefix-map=${B}=${TARGET_DBGSRC_DIR},g" ${B}/ffbuild/config.mak | ||
| 169 | } | ||
| 170 | |||
| 171 | # patch out build host paths for reproducibility | ||
| 172 | do_compile:prepend:class-target() { | ||
| 173 | sed -i -e "s,${WORKDIR},,g" ${B}/config.h | ||
| 174 | } | ||
| 175 | |||
| 176 | PACKAGES =+ "libavcodec \ | ||
| 177 | libavdevice \ | ||
| 178 | libavfilter \ | ||
| 179 | libavformat \ | ||
| 180 | libavutil \ | ||
| 181 | libpostproc \ | ||
| 182 | libswresample \ | ||
| 183 | libswscale" | ||
| 184 | |||
| 185 | FILES:libavcodec = "${libdir}/libavcodec${SOLIBS}" | ||
| 186 | FILES:libavdevice = "${libdir}/libavdevice${SOLIBS}" | ||
| 187 | FILES:libavfilter = "${libdir}/libavfilter${SOLIBS}" | ||
| 188 | FILES:libavformat = "${libdir}/libavformat${SOLIBS}" | ||
| 189 | FILES:libavutil = "${libdir}/libavutil${SOLIBS}" | ||
| 190 | FILES:libpostproc = "${libdir}/libpostproc${SOLIBS}" | ||
| 191 | FILES:libswresample = "${libdir}/libswresample${SOLIBS}" | ||
| 192 | FILES:libswscale = "${libdir}/libswscale${SOLIBS}" | ||
| 193 | |||
| 194 | # ffmpeg disables PIC on some platforms (e.g. x86-32) | ||
| 195 | INSANE_SKIP:${MLPREFIX}libavcodec = "textrel" | ||
| 196 | INSANE_SKIP:${MLPREFIX}libavdevice = "textrel" | ||
| 197 | INSANE_SKIP:${MLPREFIX}libavfilter = "textrel" | ||
| 198 | INSANE_SKIP:${MLPREFIX}libavformat = "textrel" | ||
| 199 | INSANE_SKIP:${MLPREFIX}libavutil = "textrel" | ||
| 200 | INSANE_SKIP:${MLPREFIX}libswscale = "textrel" | ||
| 201 | INSANE_SKIP:${MLPREFIX}libswresample = "textrel" | ||
| 202 | INSANE_SKIP:${MLPREFIX}libpostproc = "textrel" | ||
| 203 | |||
| 204 | CVE_PRODUCT = "ffmpeg libswresample libavcodec" | ||
