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