2 # - avisynth+ >= 3.7.1 https://github.com/AviSynth/AviSynthPlus
4 # - libtensorflow [-ltensorflow tensorflow/c/c_api.h]
5 # - AMF >= 1.4.28.0 (available at https://github.com/GPUOpen-LibrariesAndSDKs/AMF, where is original source?)
7 # How to deal with ffmpeg/opencv/chromaprint checken-egg problem:
8 # 1. make-request -r --with bootstrap ffmpeg.spec
9 # 2 bump release of opencv.spec and chromaprint.spec
10 # 3. make-request -r opencv.spec chromaprint.spec
11 # 4. bump release of ffmpeg.spec
12 # 5. make-request -r ffmpeg.spec
15 %bcond_with bootstrap # disable features to able to build without installed ffmpeg
16 %bcond_with nonfree # unblock non free options of package (currently: cuda_nvcc, decklib, fdk_aac, npp, openssl, libressl/libtls)
17 %bcond_without amr # AMR-NB/WB de/encoding via libopencore-amrnb/wb
18 %bcond_without aom # AV1 viden de/encoding via libaom
19 %bcond_without aribb24 # ARIB text and caption decoding via libaribb24
20 %bcond_without avs # AVS encoding via xavs
21 %bcond_without avs2 # AVS2 de/encoding via libdavs2/libxavs2
22 %bcond_without bs2b # BS2B audio filter support
23 %bcond_without caca # textual display using libcaca
24 %bcond_without codec2 # codec2 support using libcodec2
25 %bcond_without chromaprint # audio fingerprinting with chromaprint
26 %bcond_with cudasdk # NVIDIA CUDA code using nvcc from CUDA SDK [BR: cuda.h, non-free]
27 %bcond_with dav1d # AV1 decoding via libdav1d
28 %bcond_without dc1394 # IIDC-1394 grabbing using libdc1394
29 %bcond_with decklink # Blackmagic DeckLink I/O support (requires nonfree)
30 %bcond_with fdk_aac # AAC de/encoding via libfdk_aac (requires nonfree)
31 %bcond_without ffnvcodec # NVIDIA codecs support using ffnvcodec headers (covered: cuda cuvid nvdec nvenc)
32 %bcond_without flite # flite voice synthesis support
33 %bcond_without frei0r # frei0r video filtering
34 %bcond_without fribidi # fribidi support
35 %bcond_with glslang # GLSL->SPIRV compilation via libglslang
36 %bcond_without gme # Game Music Emu support
37 %bcond_without gsm # GSM de/encoding via libgsm
38 %bcond_without iec61883 # ec61883 via libiec61883
39 %bcond_without ilbc # iLBC de/encoding via WebRTC libilbc
40 %bcond_without kvazaar # Kvazaar HEVC encoder support
41 %bcond_without ladspa # LADSPA audio filtering
42 %bcond_without lcms # ICC profile support via lcms2
43 %bcond_with lensfun # lensfun lens correction
44 %bcond_with libdrm # Linux Direct Rendering Manager code
45 %bcond_without libjxl # JPEG XL de/encoding via libjxl
46 %bcond_with libklvanc # Kernel Labs VANC processing (in decklink driver)
47 %bcond_without libmysofa # sofalizer filter
48 %bcond_with libplacebo # libplacebo filters
49 %bcond_without librist # RIST support via librist
50 %bcond_with librsvg # SVG rasterization via librsvg
51 %bcond_with libxml2 # XML parsing using libxml2
52 %bcond_without lv2 # LV2 audio filtering
53 %bcond_with mfx # MFX hardware acceleration support
54 %bcond_without modplug # ModPlug via libmodplug
55 %bcond_with npp # NVIDIA Performance Primitives-based code (requires nonfree) [BR: libnppc+libnppi, npp.h]
56 %bcond_without omx # OpenMAX IL support
57 %bcond_without openal # OpenAL 1.1 capture support
58 %bcond_without opencl # OpenCL 1.2 code
59 %bcond_without opencv # OpenCV video filtering
60 %bcond_without opengl # OpenGL rendering support
61 %bcond_with openh264 # OpenH264 H.264 encoder
62 %bcond_without openmpt # OpenMPT module decoder
63 %bcond_with pocketsphinx # asr filter using PocketSphinx
64 %bcond_without pulseaudio # PulseAudio input support
65 %bcond_without rabbitmq # RabbitMQ support
66 %bcond_with rav1e # AV1 encoding using rav1e
67 %bcond_with rkmpp # Rockchip Media Process Platform code [implies libdrm]
68 %bcond_without rubberband # rubberband filter
69 %bcond_without shaderc # GLSL->SPIRV compilation via libshaderc
70 %bcond_without shine # shine fixed-point MP3 encoder
71 %bcond_with smb # SMB support via libsmbclient
72 %bcond_without snappy # Snappy compression support (needed for hap encoding)
73 %bcond_without soxr # SoX Resampler support
74 %bcond_without srt # Haivision SRT protocol support
75 %bcond_without ssh # SFTP protocol support via libssh
76 %bcond_with svtav1 # AV1 encoding via SVT-AV1
77 %bcond_with tesseract # OCR filter based on Tesseract
78 %bcond_without theora # Theora encoding via libtheora
79 %bcond_with uavs3d # AVS3 decoding via libuavs3d (TODO: enable when 1.1.41 released)
80 %bcond_with v4l2_request # V4L2 request API for stateless hw decoding
81 %bcond_without va # VAAPI (Video Acceleration API)
82 %bcond_without vapoursynth # VapourSynth demuxer
83 %bcond_without vidstab # vid.stab video stabilization support
84 %bcond_without vmaf # VMAF filter support
85 %bcond_without voamrwbenc # MR-WB encoding via libvo-amrwbenc
86 %bcond_with vpl # oneVPL instead of MFX
87 %bcond_without vpx # VP8, a high-quality video codec
88 %bcond_without vulkan # Vulkan code
89 %bcond_without webp # WebP encoding support
90 %bcond_without x264 # H.264 x264 encoder
91 %bcond_without x265 # H.265/HEVC x265 encoder
92 %bcond_without xvid # vid encoding via xvidcore
93 %bcond_without zimg # zscale filter based on z.lib
94 %bcond_without zmq # 0MQ message passing
95 %bcond_without zvbi # teletext via libzvbi
96 %bcond_without doc # HTML documentation
97 %bcond_with tests # "make check" (some tests fail as of 2.5)
100 %undefine with_opencv
101 %undefine with_chromaprint
103 %if %{with rkmpp} || %{with v4l2_request}
104 %define with_libdrm 1
107 %undefine with_shaderc
113 %ifnarch %{ix86} %{x8664}
114 %undefine with_ffnvcodec
116 %ifnarch %{ix86} %{x8664} aarch64
119 %ifnarch %{ix86} %{x8664} %{arm}
125 %ifarch i686 pentium4 athlon %{x8664} x32
126 %define with_crystalhd 1
128 Summary: FFmpeg - a very fast video and audio converter
129 Summary(pl.UTF-8): FFmpeg - szybki konwerter audio/wideo
133 # LGPL or GPL, chosen at configure time (GPL version is more featured)
134 # GPL: frei0r libcdio libdavs2 rubberband vidstab x264 x265 xavs xavs2 xvid
135 # v3 (allows *GPLv3 or Apache-licensed libs): gmp lensfun opencore-amr vmaf vo-*enc rkmpp
137 License: GPL v3+ with LGPL v3+ parts
138 Group: Applications/Multimedia
139 Source0: https://ffmpeg.org/releases/%{name}-%{version}.tar.xz
140 # Source0-md5: 47b6c5d930937413c3e308e2fdb3dfb5
141 Patch0: %{name}-omx-libnames.patch
142 Patch1: %{name}-atadenoise.patch
143 Patch2: opencv4.patch
144 Patch3: v4l2-request-hwdec.patch
145 URL: http://www.ffmpeg.org/
146 %{?with_decklink:BuildRequires: Blackmagic_DeckLink_SDK >= 10.11}
147 %{?with_openal:BuildRequires: OpenAL-devel >= 1.1}
148 %{?with_opencl:BuildRequires: OpenCL-devel >= 1.2}
149 %{?with_opengl:BuildRequires: OpenGL-GLX-devel}
150 # libomxil-bellagio-devel or limoi-core-devel (just headers, library is dlopened at runtime)
151 %{?with_omx:BuildRequires: OpenMAX-IL-devel}
152 BuildRequires: SDL2-devel >= 2.0.1
153 BuildRequires: SDL2-devel < 3.0.0
154 %{?with_vulkan:BuildRequires: Vulkan-Loader-devel >= 1.2.189}
155 BuildRequires: alsa-lib-devel
156 %{?with_aom:BuildRequires: aom-devel >= 1.0.0}
157 %{?with_aribb24:BuildRequires: aribb24-devel}
158 BuildRequires: bzip2-devel
159 BuildRequires: celt-devel >= 0.11.0
160 %{?with_codec2:BuildRequires: codec2-devel}
161 %{?with_dav1d:BuildRequires: dav1d-devel >= 0.5.0}
162 %{?with_avs2:BuildRequires: davs2-devel >= 1.6}
163 %{?with_fdk_aac:BuildRequires: fdk-aac-devel}
164 %{?with_flite:BuildRequires: flite-devel >= 1.4}
165 BuildRequires: fontconfig-devel
166 BuildRequires: freetype-devel
167 %{?with_frei0r:BuildRequires: frei0r-devel}
168 %{?with_fribidi:BuildRequires: fribidi-devel}
169 %{?with_gme:BuildRequires: game-music-emu-devel}
171 # require version with altivec support fixed
172 BuildRequires: gcc >= 5:3.3.2-3
174 %{?with_glslang:BuildRequires: glslang-devel >= 11}
175 BuildRequires: gmp-devel
176 BuildRequires: gnutls-devel
177 BuildRequires: jack-audio-connection-kit-devel
178 %{?with_kvazaar:BuildRequires: kvazaar-devel >= 0.8.1}
179 %{?with_ladspa:BuildRequires: ladspa-devel}
180 BuildRequires: lame-libs-devel >= 3.98.3
181 %{?with_lcms:BuildRequires: lcms2-devel >= 2.13}
182 %{?with_lensfun:BuildRequires: lensfun-devel >= 0.3.95}
183 BuildRequires: libass-devel >= 0.11.0
185 BuildRequires: libatomic-devel
187 %{?with_iec61883:BuildRequires: libavc1394-devel}
188 %{?with_bs2b:BuildRequires: libbs2b-devel}
189 BuildRequires: libbluray-devel
190 %{?with_caca:BuildRequires: libcaca-devel}
191 BuildRequires: libcdio-paranoia-devel >= 0.90-2
192 %{?with_chromaprint:BuildRequires: libchromaprint-devel}
193 %{?with_crystalhd:BuildRequires: libcrystalhd-devel}
194 %{?with_dc1394:BuildRequires: libdc1394-devel >= 2}
195 %{?with_libdrm:BuildRequires: libdrm-devel}
196 %{?with_gsm:BuildRequires: libgsm-devel}
197 %{?with_iec61883:BuildRequires: libiec61883-devel}
198 %{?with_libjxl:BuildRequires: libjxl-devel >= 0.7.0}
199 %{?with_libklvanc:BuildRequires: libklvanc-devel}
200 %{?with_modplug:BuildRequires: libmodplug-devel}
201 %{?with_libmysofa:BuildRequires: libmysofa-devel >= 0.7}
202 %{?with_openmpt:BuildRequires: libopenmpt-devel >= 0.4.5}
203 %{?with_libplacebo:BuildRequires: libplacebo-devel >= 4.192.0}
204 %if %{with dc1394} || %{with iec61883}
205 BuildRequires: libraw1394-devel >= 2
207 %{?with_librist:BuildRequires: librist-devel >= 0.2.7}
208 %{?with_librsvg:BuildRequires: librsvg-devel >= 2}
209 BuildRequires: librtmp-devel
210 %{?with_ssh:BuildRequires: libssh-devel}
211 %{?with_smb:BuildRequires: libsmbclient-devel}
212 %{?with_theora:BuildRequires: libtheora-devel >= 1.0-0.beta3}
213 BuildRequires: libtool >= 2:1.4d-3
214 BuildRequires: libv4l-devel
216 BuildRequires: libva-devel >= 1.0.3
217 BuildRequires: libva-drm-devel >= 1.0.3
218 BuildRequires: libva-x11-devel >= 1.0.3
220 BuildRequires: libvdpau-devel >= 1.3
221 BuildRequires: libvorbis-devel
222 %{?with_vpx:BuildRequires: libvpx-devel >= 1.4.0}
223 %{?with_webp:BuildRequires: libwebp-devel >= 0.4.0}
225 %{?with_x264:BuildRequires: libx264-devel >= 0.1.3-1.20130827_2245}
227 %{?with_x265:BuildRequires: libx265-devel >= 2.0}
228 # libxcb xcb-shm xcb-xfixes xcb-shape
229 BuildRequires: libxcb-devel >= 1.4
230 %{?with_libxml2:BuildRequires: libxml2-devel >= 2}
231 %{?with_lv2:BuildRequires: lilv-devel}
232 %{?with_v4l2_request:BuildRequires: linux-libc-headers >= 7:5.11.0}
233 %{?with_lv2:BuildRequires: lv2-devel}
234 %{?with_mfx:BuildRequires: mfx_dispatch-devel >= 1.28}
240 %{?with_ffnvcodec:BuildRequires: nv-codec-headers >= 12.0.16.0}
241 %{?with_vpl:BuildRequires: oneVPL-devel >= 2.6}
243 %{?with_amr:BuildRequires: opencore-amr-devel}
244 %{?with_opencv:BuildRequires: opencv-devel >= 2}
245 %{?with_openh264:BuildRequires: openh264-devel >= 1.3}
246 BuildRequires: openjpeg2-devel >= 2.1
247 BuildRequires: opus-devel
248 BuildRequires: perl-Encode
249 BuildRequires: perl-tools-pod
250 %{?with_pocketsphinx:BuildRequires: pocketsphinx-devel > 0.8}
251 BuildRequires: pkgconfig
252 %{?with_pulseaudio:BuildRequires: pulseaudio-devel}
253 %{?with_rabbitmq:BuildRequires: rabbitmq-c-devel >= 0.7.1}
254 %{?with_rav1e:BuildRequires: rav1e-devel >= 0.5.0}
255 %{?with_rkmpp:BuildRequires: rockchip-mpp-devel >= 1.3.7}
256 BuildRequires: rpmbuild(macros) >= 2.007
257 %{?with_rubberband:BuildRequires: rubberband-devel >= 1.8.1}
258 %{?with_shaderc:BuildRequires: shaderc-devel >= 2019.1}
259 %{?with_shine:BuildRequires: shine-devel >= 3.0.0}
260 %{?with_snappy:BuildRequires: snappy-devel}
261 %{?with_soxr:BuildRequires: soxr-devel}
262 BuildRequires: speex-devel >= 1:1.2-rc1
263 %{?with_glslang:BuildRequires: spirv-tools-devel}
264 %{?with_srt:BuildRequires: srt-devel >= 1.3}
265 %{?with_svtav1:BuildRequires: svt-av1-devel >= 0.9.0}
266 BuildRequires: tar >= 1:1.22
267 %{?with_tesseract:BuildRequires: tesseract-devel}
268 %{?with_doc:BuildRequires: tetex}
269 %{?with_doc:BuildRequires: texi2html}
270 %{?with_doc:BuildRequires: texinfo}
271 BuildRequires: twolame-devel >= 0.3.10
272 %{?with_uavs3d:BuildRequires: uavs3d-devel >= 1.1.41}
273 %{?with_v4l2_request:BuildRequires: udev-devel}
274 %{?with_vapoursynth:BuildRequires: vapoursynth-devel >= 42}
275 %{?with_vidstab:BuildRequires: vid.stab-devel >= 0.98}
276 %{?with_vmaf:BuildRequires: vmaf-devel >= 2.0.0}
277 %{?with_voamrwbenc:BuildRequires: vo-amrwbenc-devel}
278 %{?with_ilbc:BuildRequires: webrtc-libilbc-devel}
279 %{?with_avs:BuildRequires: xavs-devel}
280 %{?with_avs2:BuildRequires: xavs2-devel >= 1.3}
281 BuildRequires: xorg-lib-libX11-devel
282 BuildRequires: xorg-lib-libXext-devel
283 BuildRequires: xorg-lib-libXv-devel
284 %{?with_xvid:BuildRequires: xvid-devel >= 1:1.1.0}
286 BuildRequires: xz-devel
287 %{?with_zmq:BuildRequires: zeromq-devel >= 4.2.1}
288 %{?with_zimg:BuildRequires: zimg-devel >= 2.7.0}
289 BuildRequires: zlib-devel
290 %{?with_zvbi:BuildRequires: zvbi-devel >= 0.2.28}
291 # overflows maximum hash table size
292 BuildConflicts: pdksh < 5.2.14-57
293 Requires: %{name}-libs = %{version}-%{release}
295 Suggests: fonts-TTF-Roboto
296 Obsoletes: libpostproc < 2:1.0-1
297 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
299 %define specflags -fno-strict-aliasing -fPIC
301 # -fomit-frame-pointer is always needed on x86 due to lack of registers (-fPIC takes one)
302 %define specflags_ia32 -fomit-frame-pointer
303 # -mmmx is needed to enable <mmintrin.h> code.
304 %define specflags_i586 -mmmx
305 %define specflags_i686 -mmmx
308 FFmpeg is a complete solution to record, convert and stream audio and
309 video. It is a command line tool to convert one video file format to
310 another. It also supports grabbing and encoding in real time from a TV
313 %description -l pl.UTF-8
314 FFmpeg to kompletne rozwiÄ…zanie nagrywania, konwersji i transmisji
315 strumieni dźwięku i obrazu. Jest to działające z linii poleceń
316 narzędzie do konwersji obrazu z jednego formatu do innego. Obsługuje
317 także przechwytywanie i kodowanie w czasie rzeczywistym z karty
321 Summary: ffmpeg libraries
322 Summary(pl.UTF-8): Biblioteki ffmpeg
324 Requires: SDL2 >= 2.0.1
325 %{?with_vulkan:Requires: Vulkan-Loader >= 1.2.189}
326 %{?with_aom:Requires: aom >= 1.0.0}
327 Requires: celt >= 0.11.0
328 %{?with_dav1d:Requires: dav1d >= 0.5.0}
329 %{?with_avs2:Requires: davs2 >= 1.6}
330 %{?with_flite:Requires: flite >= 1.4}
331 %if "%(rpm -q --qf '%{V}' gnutls-devel)" >= "3.0.20"
332 # uses gnutls_certificate_set_x509_system_trust if >= 3.0.20
333 Requires: gnutls-libs >= 3.0.20
335 %{?with_kvazaar:Requires: kvazaar-libs >= 0.8.1}
336 Requires: libass >= 0.11.0
337 %{?with_libjxl:Requires: libjxl >= 0.7.0}
338 %{?with_libmysofa:Requires: libmysofa >= 0.7}
339 %{?with_openmpt:Requires: libopenmpt >= 0.4.5}
340 %{?with_libplacebo:Requires: libplacebo >= 4.192.0}
341 %{?with_librist:Requires: librist >= 0.2.7}
342 %{?with_theora:Requires: libtheora >= 1.0-0.beta3}
344 Requires: libva >= 1.0.3
345 Requires: libva-drm >= 1.0.3
346 Requires: libva-x11 >= 1.0.3
348 Requires: libvdpau >= 1.3
349 %{?with_vpx:Requires: libvpx >= 1.4.0}
350 %{?with_webp:Requires: libwebp >= 0.4.0}
351 %{?with_x264:Requires: libx264 >= 0.1.3-1.20130827_2245}
352 %{?with_x265:Requires: libx265 >= 2.0}
353 Requires: libxcb >= 1.4
354 Requires: lame-libs >= 3.98.3
355 %{?with_lcms:Requires: lcms2 >= 2.13}
356 %{?with_mfx:Requires: mfx_dispatch >= 1.28}
357 %{?with_vpl:Requires: oneVPL >= 2.6}
358 %{?with_openh264:Requires: openh264 >= 1.3}
359 Requires: openjpeg2 >= 2.1
360 %{?with_rabbitmq:Requires: rabbitmq-c >= 0.7.1}
361 %{?with_rav1e:Requires: rav1e-libs >= 0.5.0}
362 %{?with_rkmpp:Requires: rockchip-mpp >= 1.3.7}
363 %{?with_rubberband:Requires: rubberband-libs >= 1.8.1}
364 %{?with_shine:Requires: shine >= 3.0.0}
365 Requires: speex >= 1:1.2-rc1
366 %{?with_srt:Requires: srt >= 1.3}
367 %{?with_svtav1:Requires: svt-av1 >= 0.9.0}
368 Requires: twolame-libs >= 0.3.10
369 %{?with_uavs3d:Requires: uavs3d >= 1.1.41}
370 %{?with_vapoursynth:Requires: vapoursynth >= 42}
371 %{?with_vidstab:Requires: vid.stab >= 0.98}
372 %{?with_vmaf:Requires: vmaf-libs >= 2.0.0}
373 %{?with_avs2:Requires: xavs2 >= 1.3}
374 %{?with_xvid:Requires: xvid >= 1:1.1.0}
375 %{?with_zmq:Requires: zeromq >= 4.2.1}
376 %{?with_zimg:Requires: zimg >= 2.7.0}
377 %{?with_zvbi:Requires: zvbi >= 0.2.28}
380 This package contains the ffmpeg shared libraries:
381 - the codec library (libavcodec). It supports most existing encoding
382 formats (MPEG, DivX, MPEG4, AC3, DV...),
383 - demuxer library (libavformat). It supports most existing file
384 formats (AVI, MPEG, OGG, Matroska, ASF...),
385 - video postprocessing library (libpostproc).
387 %description libs -l pl.UTF-8
388 Ten pakiet zawiera biblioteki współdzielone ffmpeg:
389 - bibliotekę kodeków (libavcodec); obsługuje większość istniejących
390 formatów kodowania (MPEG, DivX, MPEG4, AC3, DV...),
391 - bibliotekę demuksera (libavformat); obsługuje większość istniejących
392 formatów plików (AVI, MPEG, OGG, Matroska, ASF...),
393 - bibliotekÄ™ postprocessingu (libpostproc).
396 Summary: ffmpeg header files
397 Summary(pl.UTF-8): Pliki nagłówkowe ffmpeg
398 Group: Development/Libraries
399 Requires: %{name}-libs = %{version}-%{release}
400 # Libs.private from *.pc
401 %{?with_openal:Requires: OpenAL-devel >= 1.1}
402 %{?with_opencl:Requires: OpenCL-devel >= 1.2}
403 %{?with_opengl:Requires: OpenGL-devel}
404 Requires: SDL2-devel >= 2.0.1
405 %{?with_vulkan:Requires: Vulkan-Loader-devel >= 1.2.189}
406 Requires: alsa-lib-devel
407 %{?with_aom:Requires: aom-devel >= 1.0.0}
408 %{?with_aribb24:Requires: aribb24-devel}
409 Requires: bzip2-devel
410 Requires: celt-devel >= 0.11.0
411 %{?with_codec2:Requires: codec2-devel}
412 %{?with_dav1d:Requires: dav1d-devel >= 0.5.0}
413 %{?with_avs2:Requires: davs2-devel >= 1.6}
414 %{?with_fdk_aac:Requires: fdk-aac-devel}
415 %{?with_flite:Requires: flite-devel >= 1.4}
416 Requires: fontconfig-devel
417 Requires: freetype-devel
418 %{?with_fribidi:Requires: fribidi-devel}
419 %{?with_gme:Requires: game-music-emu-devel}
420 %{?with_glslang:Requires: glslang-devel}
421 Requires: gnutls-devel
422 Requires: jack-audio-connection-kit-devel
423 %{?with_kvazaar:Requires: kvazaar-devel >= 0.8.1}
424 Requires: lame-libs-devel >= 3.98.3
425 %{?with_lcms:Requires: lcms2-devel >= 2.13}
426 %{?with_lensfun:Requires: lensfun-devel >= 0.3.95}
427 Requires: libass-devel >= 0.11.0
428 %{?with_iec61883:Requires: libavc1394-devel}
429 Requires: libbluray-devel
430 %{?with_bs2b:Requires: libbs2b-devel}
431 %{?with_caca:Requires: libcaca-devel}
432 Requires: libcdio-paranoia-devel >= 0.90-2
433 %{?with_chromaprint:Requires: libchromaprint-devel}
434 %{?with_crystalhd:Requires: libcrystalhd-devel}
435 %{?with_dc1394:Requires: libdc1394-devel >= 2}
436 %{?with_libdrm:Requires: libdrm-devel}
437 %{?with_gsm:Requires: libgsm-devel}
438 %{?with_iec61883:Requires: libiec61883-devel}
439 %{?with_libjxl:Requires: libjxl-devel >= 0.7.0}
440 %{?with_libklvanc:Requires: libklvanc-devel}
441 %{?with_modplug:Requires: libmodplug-devel}
442 %{?with_libmysofa:Requires: libmysofa-devel >= 0.7}
443 %{?with_openmpt:Requires: libopenmpt-devel >= 0.4.5}
444 %if %{with dc1394} || %{with iec61883}
445 Requires: libraw1394-devel >= 2
447 %{?with_librist:Requires: librist-devel >= 0.2.7}
448 %{?with_librsvg:Requires: librsvg-devel >= 2}
449 Requires: librtmp-devel
450 %{?with_smb:Requires: libsmbclient-devel}
451 %{?with_ssh:Requires: libssh-devel}
452 Requires: libstdc++-devel
453 %{?with_theora:Requires: libtheora-devel >= 1.0-0.beta3}
454 Requires: libv4l-devel
455 %{?with_va:Requires: libva-devel >= 1.0.3}
456 %{?with_va:Requires: libva-drm-devel >= 1.0.3}
457 %{?with_va:Requires: libva-x11-devel >= 1.0.3}
458 Requires: libvdpau-devel >= 1.3
459 Requires: libvorbis-devel
460 %{?with_vpx:Requires: libvpx-devel >= 1.4.0}
461 %{?with_webp:Requires: libwebp-devel >= 0.4.0}
462 %{?with_x264:Requires: libx264-devel >= 0.1.3-1.20130827_2245}
463 %{?with_x265:Requires: libx265-devel >= 2.0}
464 # libxcb xcb-shm xcb-xfixes xcb-shape
465 Requires: libxcb-devel >= 1.4
466 %{?with_libxml2:Requires: libxml2-devel >= 2}
467 %{?with_lv2:Requires: lilv-devel}
468 %{?with_mfx:Requires: mfx_dispatch-devel >= 1.28}
469 %{?with_vpl:Requires: oneVPL-devel >= 2.6}
470 %{?with_amr:Requires: opencore-amr-devel}
471 %{?with_opencv:Requires: opencv-devel >= 2}
472 %{?with_openh264:Requires: openh264-devel >= 1.3}
473 Requires: openjpeg2-devel >= 2.1
475 %{?with_pulseaudio:Requires: pulseaudio-devel}
476 %{?with_rabbitmq:Requires: rabbitmq-c-devel >= 0.7.1}
477 %{?with_rav1e:Requires: rav1e-devel >= 0.5.0}
478 %{?with_rkmpp:Requires: rockchip-mpp-devel >= 1.3.7}
479 %{?with_rubberband:Requires: rubberband-devel >= 1.8.1}
480 %{?with_shaderc:Requires: shaderc-devel >= 2019.1}
481 %{?with_shine:Requires: shine-devel >= 3.0.0}
482 %{?with_snappy:Requires: snappy-devel}
483 %{?with_soxr:Requires: soxr-devel}
484 Requires: speex-devel >= 1:1.2-rc1
485 %{?with_glslang:Requires: spirv-tools-devel}
486 %{?with_srt:Requires: srt-devel >= 1.3}
487 %{?with_svtav1:Requires: svt-av1-devel >= 0.9.0}
488 %{?with_tesseract:Requires: tesseract-devel}
489 Requires: twolame-devel >= 0.3.10
490 %{?with_uavs3d:Requires: uavs3d-devel >= 1.1.41}
491 %{?with_vapoursynth:Requires: vapoursynth-devel >= 42}
492 %{?with_vidstab:Requires: vid.stab-devel >= 0.98}
493 %{?with_voamrwbenc:Requires: vo-amrwbenc-devel}
494 %{?with_vmaf:Requires: vmaf-devel >= 2.0.0}
495 %{?with_ilbc:Requires: webrtc-libilbc-devel}
496 %{?with_avs:Requires: xavs-devel}
497 %{?with_avs2:Requires: xavs2-devel >= 1.3}
498 Requires: xorg-lib-libX11-devel
499 Requires: xorg-lib-libXext-devel
500 Requires: xorg-lib-libXv-devel
501 %{?with_xvid:Requires: xvid-devel >= 1:1.1.0}
503 %{?with_zmq:Requires: zeromq-devel >= 4.2.1}
504 %{?with_zimg:Requires: zimg-devel >= 2.7.0}
506 %{?with_zvbi:Requires: zvbi-devel >= 0.2.28}
507 Obsoletes: libpostproc-devel < 2:1.0-1
512 %description devel -l pl.UTF-8
513 Pliki nagłówkowe ffmpeg.
516 Summary: ffmpeg static libraries
517 Summary(pl.UTF-8): Statyczne biblioteki ffmpeg
518 Group: Development/Libraries
519 Requires: %{name}-devel = %{version}-%{release}
522 ffmpeg static libraries (libavcodec and libavformat).
524 %description static -l pl.UTF-8
525 Statyczne biblioteki ffmpeg (libavcodec i libavformat).
528 Summary: FFplay - SDL-based media player
529 Summary(pl.UTF-8): FFplay - odtwarzacz mediów oparty na SDL
530 Group: Applications/Multimedia
531 Requires: %{name}-libs = %{version}-%{release}
534 FFplay is a very simple and portable media player using the FFmpeg
535 libraries and the SDL library. It is mostly used as a test bench for
536 the various APIs of FFmpeg.
538 %description ffplay -l pl.UTF-8
539 FFplay to bardzo prosty i przenośny odtwarzacz mediów używający
540 bibliotek FFmpeg oraz biblioteki SDL. Jest używany głównie do
541 testowania różnych API FFmpeg.
544 Summary: FFmpeg documentation in HTML format
545 Summary(pl.UTF-8): Dokumentacja pakietu FFmpeg w formacie HTML
550 FFmpeg documentation in HTML format.
552 %description doc -l pl.UTF-8
553 Dokumentacja pakietu FFmpeg w formacie HTML.
560 %if %{with v4l2_request}
564 # package the grep result for mplayer, the result formatted as ./mplayer/configure
565 cat <<EOF > ffmpeg-avconfig
567 libavdecoders_all="$(sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
568 libavencoders_all="$(sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
569 libavparsers_all="$(sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
570 libavbsfs_all="$(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
571 libavdemuxers_all="$(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')"
572 libavmuxers_all="$(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')"
573 libavprotocols_all="$(sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')"
574 libavhwaccels_all="$(sed -n 's/^[^#]*HWACCEL.*(.*, *\(.*\)).*/\1_hwaccel/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
575 libavfilters_all="$(sed -n 's/^[^#]*FILTER.*(.*, *\(.*\),.*).*/\1_filter/p' libavfilter/allfilters.c | tr '[a-z]' '[A-Z]')"
577 cat <<'EOF' >> ffmpeg-avconfig
581 echo $libavdecoders_all
584 echo $libavencoders_all
587 echo $libavparsers_all
593 echo $libavdemuxers_all
596 echo $libavmuxers_all
599 echo $libavprotocols_all
602 echo $libavhwaccels_all
605 echo $libavfilters_all
629 # - it's not autoconf configure
630 # - --disable-debug, --disable-optimizations, tune=generic causes not to override our optflags
632 --arch=%{_target_base_arch} \
633 --prefix=%{_prefix} \
634 --libdir=%{_libdir} \
635 --shlibdir=%{_libdir} \
636 --mandir=%{_mandir} \
637 --extra-cflags="-D_GNU_SOURCE=1 %{rpmcppflags} %{rpmcflags}%{?with_decklink: -I/usr/include/decklink}%{?with_opencv: -I/usr/include/opencv4}" \
638 --extra-cxxflags="-D_GNU_SOURCE=1 %{rpmcppflags} %{rpmcxxflags}%{?with_decklink: -I/usr/include/decklink}%{?with_opencv: -I/usr/include/opencv4}" \
639 --extra-ldflags="%{rpmcflags} %{rpmldflags}" \
641 --extra-libs="-latomic" \
645 --disable-optimizations \
646 --disable-stripping \
647 %{!?with_doc:--disable-doc} \
649 %{?with_chromaprint:--enable-chromaprint} \
650 %{?with_cudasdk:--enable-cuda-nvcc} \
651 %{?with_decklink:--enable-decklink} \
652 %{!?with_ffnvcodec:--disable-ffnvcodec} \
656 %{?with_frei0r:--enable-frei0r} \
657 %{?with_ladspa:--enable-ladspa} \
658 %{?with_lcms:--enable-lcms2} \
659 %{?with_aom:--enable-libaom} \
660 %{?with_aribb24:--enable-libaribb24} \
663 %{?with_bs2b:--enable-libbs2b} \
664 %{?with_caca:--enable-libcaca} \
667 %{?with_codec2:--enable-libcodec2} \
668 %{?with_dav1d:--enable-libdav1d} \
669 %{?with_avs2:--enable-libdavs2} \
670 %{?with_dc1394:--enable-libdc1394} \
671 %{?with_libdrm:--enable-libdrm} \
672 %{?with_flite:--enable-libflite} \
673 --enable-libfontconfig \
674 --enable-libfreetype \
675 %{?with_fribidi:--enable-libfribidi} \
676 %{?with_glslang:--enable-libglslang} \
677 %{?with_gme:--enable-libgme} \
678 %{?with_gsm:--enable-libgsm} \
679 %{?with_iec61883:--enable-libiec61883} \
680 %{?with_ilbc:--enable-libilbc} \
682 %{?with_libjxl:--enable-libjxl} \
683 %{?with_kvazaar:--enable-libkvazaar} \
684 %{?with_libklvanc:--enable-libklvanc} \
685 %{?with_lensfun:--enable-liblensfun} \
686 %{?with_mfx:--enable-libmfx} \
687 %{?with_modplug:--enable-libmodplug} \
688 --enable-libmp3lame \
689 %{?with_libmysofa:--enable-libmysofa} \
690 %{?with_amr:--enable-libopencore-amrnb} \
691 %{?with_amr:--enable-libopencore-amrwb} \
692 %{?with_opencv:--enable-libopencv} \
693 %{?with_openh264:--enable-libopenh264} \
694 --enable-libopenjpeg \
695 %{?with_openmpt:--enable-libopenmpt} \
697 %{?with_libplacebo:--enable-libplacebo} \
698 %{?with_pulseaudio:--enable-libpulse} \
699 %{?with_rabbitmq:--enable-librabbitmq} \
700 %{?with_rav1e:--enable-librav1e} \
701 %{?with_librist:--enable-librist} \
702 %{?with_librsvg:--enable-librsvg} \
704 %{?with_rubberband:--enable-librubberband} \
705 %{?with_shaderc:--enable-libshaderc} \
706 %{?with_shine:--enable-libshine} \
707 %{?with_smb:--enable-libsmbclient} \
708 %{?with_snappy:--enable-libsnappy} \
709 %{?with_soxr:--enable-libsoxr} \
711 %{?with_srt:--enable-libsrt} \
712 %{?with_ssh:--enable-libssh} \
713 %{?with_svtav1:--enable-libsvtav1} \
714 %{?with_tesseract:--enable-libtesseract} \
715 %{?with_theora:--enable-libtheora} \
716 --enable-libtwolame \
717 %{?with_uavs3d:--enable-libuavs3d} \
719 %{?with_vidstab:--enable-libvidstab} \
720 %{?with_vmaf:--enable-libvmaf} \
721 %{?with_voamrwbenc:--enable-libvo-amrwbenc} \
723 %{?with_vpx:--enable-libvpx} \
724 %{?with_webp:--enable-libwebp} \
725 %{?with_x264:--enable-libx264} \
726 %{?with_x265:--enable-libx265} \
727 %{?with_avs:--enable-libxavs} \
728 %{?with_avs2:--enable-libxavs2} \
730 %{?with_libxml2:--enable-libxml2} \
731 %{?with_xvid:--enable-libxvid} \
732 %{?with_zimg:--enable-libzimg} \
733 %{?with_zmq:--enable-libzmq} \
734 %{?with_zvbi:--enable-libzvbi} \
735 %{?with_lv2:--enable-lv2} \
736 %{?with_omx:--enable-omx} \
737 %{?with_openal:--enable-openal} \
738 %{?with_opencl:--enable-opencl} \
739 %{?with_opengl:--enable-opengl} \
740 %{?with_pocketsphinx:--enable-pocketsphinx} \
743 %{?with_rkmpp:--enable-rkmpp} \
746 %{!?with_va:--disable-vaapi} \
747 %{?with_vapoursynth:--enable-vapoursynth} \
748 %{!?with_vulkan:--disable-vulkan} \
749 %if %{with v4l2_request}
751 --enable-v4l2-request \
753 %ifnarch %{ix86} %{x8664}
764 %{?with_fdk_aac:--enable-libfdk-aac} \
765 %{?with_npp:--enable-libnpp} \
767 --enable-runtime-cpudetect
772 # CC_O to add -c to commandline. makefile should be patched
773 %{__make} tools/qt-faststart V=1 CC_O='-c -o $@'
775 %{?with_tests:%{__make} check V=1}
778 rm -rf $RPM_BUILD_ROOT
779 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},/etc/{sysconfig,rc.d/init.d}} \
780 $RPM_BUILD_ROOT%{_includedir}/ffmpeg
782 %{__make} install install-headers \
783 DESTDIR=$RPM_BUILD_ROOT \
786 # install nonstandard, non-public headers manually
787 cp -a config.h $RPM_BUILD_ROOT%{_includedir}/ffmpeg
788 for a in libavutil/*/{asm,bswap}.h; do
789 install -Dp $a $RPM_BUILD_ROOT%{_includedir}/$a
791 cp -a libavformat/riff.h $RPM_BUILD_ROOT%{_includedir}/libavformat
793 install -p tools/qt-faststart $RPM_BUILD_ROOT%{_bindir}
795 # install as ffmpeg-avconfig to avoid with possible programs looking for
796 # ffmpeg-config and expecting --libs output from it which is not implemented
797 # simple to do (by querying pkgconfig), but why?
798 install -p ffmpeg-avconfig $RPM_BUILD_ROOT%{_bindir}/ffmpeg-avconfig
800 # packaged as %doc in -doc
802 %{__rm} $RPM_BUILD_ROOT%{_docdir}/ffmpeg/*.{css,html}
805 install -d $RPM_BUILD_ROOT%{_examplesdir}
806 %{__mv} $RPM_BUILD_ROOT%{_datadir}/ffmpeg/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
809 rm -rf $RPM_BUILD_ROOT
811 %post libs -p /sbin/ldconfig
812 %postun libs -p /sbin/ldconfig
815 %defattr(644,root,root,755)
816 %doc CREDITS LICENSE.md MAINTAINERS README.md RELEASE_NOTES doc/APIchanges
817 %attr(755,root,root) %{_bindir}/ffmpeg
818 %attr(755,root,root) %{_bindir}/ffprobe
819 %attr(755,root,root) %{_bindir}/qt-faststart
820 %dir %{_datadir}/ffmpeg
821 %{_datadir}/ffmpeg/*.ffpreset
822 %{_datadir}/ffmpeg/ffprobe.xsd
824 %{_mandir}/man1/ffmpeg.1*
825 %{_mandir}/man1/ffmpeg-all.1*
826 %{_mandir}/man1/ffmpeg-bitstream-filters.1*
827 %{_mandir}/man1/ffmpeg-codecs.1*
828 %{_mandir}/man1/ffmpeg-devices.1*
829 %{_mandir}/man1/ffmpeg-filters.1*
830 %{_mandir}/man1/ffmpeg-formats.1*
831 %{_mandir}/man1/ffmpeg-protocols.1*
832 %{_mandir}/man1/ffmpeg-resampler.1*
833 %{_mandir}/man1/ffmpeg-scaler.1*
834 %{_mandir}/man1/ffmpeg-utils.1*
835 %{_mandir}/man1/ffprobe.1*
836 %{_mandir}/man1/ffprobe-all.1*
840 %defattr(644,root,root,755)
841 %attr(755,root,root) %{_libdir}/libavcodec.so.*.*.*
842 %attr(755,root,root) %ghost %{_libdir}/libavcodec.so.60
843 %attr(755,root,root) %{_libdir}/libavdevice.so.*.*.*
844 %attr(755,root,root) %ghost %{_libdir}/libavdevice.so.60
845 %attr(755,root,root) %{_libdir}/libavfilter.so.*.*.*
846 %attr(755,root,root) %ghost %{_libdir}/libavfilter.so.9
847 %attr(755,root,root) %{_libdir}/libavformat.so.*.*.*
848 %attr(755,root,root) %ghost %{_libdir}/libavformat.so.60
849 %attr(755,root,root) %{_libdir}/libavutil.so.*.*.*
850 %attr(755,root,root) %ghost %{_libdir}/libavutil.so.58
851 %attr(755,root,root) %{_libdir}/libpostproc.so.*.*.*
852 %attr(755,root,root) %ghost %{_libdir}/libpostproc.so.57
853 %attr(755,root,root) %{_libdir}/libswresample.so.*.*.*
854 %attr(755,root,root) %ghost %{_libdir}/libswresample.so.4
855 %attr(755,root,root) %{_libdir}/libswscale.so.*.*.*
856 %attr(755,root,root) %ghost %{_libdir}/libswscale.so.7
859 %defattr(644,root,root,755)
860 %doc doc/optimization.txt
861 %attr(755,root,root) %{_bindir}/ffmpeg-avconfig
862 %attr(755,root,root) %{_libdir}/libavcodec.so
863 %attr(755,root,root) %{_libdir}/libavdevice.so
864 %attr(755,root,root) %{_libdir}/libavfilter.so
865 %attr(755,root,root) %{_libdir}/libavformat.so
866 %attr(755,root,root) %{_libdir}/libavutil.so
867 %attr(755,root,root) %{_libdir}/libpostproc.so
868 %attr(755,root,root) %{_libdir}/libswresample.so
869 %attr(755,root,root) %{_libdir}/libswscale.so
870 %{_includedir}/ffmpeg
871 %{_includedir}/libavcodec
872 %{_includedir}/libavdevice
873 %{_includedir}/libavfilter
874 %{_includedir}/libavformat
875 %{_includedir}/libavutil
876 %{_includedir}/libpostproc
877 %{_includedir}/libswresample
878 %{_includedir}/libswscale
879 %{_pkgconfigdir}/libavcodec.pc
880 %{_pkgconfigdir}/libavdevice.pc
881 %{_pkgconfigdir}/libavfilter.pc
882 %{_pkgconfigdir}/libavformat.pc
883 %{_pkgconfigdir}/libavutil.pc
884 %{_pkgconfigdir}/libpostproc.pc
885 %{_pkgconfigdir}/libswresample.pc
886 %{_pkgconfigdir}/libswscale.pc
888 %{_mandir}/man3/libavcodec.3*
889 %{_mandir}/man3/libavdevice.3*
890 %{_mandir}/man3/libavfilter.3*
891 %{_mandir}/man3/libavformat.3*
892 %{_mandir}/man3/libavutil.3*
893 %{_mandir}/man3/libswresample.3*
894 %{_mandir}/man3/libswscale.3*
896 %{_examplesdir}/%{name}-%{version}
899 %defattr(644,root,root,755)
900 %{_libdir}/libavcodec.a
901 %{_libdir}/libavdevice.a
902 %{_libdir}/libavfilter.a
903 %{_libdir}/libavformat.a
904 %{_libdir}/libavutil.a
905 %{_libdir}/libpostproc.a
906 %{_libdir}/libswresample.a
907 %{_libdir}/libswscale.a
910 %defattr(644,root,root,755)
911 %attr(755,root,root) %{_bindir}/ffplay
913 %{_mandir}/man1/ffplay.1*
914 %{_mandir}/man1/ffplay-all.1*
919 %defattr(644,root,root,755)
920 %doc doc/*.{css,html}