File ffmpeg-7.spec of Package ffmpeg-7
945
1
#
2
# spec file for package ffmpeg-7
3
#
4
# Copyright (c) 2025 SUSE LLC
5
#
6
# All modifications and additions to the file contributed by third parties
7
# remain the property of their copyright owners, unless otherwise agreed
8
# upon. The license for this file, and modifications and additions to the
9
# file, is the same license as for the pristine package itself (unless the
10
# license for the pristine package is not an Open Source License, in which
11
# case the license is the MIT License). An "Open Source License" is a
12
# license that conforms to the Open Source Definition (Version 1.9)
13
# published by the Open Source Initiative.
14
15
# Please submit bugfixes or comments via https://bugs.opensuse.org/
16
#
17
18
19
%define flavor @BUILD_FLAVOR@%nil
20
#
21
# preamble is present twice, watch out
22
#
23
%if "%flavor" != "ffmpeg-7-mini"
24
25
# Create proper conflicts to make sure we require all from one version
26
# p: Conflict string, eg if you need them all for requires instead
27
# Default value Conflicts:
28
# c: copmare string ie "<" or ">=", must be defined
29
# v: version string ie. "< 42.3.4" or ">= 15.0.2.1", must be defined
30
%define devel_conflicts(p:c:v:) \
31
%define preamble_string %{-p:%{-p*}}%{!-p:Conflicts:} \
32
%define comparator %{-c:%{-c*}}%{!-c:%{error:Comparator not defined}} \
33
%define conflicts_version %{-v:%{-v*}}%{!-v:%{error:Version not defined}} \
34
\
35
%preamble_string libavcodec-devel %comparator %conflicts_version \
36
%preamble_string libavdevice-devel %comparator %conflicts_version \
37
%preamble_string libavfilter-devel %comparator %conflicts_version \
38
%preamble_string libavformat-devel %comparator %conflicts_version \
39
%preamble_string libavutil-devel %comparator %conflicts_version \
40
%preamble_string libpostproc-devel %comparator %conflicts_version \
41
%preamble_string libswresample-devel %comparator %conflicts_version \
42
%preamble_string libswscale-devel %comparator %conflicts_version \
43
%nil
44
45
%if 0%{?BUILD_ORIG}
46
%bcond_without amf_sdk
47
%bcond_without cuda_sdk
48
%else
49
# If software H264 is disabled, the hw driver must be as well:
50
# HW drivers can fail to initialize, namely when the hardware is absent.
51
# Browsers choose video formats on sites like youtube based on `ffmpeg
52
# -codecs` rather than the success/failure status of libav* initialization.
53
# This becomes a problem when a format only has a HW driver;
54
# the browser thinks it can do H264 but never succeeds.
55
%bcond_with amf_sdk
56
%bcond_with cuda_sdk
57
%endif
58
59
%bcond_with amrwb
60
%bcond_with fdk_aac_dlopen
61
%bcond_with opencore
62
%bcond_with smbclient
63
%bcond_with x264
64
%bcond_with x265
65
%bcond_with xvid
66
67
%if 0%{?suse_version} > 1600
68
%bcond_without mysofa
69
%bcond_without vidstab
70
%bcond_without codec2
71
%bcond_without rubberband
72
%bcond_without vulkan
73
%bcond_without amrwb
74
%bcond_without opencore
75
%bcond_without xvid
76
%else
77
%if 0%{?suse_version} > 1500
78
%bcond_without mysofa
79
%bcond_without vidstab
80
%bcond_without codec2
81
%bcond_without rubberband
82
%bcond_without vulkan
83
%bcond_without amrwb
84
%bcond_without opencore
85
%else
86
%bcond_with mysofa
87
%bcond_with vidstab
88
%bcond_with codec2
89
%bcond_with rubberband
90
%bcond_with vulkan
91
%endif
92
%endif
93
94
%define _name ffmpeg
95
%define _major_version 7
96
%define _major_expected 8
97
98
Name: ffmpeg-7
99
Version: 7.1
100
Release: 0
101
Summary: Set of libraries for working with various multimedia formats
102
License: GPL-3.0-or-later
103
Group: Productivity/Multimedia/Video/Editors and Convertors
104
#Git-Clone: git://source.ffmpeg.org/ffmpeg
105
URL: https://ffmpeg.org/
106
Source: https://www.ffmpeg.org/releases/%_name-%version.tar.xz
107
Source2: https://www.ffmpeg.org/releases/%_name-%version.tar.xz.asc
108
Source3: ffmpeg-7-rpmlintrc
109
Source4: enable_decoders
110
Source5: enable_encoders
111
Source6: ffmpeg-dlopen-headers.tar.xz
112
Source92: ffmpeg_get_dlopen_headers.sh
113
Source98: http://ffmpeg.org/ffmpeg-devel.asc#/ffmpeg-7.keyring
114
Source99: baselibs.conf
115
Patch1: ffmpeg-arm6l.diff
116
Patch2: ffmpeg-new-coder-errors.diff
117
Patch3: ffmpeg-codec-choice.diff
118
Patch4: ffmpeg-4.2-dlopen-fdk_aac.patch
119
Patch5: work-around-abi-break.patch
120
Patch10: ffmpeg-chromium.patch
121
Patch91: ffmpeg-dlopen-openh264.patch
122
Patch15: 11013-avcodec-decode-clean-up-if-get_hw_frames_parameters-.patch
123
Patch16: ffmpeg-7-CVE-2025-22919.patch
124
Patch17: ffmpeg-7-CVE-2025-0518.patch
125
Patch18: ffmpeg-7-CVE-2025-25473.patch
126
Patch19: ffmpeg-7-CVE-2025-22921.patch
127
Patch20: 0001-avcodec-libsvtav1-unbreak-build-with-latest-svtav1.patch
128
Patch199: ffmpeg-support-kid-key.patch
129
BuildRequires: ladspa-devel
130
BuildRequires: libgsm-devel
131
BuildRequires: libmp3lame-devel >= 3.98.3
132
BuildRequires: nasm
133
BuildRequires: pkgconfig
134
BuildRequires: pkgconfig(alsa)
135
BuildRequires: pkgconfig(aom) >= 1.0.0
136
BuildRequires: pkgconfig(dav1d) >= 0.5.0
137
BuildRequires: pkgconfig(ffnvcodec) >= 8.1.24.15
138
BuildRequires: pkgconfig(fontconfig) >= 2.4.2
139
BuildRequires: pkgconfig(freetype2)
140
BuildRequires: pkgconfig(fribidi) >= 0.19.0
141
BuildRequires: pkgconfig(gnutls)
142
BuildRequires: pkgconfig(jack)
143
BuildRequires: pkgconfig(libass) >= 0.11.0
144
BuildRequires: pkgconfig(libbluray)
145
BuildRequires: pkgconfig(libbs2b)
146
BuildRequires: pkgconfig(libcdio)
147
BuildRequires: pkgconfig(libcdio_paranoia)
148
BuildRequires: pkgconfig(libdc1394-2)
149
BuildRequires: pkgconfig(libdrm)
150
BuildRequires: pkgconfig(libgme)
151
BuildRequires: pkgconfig(libopenjp2) >= 2.1.0
152
BuildRequires: pkgconfig(libopenmpt) >= 0.2.6557
153
BuildRequires: pkgconfig(libpng)
154
BuildRequires: pkgconfig(libpulse)
155
BuildRequires: pkgconfig(libraw1394)
156
BuildRequires: pkgconfig(libssh) >= 0.6.0
157
BuildRequires: pkgconfig(libva) >= 0.35.0
158
BuildRequires: pkgconfig(libva-drm)
159
BuildRequires: pkgconfig(libva-x11)
160
BuildRequires: pkgconfig(libvmaf) >= 2.0.0
161
BuildRequires: pkgconfig(libwebp) >= 0.4
162
BuildRequires: pkgconfig(libwebpmux) >= 0.4.0
163
BuildRequires: pkgconfig(libxml-2.0)
164
BuildRequires: pkgconfig(libzmq) >= 4.2.1
165
BuildRequires: pkgconfig(lilv-0)
166
BuildRequires: pkgconfig(ogg)
167
BuildRequires: pkgconfig(opus)
168
BuildRequires: pkgconfig(sdl2) >= 2.0.1
169
BuildRequires: pkgconfig(soxr)
170
BuildRequires: pkgconfig(speex)
171
BuildRequires: pkgconfig(srt) >= 1.3.0
172
BuildRequires: pkgconfig(theora) >= 1.1
173
BuildRequires: pkgconfig(twolame) >= 0.3.10
174
BuildRequires: pkgconfig(vdpau)
175
BuildRequires: pkgconfig(vorbis)
176
BuildRequires: pkgconfig(vpx) >= 1.4.0
177
BuildRequires: pkgconfig(x11)
178
BuildRequires: pkgconfig(xcb)
179
BuildRequires: pkgconfig(xcb-shape)
180
BuildRequires: pkgconfig(xcb-shm)
181
BuildRequires: pkgconfig(xcb-xfixes)
182
BuildRequires: pkgconfig(xext)
183
BuildRequires: pkgconfig(zimg) >= 2.7.0
184
BuildRequires: pkgconfig(zlib)
185
BuildRequires: pkgconfig(zvbi-0.2) >= 0.2.28
186
187
%if %{with amf_sdk}
188
BuildRequires: AMF-devel
189
%endif
190
%if %{with mysofa}
191
BuildRequires: libmysofa-devel
192
%endif
193
%if %{with codec2}
194
BuildRequires: pkgconfig(codec2)
195
%endif
196
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700
197
BuildRequires: pkgconfig(libjxl) >= 0.7.0
198
BuildRequires: pkgconfig(libjxl_threads) >= 0.7.0
199
BuildRequires: pkgconfig(librist) >= 0.2.7
200
%endif
201
%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150400
202
BuildRequires: pkgconfig(rav1e) >= 0.5.0
203
%endif
204
%if %{with rubberband}
205
BuildRequires: pkgconfig(rubberband) >= 1.8.1
206
%endif
207
%if %{with smbclient}
208
BuildRequires: pkgconfig(smbclient)
209
%endif
210
%if %{with vidstab}
211
BuildRequires: pkgconfig(vidstab) >= 0.98
212
%endif
213
%if %{with fdk_aac_dlopen}
214
BuildRequires: pkgconfig(fdk-aac)
215
%endif
216
%if %{with xvid}
217
BuildRequires: libxvidcore-devel
218
%endif
219
%if %{with opencore}
220
BuildRequires: pkgconfig(opencore-amrnb)
221
%endif
222
%if %{with amrwb}
223
BuildRequires: pkgconfig(vo-amrwbenc)
224
%endif
225
%if %{with x264}
226
BuildRequires: pkgconfig(x264)
227
%endif
228
%if %{with x265}
229
BuildRequires: pkgconfig(x265)
230
%endif
231
232
%ifarch x86_64 %x86_64 aarch64
233
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150500
234
BuildRequires: pkgconfig(SvtAv1Enc) >= 0.9.0
235
%endif
236
%endif
237
238
%if %{with vulkan}
239
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150600
240
BuildRequires: pkgconfig(libplacebo) >= 6.292.0
241
%else
242
BuildRequires: (pkgconfig(libplacebo) >= 4.192.0 with pkgconfig (libplacebo) < 6.292.0)
243
%endif
244
BuildRequires: pkgconfig(shaderc) >= 2019.1
245
BuildRequires: pkgconfig(vulkan) >= 1.3.255
246
%endif
247
248
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150500
249
%ifarch x86_64 %x86_64
250
BuildRequires: pkgconfig(vpl) >= 2.6
251
%endif
252
%endif
253
254
Provides: ffmpeg-tools = %version
255
Conflicts: ffmpeg-tools
256
Provides: ffmpeg = %version
257
Obsoletes: ffmpeg < %version
258
Requires: (libavcodec61 = %version-%release or ffmpeg-7-mini-libs = %version-%release)
259
Requires: (libavdevice61 = %version-%release or ffmpeg-7-mini-libs = %version-%release)
260
Requires: (libavfilter10 = %version-%release or ffmpeg-7-mini-libs = %version-%release)
261
Requires: (libavformat61 = %version-%release or ffmpeg-7-mini-libs = %version-%release)
262
Requires: (libavutil59 = %version-%release or ffmpeg-7-mini-libs = %version-%release)
263
Requires: (libpostproc58 = %version-%release or ffmpeg-7-mini-libs = %version-%release)
264
Requires: (libswresample5 = %version-%release or ffmpeg-7-mini-libs = %version-%release)
265
Requires: (libswscale8 = %version-%release or ffmpeg-7-mini-libs = %version-%release)
266
%if "%flavor" == "ffmpeg-7-mini"
267
# Patches may subtly change internal APIs, so we're sticking %%release in
268
# Requires lines. It also conveniently blocks openSUSE libav* being combined
269
# with Packman libav*, due to PM's unique %%release numbers.
270
# This use of %%release with %flavor however requires bcnt synchro:
271
#
272
#!BcntSyncTag: ffmpeg-7
273
%endif
274
275
%description
276
FFmpeg is a multimedia framework, able to decode, encode,
277
transcode, mux, demux, stream, filter and play several formats
278
that humans and machines have created.
279
%if !0%{?BUILD_ORIG}
280
281
This build of ffmpeg is limited in the number of codecs supported.
282
%endif
283
284
%package -n libavcodec61
285
Summary: FFmpeg codec library
286
Group: System/Libraries
287
Requires: libavutil59 = %version-%release
288
Requires: libswresample5 = %version-%release
289
%if 0%{?BUILD_ORIG}
290
Provides: libavcodec-full = %version-%release
291
# This can be (and is) required by packages like vlc-codecs -
292
# do follow the shlib name to not get random lib providers
293
Provides: libavcodec61(unrestricted)
294
%endif
295
# For mozillas
296
Provides: libavcodec = %version-%release
297
298
%description -n libavcodec61
299
The libavcodec library provides a generic encoding/decoding framework
300
and contains multiple decoders and encoders for audio, video and
301
subtitle streams, and several bitstream filters.
302
%if !0%{?BUILD_ORIG}
303
304
This build of ffmpeg is limited in the number of codecs supported.
305
%endif
306
307
%package libavcodec-devel
308
Summary: Development files for FFmpeg's codec library
309
Group: Development/Libraries/C and C++
310
Provides: libavcodec-devel = %version-%release
311
Obsoletes: libavcodec-devel < %version-%release
312
Requires: %name-libavutil-devel = %version-%release
313
Requires: libavcodec61 = %version-%release
314
%devel_conflicts -c < -v %_major_version
315
%devel_conflicts -c >= -v %_major_expected
316
317
%description libavcodec-devel
318
The libavcodec library provides a generic encoding/decoding framework
319
and contains multiple decoders and encoders for audio, video and
320
subtitle streams, and several bitstream filters.
321
322
This subpackage contains the headers for FFmpeg libavcodec.
323
324
%package -n libavdevice61
325
Summary: FFmpeg device library
326
Group: System/Libraries
327
Requires: libavcodec61 = %version-%release
328
Requires: libavfilter10 = %version-%release
329
Requires: libavformat61 = %version-%release
330
Requires: libavutil59 = %version-%release
331
332
%description -n libavdevice61
333
The libavdevice library provides a generic framework for grabbing from
334
and rendering to many common multimedia input/output devices, and
335
supports several input and output devices, including Video4Linux2, VfW,
336
DShow, and ALSA.
337
338
%package libavdevice-devel
339
Summary: Development files for FFmpeg's device library
340
Group: Development/Libraries/C and C++
341
Provides: ffmpeg-devel = %version-%release
342
Conflicts: ffmpeg-devel
343
Provides: libavdevice-devel = %version-%release
344
Obsoletes: libavdevice-devel < %version-%release
345
Requires: %name-libavcodec-devel = %version-%release
346
Requires: %name-libavfilter-devel = %version-%release
347
Requires: %name-libavformat-devel = %version-%release
348
Requires: %name-libavutil-devel = %version-%release
349
Requires: %name-libpostproc-devel = %version-%release
350
Requires: %name-libswresample-devel = %version-%release
351
Requires: %name-libswscale-devel = %version-%release
352
Requires: libavdevice61 = %version-%release
353
%devel_conflicts -c < -v %_major_version
354
%devel_conflicts -c >= -v %_major_expected
355
356
%description libavdevice-devel
357
The libavdevice library provides a generic framework for grabbing from
358
and rendering to many common multimedia input/output devices, and
359
supports several input and output devices, including Video4Linux2, VfW,
360
DShow, and ALSA.
361
362
This subpackage contains the headers for FFmpeg libavcodec.
363
364
%package -n libavfilter10
365
Summary: FFmpeg audio and video filtering library
366
Group: System/Libraries
367
Requires: libavcodec61 = %version-%release
368
Requires: libavformat61 = %version-%release
369
Requires: libavutil59 = %version-%release
370
Requires: libpostproc58 = %version-%release
371
Requires: libswresample5 = %version-%release
372
Requires: libswscale8 = %version-%release
373
374
%description -n libavfilter10
375
The libavfilter library provides a generic audio/video filtering
376
framework containing several filters, sources and sinks.
377
378
%package libavfilter-devel
379
Summary: Development files for FFmpeg's audio/video filter library
380
Group: Development/Libraries/C and C++
381
Provides: libavfilter-devel = %version-%release
382
Obsoletes: libavfilter-devel < %version-%release
383
Requires: %name-libavcodec-devel = %version-%release
384
Requires: %name-libavformat-devel = %version-%release
385
Requires: %name-libavutil-devel = %version-%release
386
Requires: %name-libpostproc-devel = %version-%release
387
Requires: %name-libswresample-devel = %version-%release
388
Requires: %name-libswscale-devel = %version-%release
389
Requires: libavfilter10 = %version-%release
390
%devel_conflicts -c < -v %_major_version
391
%devel_conflicts -c >= -v %_major_expected
392
393
%description libavfilter-devel
394
The libavfilter library provides a generic audio/video filtering
395
framework containing several filters, sources and sinks.
396
397
This subpackage contains the headers for FFmpeg libavfilter.
398
399
%package -n libavformat61
400
Summary: FFmpeg's stream format library
401
Group: System/Libraries
402
Requires: libavcodec61 = %version-%release
403
Requires: libavutil59 = %version-%release
404
405
%description -n libavformat61
406
The libavformat library provides a generic framework for multiplexing
407
and demultiplexing (muxing and demuxing) audio, video and subtitle
408
streams. It encompasses multiple muxers and demuxers for multimedia
409
container formats.
410
%if !0%{?BUILD_ORIG}
411
412
This build of ffmpeg is limited in the number of codecs supported.
413
%endif
414
415
%package libavformat-devel
416
Summary: Development files for FFmpeg's stream format library
417
Group: Development/Libraries/C and C++
418
Provides: libavformat-devel = %version-%release
419
Obsoletes: libavformat-devel < %version-%release
420
Requires: %name-libavcodec-devel = %version-%release
421
Requires: %name-libavutil-devel = %version-%release
422
Requires: %name-libswresample-devel = %version-%release
423
Requires: libavformat61 = %version-%release
424
%devel_conflicts -c < -v %_major_version
425
%devel_conflicts -c >= -v %_major_expected
426
427
%description libavformat-devel
428
The libavformat library provides a generic framework for multiplexing
429
and demultiplexing (muxing and demuxing) audio, video and subtitle
430
streams. It encompasses multiple muxers and demuxers for multimedia
431
container formats.
432
433
This subpackage contains the headers for FFmpeg libavformat.
434
435
%package -n libavutil59
436
Summary: FFmpeg's utility library
437
Group: System/Libraries
438
439
%description -n libavutil59
440
The libavutil library is a utility library to aid portable multimedia
441
programming. It contains safe portable string functions, random
442
number generators, data structures, additional mathematics functions,
443
cryptography and multimedia related functionality (like enumerations
444
for pixel and sample formats).
445
446
%package libavutil-devel
447
Summary: Development files for FFmpeg's utility library
448
Group: Development/Libraries/C and C++
449
Provides: libavutil-devel = %version-%release
450
Obsoletes: libavutil-devel < %version-%release
451
Requires: libavutil59 = %version-%release
452
%devel_conflicts -c < -v %_major_version
453
%devel_conflicts -c >= -v %_major_expected
454
455
%description libavutil-devel
456
The libavutil library is a utility library to aid portable multimedia
457
programming. It contains safe portable string functions, random
458
number generators, data structures, additional mathematics functions,
459
cryptography and multimedia related functionality (like enumerations
460
for pixel and sample formats).
461
462
This subpackage contains the headers for FFmpeg libavutil.
463
464
%package -n libpostproc58
465
Summary: FFmpeg post-processing library
466
Group: System/Libraries
467
Requires: libavutil59 = %version-%release
468
469
%description -n libpostproc58
470
A library with video postprocessing filters, such as deblocking and
471
deringing filters, noise reduction, automatic contrast and brightness
472
correction, linear/cubic interpolating deinterlacing.
473
474
%package libpostproc-devel
475
Summary: Development files for the FFmpeg post-processing library
476
Group: Development/Libraries/C and C++
477
Provides: libpostproc-devel = %version-%release
478
Obsoletes: libpostproc-devel < %version-%release
479
Requires: %name-libavutil-devel = %version-%release
480
Requires: libpostproc58 = %version-%release
481
%devel_conflicts -c < -v %_major_version
482
%devel_conflicts -c >= -v %_major_expected
483
484
%description libpostproc-devel
485
A library with video postprocessing filters, such as deblocking and
486
deringing filters, noise reduction, automatic contrast and brightness
487
correction, linear/cubic interpolating deinterlacing.
488
489
This subpackage contains the headers for FFmpeg libpostproc.
490
491
%package -n libswresample5
492
Summary: FFmpeg software resampling library
493
Group: System/Libraries
494
Requires: libavutil59 = %version-%release
495
496
%description -n libswresample5
497
The libswresample library performs audio conversion between different
498
sample rates, channel layout and channel formats.
499
500
%package libswresample-devel
501
Summary: Development files for the FFmpeg software resampling library
502
Group: Development/Libraries/C and C++
503
Provides: libswresample-devel = %version-%release
504
Obsoletes: libswresample-devel < %version-%release
505
Requires: %name-libavutil-devel = %version-%release
506
Requires: libswresample5 = %version-%release
507
%devel_conflicts -c < -v %_major_version
508
%devel_conflicts -c >= -v %_major_expected
509
510
%description libswresample-devel
511
The libswresample library performs audio conversion between different
512
sample rates, channel layout and channel formats.
513
514
This subpackage contains the headers for FFmpeg libswresample.
515
516
%package -n libswscale8
517
Summary: FFmpeg image scaling and colorspace/pixel conversion library
518
Group: System/Libraries
519
Requires: libavutil59 = %version-%release
520
521
%description -n libswscale8
522
The libswscale library performs image scaling and colorspace and
523
pixel format conversion operations.
524
525
%package libswscale-devel
526
Summary: Development files for FFmpeg's image scaling and colorspace library
527
Group: Development/Libraries/C and C++
528
Conflicts: libswscale-devel
529
Provides: libswscale-devel = %version-%release
530
Requires: %name-libavutil-devel = %version-%release
531
Requires: libswscale8 = %version-%release
532
%devel_conflicts -c < -v %_major_version
533
%devel_conflicts -c >= -v %_major_expected
534
535
%description libswscale-devel
536
The libswscale library performs image scaling and colorspace and
537
pixel format conversion operations.
538
539
This subpackage contains the headers for FFmpeg libswscale.
540
541
%prep
542
%autosetup -p1 -a6 -n %_name-%version
543
544
%build
545
%ifarch %ix86 %arm
546
%define _lto_cflags %nil
547
%endif
548
%if "%_lto_cflags" != ""
549
%global _lto_cflags %_lto_cflags -ffat-lto-objects
550
%endif
551
CFLAGS="%optflags" \
552
%if 0%{?suse_version} > 1500
553
%ifarch %ix86
554
%else
555
LDFLAGS="%_lto_cflags" \
556
%endif
557
%endif
558
./configure \
559
--prefix="%_prefix" \
560
--libdir="%_libdir" \
561
--shlibdir="%_libdir" \
562
--incdir="%_includedir/ffmpeg" \
563
--extra-cflags="%optflags" \
564
--optflags="%optflags" \
565
--disable-htmlpages \
566
--enable-pic \
567
--disable-stripping \
568
--enable-shared \
569
--disable-static \
570
--enable-gpl \
571
--enable-version3 \
572
%if %{with smbclient}
573
--enable-libsmbclient \
574
%endif
575
--disable-openssl \
576
--enable-gnutls \
577
--enable-ladspa \
578
%if %{with vulkan}
579
--enable-libshaderc \
580
--enable-vulkan \
581
--enable-libplacebo \
582
%endif
583
%if %{with amf}
584
--enable-amf \
585
%endif
586
%if !%{with cuda_sdk}
587
--disable-cuda-sdk \
588
%endif
589
--enable-libaom \
590
--enable-libass \
591
--enable-libbluray \
592
--enable-libbs2b \
593
--enable-libcdio \
594
%if %{with codec2}
595
--enable-libcodec2 \
596
%endif
597
--enable-libdav1d \
598
--enable-libdc1394 \
599
--enable-libdrm \
600
--enable-libfontconfig \
601
--enable-libfreetype \
602
--enable-libfribidi \
603
--enable-libgsm \
604
--enable-libjack \
605
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700
606
--enable-libjxl \
607
--enable-librist \
608
%endif
609
--enable-libmp3lame \
610
%if %{with mysofa}
611
--enable-libmysofa \
612
%endif
613
--enable-libopenjpeg \
614
--enable-libopenmpt \
615
--enable-libopenh264-dlopen \
616
--enable-libopus \
617
--enable-libpulse \
618
%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150400
619
--enable-librav1e \
620
%endif
621
%if %{with rubberband}
622
--enable-librubberband \
623
%endif
624
%ifarch x86_64 %x86_64 aarch64
625
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150500
626
--enable-libsvtav1 \
627
%endif
628
%endif
629
--enable-libsoxr \
630
--enable-libspeex \
631
--enable-libssh \
632
--enable-libsrt \
633
--enable-libtheora \
634
--enable-libtwolame \
635
%if %{with vidstab}
636
--enable-libvidstab \
637
%endif
638
--enable-libvmaf \
639
--enable-libvorbis \
640
--enable-libvpx \
641
--enable-libwebp \
642
--enable-libxml2 \
643
--enable-libzimg \
644
--enable-libzmq \
645
--enable-libzvbi \
646
%if 0%{?suse_version} > 1500
647
%ifarch %ix86
648
%else
649
--enable-lto \
650
%endif
651
%endif
652
--enable-lv2 \
653
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150500
654
%ifarch x86_64 %x86_64
655
--enable-libvpl \
656
%endif
657
%endif
658
--enable-vaapi \
659
--enable-vdpau \
660
--enable-version3 \
661
%if %{with fdk_aac_dlopen}
662
--enable-libfdk-aac-dlopen \
663
--enable-nonfree \
664
%endif
665
%if %{with opencore}
666
--enable-libopencore-amrnb \
667
--enable-libopencore-amrwb \
668
%endif
669
%if %{with amrwb}
670
--enable-libvo-amrwbenc \
671
%endif
672
%if %{with x264}
673
--enable-libx264 \
674
%endif
675
%if %{with x265}
676
--enable-libx265 \
677
%endif
678
%if %{with xvid}
679
--enable-libxvid \
680
%endif
681
%if !0%{?BUILD_ORIG}
682
--enable-muxers \
683
--enable-demuxers \
684
--disable-encoders \
685
--disable-decoders \
686
--disable-decoder=h264,hevc,vc1 \
687
--enable-encoder="$(perl -pe 's{^(\w*).*}{$1,}gs' <%_sourcedir/enable_encoders)" \
688
--enable-decoder="$(perl -pe 's{^(\w*).*}{$1,}gs' <%_sourcedir/enable_decoders)" \
689
690
for i in H264 HEVC VC1; do
691
grep -q "#define CONFIG_${i}_DECODER 0" config_components.h
692
done
693
%endif
694
695
cat config.h
696
%make_build
697
698
%global extratools aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper probetest qt-faststart seek_print sidxindex trasher
699
700
for i in %extratools; do
701
%make_build "tools/$i"
702
done
703
704
%install
705
b="%buildroot"
706
%make_install install-man
707
rm -Rf "$b/%_datadir/ffmpeg/examples"
708
for i in %extratools; do
709
cp -a "tools/$i" "$b/%_bindir/"
710
done
711
712
%post -n libavcodec61 -p /sbin/ldconfig
713
%postun -n libavcodec61 -p /sbin/ldconfig
714
%post -n libavdevice61 -p /sbin/ldconfig
715
%postun -n libavdevice61 -p /sbin/ldconfig
716
%post -n libavfilter10 -p /sbin/ldconfig
717
%postun -n libavfilter10 -p /sbin/ldconfig
718
%post -n libavformat61 -p /sbin/ldconfig
719
%postun -n libavformat61 -p /sbin/ldconfig
720
%post -n libavutil59 -p /sbin/ldconfig
721
%postun -n libavutil59 -p /sbin/ldconfig
722
%post -n libpostproc58 -p /sbin/ldconfig
723
%postun -n libpostproc58 -p /sbin/ldconfig
724
%post -n libswresample5 -p /sbin/ldconfig
725
%postun -n libswresample5 -p /sbin/ldconfig
726
%post -n libswscale8 -p /sbin/ldconfig
727
%postun -n libswscale8 -p /sbin/ldconfig
728
729
%files
730
%doc Changelog CREDITS README.md
731
%_bindir/*
732
%_mandir/man1/ff*.1*
733
%_datadir/ffmpeg/
734
735
%files -n libavcodec61
736
%license COPYING.GPLv2 LICENSE.md
737
%_libdir/libavcodec.so.*
738
739
%files -n libavdevice61
740
%license COPYING.GPLv2 LICENSE.md
741
%_libdir/libavdevice.so.*
742
743
%files -n libavfilter10
744
%license COPYING.GPLv2 LICENSE.md
745
%_libdir/libavfilter.so.*
746
747
%files -n libavformat61
748
%license COPYING.GPLv2 LICENSE.md
749
%_libdir/libavformat.so.*
750
751
%files -n libavutil59
752
%license COPYING.GPLv2 LICENSE.md
753
%_libdir/libavutil.so.*
754
755
%files -n libpostproc58
756
%license COPYING.GPLv2 LICENSE.md
757
%_libdir/libpostproc.so.*
758
759
%files -n libswresample5
760
%license COPYING.GPLv2 LICENSE.md
761
%_libdir/libswresample.so.*
762
763
%files -n libswscale8
764
%license COPYING.GPLv2 LICENSE.md
765
%_libdir/libswscale.so.*
766
767
%files libavcodec-devel
768
%dir %_includedir/ffmpeg/
769
%_includedir/ffmpeg/libavcodec/
770
%_libdir/libavcodec.so
771
%_libdir/pkgconfig/libavcodec.pc
772
%_mandir/man3/libavcodec.3*
773
774
%files libavdevice-devel
775
%dir %_includedir/ffmpeg/
776
%_includedir/ffmpeg/libavdevice/
777
%_libdir/libavdevice.so
778
%_libdir/pkgconfig/libavdevice.pc
779
%_mandir/man3/libavdevice.3*
780
781
%files libavfilter-devel
782
%dir %_includedir/ffmpeg/
783
%_includedir/ffmpeg/libavfilter/
784
%_libdir/libavfilter.so
785
%_libdir/pkgconfig/libavfilter.pc
786
%_mandir/man3/libavfilter.3*
787
788
%files libavformat-devel
789
%dir %_includedir/ffmpeg/
790
%_includedir/ffmpeg/libavformat/
791
%_libdir/libavformat.so
792
%_libdir/pkgconfig/libavformat.pc
793
%_mandir/man3/libavformat.3*
794
795
%files libavutil-devel
796
%dir %_includedir/ffmpeg/
797
%_includedir/ffmpeg/libavutil/
798
%_libdir/libavutil.so
799
%_libdir/pkgconfig/libavutil.pc
800
%_mandir/man3/libavutil.3*
801
802
%files libpostproc-devel
803
%dir %_includedir/ffmpeg/
804
%_includedir/ffmpeg/libpostproc/
805
%_libdir/libpostproc.so
806
%_libdir/pkgconfig/libpostproc.pc
807
808
%files libswresample-devel
809
%dir %_includedir/ffmpeg/
810
%_includedir/ffmpeg/libswresample/
811
%_libdir/libswresample.so
812
%_libdir/pkgconfig/libswresample.pc
813
%_mandir/man3/libswresample.3*
814
815
%files libswscale-devel
816
%dir %_includedir/ffmpeg/
817
%_includedir/ffmpeg/libswscale/
818
%_libdir/libswscale.so
819
%_libdir/pkgconfig/libswscale.pc
820
%_mandir/man3/libswscale.3*
821
822
%else
823
%define _name ffmpeg
824
Name: ffmpeg-7-mini
825
Version: 7.1
826
Release: 0
827
Summary: Set of libraries for working with various multimedia formats
828
License: GPL-3.0-or-later
829
URL: https://ffmpeg.org/
830
#Git-Clone: git://source.ffmpeg.org/ffmpeg
831
Source: https://www.ffmpeg.org/releases/%_name-%version.tar.xz
832
Source2: https://www.ffmpeg.org/releases/%_name-%version.tar.xz.asc
833
Source3: ffmpeg-7-rpmlintrc
834
Source98: http://ffmpeg.org/ffmpeg-devel.asc#/ffmpeg-7.keyring
835
Patch1: ffmpeg-arm6l.diff
836
Patch3: ffmpeg-codec-choice.diff
837
Patch4: ffmpeg-4.2-dlopen-fdk_aac.patch
838
Patch5: work-around-abi-break.patch
839
Patch10: ffmpeg-chromium.patch
840
Patch91: ffmpeg-dlopen-openh264.patch
841
Patch15: 11013-avcodec-decode-clean-up-if-get_hw_frames_parameters-.patch
842
Patch199: ffmpeg-support-kid-key.patch
843
BuildRequires: c_compiler
844
Requires: this-is-only-for-build-envs
845
846
%description
847
FFmpeg is a multimedia framework.
848
This package merely builds the API for the sake of other packages.
849
850
%package libs
851
# Even with mini, we want ff5 libs to be coinstallable to ff4-devel(!),
852
# hence mini-libs and mini-devel are still separated.
853
Summary: Feature-reduced build of FFmpeg, a multimedia framework
854
Conflicts: libavcodec61
855
Conflicts: libavdevice61
856
Conflicts: libavfilter10
857
Conflicts: libavformat61
858
Conflicts: libavutil59
859
Conflicts: libpostproc58
860
Conflicts: libswresample5
861
Conflicts: libswscale8
862
Requires: this-is-only-for-build-envs
863
864
%description libs
865
FFmpeg is a multimedia framework.
866
This package contains a cut-down version for building other packages.
867
868
%package devel
869
Summary: Header files for feature-reduced FFmpeg build
870
Provides: libavcodec-devel = %version-%release
871
Conflicts: libavcodec-devel
872
Provides: libavdevice-devel = %version-%release
873
Conflicts: libavdevice-devel
874
Provides: libavfilter-devel = %version-%release
875
Conflicts: libavfilter-devel
876
Provides: libavformat-devel = %version-%release
877
Conflicts: libavformat-devel
878
Provides: libavutil-devel = %version-%release
879
Conflicts: libavutil-devel
880
Provides: libpostproc-devel = %version-%release
881
Conflicts: libpostproc-devel
882
Provides: libswresample-devel = %version-%release
883
Conflicts: libswresample-devel
884
Provides: libswscale-devel = %version-%release
885
Conflicts: libswscale-devel
886
Requires: %name-libs = %version-%release
887
Requires: this-is-only-for-build-envs
888
889
%description devel
890
FFmpeg is a multimedia framework.
891
This package contains the headers accompanying %name.
892
893
%prep
894
%autosetup -p1 -n %_name-%version
895
896
%build
897
%define _lto_cflags %nil
898
CFLAGS="%optflags" \
899
./configure \
900
--prefix="%_prefix" \
901
--libdir="%_libdir" \
902
--shlibdir="%_libdir" \
903
--incdir="%_includedir/ffmpeg" \
904
--extra-cflags="%optflags" \
905
--optflags="%optflags" \
906
--disable-htmlpages --disable-stripping --disable-x86asm \
907
--disable-static --enable-shared --enable-pic \
908
--enable-gpl --enable-version3 \
909
--disable-muxers --disable-demuxers \
910
--disable-encoders --disable-decoders \
911
--disable-programs --disable-doc
912
for i in H264 HEVC VC1; do
913
grep -q "#define CONFIG_${i}_DECODER 0" config_components.h
914
done
915
cat config.h
916
%make_build
917
918
%install
919
b="%buildroot"
920
%make_install
921
rm -Rf "$b/%_datadir/ffmpeg/examples"
922
923
%post libs -p /sbin/ldconfig
924
%postun libs -p /sbin/ldconfig
925
926
%files libs
927
%_libdir/libavcodec.so.*
928
%_libdir/libavdevice.so.*
929
%_libdir/libavfilter.so.*
930
%_libdir/libavformat.so.*
931
%_libdir/libavutil.so.*
932
%_libdir/libpostproc.so.*
933
%_libdir/libswresample.so.*
934
%_libdir/libswscale.so.*
935
936
%files devel
937
%license COPYING.GPLv2 LICENSE.md
938
%_libdir/*.so
939
%_libdir/pkgconfig/*.pc
940
%_includedir/ffmpeg/
941
942
%endif
943
944
%changelog
945