2 # - libklvanc [-lklvanc libklvanc/vanc.h]
3 # - libtensorflow [-ltensorflow tensorflow/c/c_api.h]
4 # - AMF >= 1.4.4.1 (available at https://github.com/GPUOpen-LibrariesAndSDKs/AMF, where is original source?)
6 # How to deal with ffmpeg/opencv/chromaprint checken-egg problem:
7 # 1. make-request -r --with bootstrap ffmpeg.spec
8 # 2 bump release of opencv.spec and chromaprint.spec
9 # 3. make-request -r opencv.spec chromaprint.spec
10 # 4. bump release of ffmpeg.spec
11 # 5. make-request -r ffmpeg.spec
14 %bcond_with bootstrap # disable features to able to build without installed ffmpeg
15 %bcond_with nonfree # unblock non free options of package (currently: cuda_nvcc, decklib, fdk_aac, npp, openssl, libressl/libtls)
16 %bcond_without aribb24 # ARIB text and caption decoding via libaribb24
17 %bcond_without avs2 # AVS2 de/encoding via libdavs2/libxavs2
18 %bcond_without bs2b # BS2B audio filter support
19 %bcond_without caca # textual display using libcaca
20 %bcond_without codec2 # codec2 support using libcodec2
21 %bcond_without chromaprint # audio fingerprinting with chromaprint
22 %bcond_with cudasdk # NVIDIA CUDA code using nvcc from CUDA SDK [BR: cuda.h, non-free]
23 %bcond_without dav1d # AV1 decoding via libdav1d
24 %bcond_with decklink # Blackmagic DeskLink output support (requires nonfree)
25 %bcond_with fdk_aac # AAC de/encoding via libfdk_aac (requires nonfree)
26 %bcond_without ffnvcodec # NVIDIA codecs support using ffnvcodec headers (covered: cuda cuvid nvdec nvenc)
27 %bcond_without flite # flite voice synthesis support
28 %bcond_without frei0r # frei0r video filtering
29 %bcond_without fribidi # fribidi support
30 %bcond_without gme # Game Music Emu support
31 %bcond_without ilbc # iLBC de/encoding via WebRTC libilbc
32 %bcond_without kvazaar # Kvazaar HEVC encoder support
33 %bcond_without ladspa # LADSPA audio filtering
34 %bcond_without lensfun # lensfun lens correction
35 %bcond_with libdrm # Linux Direct Rendering Manager code
36 %bcond_without libmysofa # sofalizer filter
37 %bcond_with librsvg # SVG rasterization via librsvg
38 %bcond_with libxml2 # XML parsing using libxml2
39 %bcond_without lv2 # LV2 audio filtering
40 %bcond_with mfx # MFX hardware acceleration support
41 %bcond_with npp # NVIDIA Performance Primitives-based code (requires nonfree) [BR: libnppc+libnppi, npp.h]
42 %bcond_without omx # OpenMAX IL support
43 %bcond_without openal # OpenAL 1.1 capture support
44 %bcond_without opencl # OpenCL 1.2 code
45 %bcond_without opencv # OpenCV video filtering
46 %bcond_without opengl # OpenGL rendering support
47 %bcond_with openh264 # OpenH264 H.264 encoder
48 %bcond_without openmpt # OpenMPT module decoder
49 %bcond_with pocketsphinx # asr filter using PocketSphinx
50 %bcond_without pulseaudio # PulseAudio input support
51 %bcond_with rkmpp # Rockchip Media Process Platform code [implies libdrm]
52 %bcond_without rubberband # rubberband filter
53 %bcond_without shine # shine fixed-point MP3 encoder
54 %bcond_without snappy # Snappy compression support (needed for hap encoding)
55 %bcond_without srt # Haivision SRT protocol support
56 %bcond_without ssh # SFTP protocol support via libssh
57 %bcond_with smb # SMB support via libsmbclient
58 %bcond_without soxr # SoX Resampler support
59 %bcond_with tesseract # OCR filter based on Tesseract
60 %bcond_without vmaf # VMAF filter support
61 %bcond_without x264 # H.264 x264 encoder
62 %bcond_without x265 # H.265/HEVC x265 encoder
63 %bcond_without va # VAAPI (Video Acceleration API)
64 %bcond_without vapoursynth # VapourSynth demuxer
65 %bcond_without vidstab # vid.stab video stabilization support
66 %bcond_without vpx # VP8, a high-quality video codec
67 %bcond_without wavpack # wavpack encoding support
68 %bcond_without webp # WebP encoding support
69 %bcond_without zimg # zscale filter based on z.lib
70 %bcond_without zmq # 0MQ message passing
71 %bcond_without zvbi # teletext via libzvbi
72 %bcond_without doc # don't build docs
73 %bcond_with tests # "make check" (some tests fail as of 2.5)
77 %undefine with_chromaprint
83 %ifnarch %{ix86} %{x8664}
84 %undefine with_ffnvcodec
86 %ifnarch %{ix86} %{x8664} %{arm}
92 Summary: FFmpeg - a very fast video and audio converter
93 Summary(pl.UTF-8): FFmpeg - szybki konwerter audio/wideo
97 # LGPL or GPL, chosen at configure time (GPL version is more featured)
98 # GPL: frei0r libcdio libdavs2 rubberband vidstab x264 x265 xavs xavs2 xvid
99 # v3 (allows *GPLv3 or Apache-licensed libs): gmp lensfun opencore-amr vmaf vo-*enc rkmpp
101 License: GPL v3+ with LGPL v3+ parts
102 Group: Applications/Multimedia
103 Source0: http://ffmpeg.org/releases/%{name}-%{version}.tar.xz
104 # Source0-md5: fb33a9110251873002869664686b2a3f
105 Patch0: %{name}-omx-libnames.patch
106 URL: http://www.ffmpeg.org/
107 %{?with_decklink:BuildRequires: Blackmagic_DeckLink_SDK >= 10.9.5}
108 %{?with_openal:BuildRequires: OpenAL-devel >= 1.1}
109 %{?with_opencl:BuildRequires: OpenCL-devel >= 1.2}
110 %{?with_opengl:BuildRequires: OpenGL-GLX-devel}
111 # libomxil-bellagio-devel or limoi-core-devel (just headers, library is dlopened at runtime)
112 %{?with_omx:BuildRequires: OpenMAX-IL-devel}
113 BuildRequires: SDL2-devel >= 2.0.1
114 BuildRequires: SDL2-devel < 2.1.0
115 BuildRequires: alsa-lib-devel
116 BuildRequires: aom-devel >= 1.0.0
117 %{?with_aribb24:BuildRequires: aribb24-devel}
118 BuildRequires: bzip2-devel
119 BuildRequires: celt-devel >= 0.11.0
120 %{?with_codec2:BuildRequires: codec2-devel}
121 %{?with_dav1d:BuildRequires: dav1d-devel >= 0.2.1}
122 %{?with_avs2:BuildRequires: davs2-devel >= 1.6}
123 %{?with_fdk_aac:BuildRequires: fdk-aac-devel}
124 %{?with_flite:BuildRequires: flite-devel >= 1.4}
125 BuildRequires: fontconfig-devel
126 BuildRequires: freetype-devel
127 %{?with_frei0r:BuildRequires: frei0r-devel}
128 %{?with_fribidi:BuildRequires: fribidi-devel}
129 %{?with_gme:BuildRequires: game-music-emu-devel}
131 # require version with altivec support fixed
132 BuildRequires: gcc >= 5:3.3.2-3
134 BuildRequires: gmp-devel
135 BuildRequires: gnutls-devel
136 BuildRequires: jack-audio-connection-kit-devel
137 %{?with_kvazaar:BuildRequires: kvazaar-devel >= 0.8.1}
138 %{?with_ladspa:BuildRequires: ladspa-devel}
139 BuildRequires: lame-libs-devel >= 3.98.3
140 %{?with_lensfun:BuildRequires: lensfun-devel}
141 BuildRequires: libass-devel
142 BuildRequires: libavc1394-devel
143 %{?with_bs2b:BuildRequires: libbs2b-devel}
144 BuildRequires: libbluray-devel
145 %{?with_caca:BuildRequires: libcaca-devel}
146 BuildRequires: libcdio-paranoia-devel >= 0.90-2
147 %{?with_chromaprint:BuildRequires: libchromaprint-devel}
148 BuildRequires: libcrystalhd-devel
149 BuildRequires: libdc1394-devel >= 2
150 %{?with_libdrm:BuildRequires: libdrm-devel}
151 BuildRequires: libgsm-devel
152 BuildRequires: libiec61883-devel
153 BuildRequires: libmodplug-devel
154 %{?with_libmysofa:BuildRequires: libmysofa-devel >= 0.7-2.20190516.1}
155 %{?with_openmpt:BuildRequires: libopenmpt-devel >= 0.2.6557}
156 BuildRequires: libraw1394-devel >= 2
157 %{?with_librsvg:BuildRequires: librsvg-devel >= 2}
158 BuildRequires: librtmp-devel
159 %{?with_ssh:BuildRequires: libssh-devel}
160 %{?with_smb:BuildRequires: libsmbclient-devel}
161 BuildRequires: libtheora-devel >= 1.0-0.beta3
162 BuildRequires: libtool >= 2:1.4d-3
163 BuildRequires: libv4l-devel
165 BuildRequires: libva-devel >= 1.0.3
166 BuildRequires: libva-drm-devel >= 1.0.3
167 BuildRequires: libva-x11-devel >= 1.0.3
169 BuildRequires: libvdpau-devel >= 0.2
170 BuildRequires: libvorbis-devel
171 %{?with_vpx:BuildRequires: libvpx-devel >= 1.4.0}
172 %{?with_webp:BuildRequires: libwebp-devel >= 0.4.0}
174 %{?with_x264:BuildRequires: libx264-devel >= 0.1.3-1.20111212_2245}
176 %{?with_x265:BuildRequires: libx265-devel >= 1.8}
177 # libxcb xcb-shm xcb-xfixes xcb-shape
178 BuildRequires: libxcb-devel >= 1.4
179 %{?with_libxml2:BuildRequires: libxml2-devel >= 2}
180 %{?with_lv2:BuildRequires: lilv-devel}
181 %{?with_lv2:BuildRequires: lv2-devel}
182 %{?with_mfx:BuildRequires: mfx_dispatch-devel}
188 %{?with_ffnvcodec:BuildRequires: nv-codec-headers >= 9.0.18.0}
190 BuildRequires: opencore-amr-devel
191 %{?with_opencv:BuildRequires: opencv-devel >= 2}
192 %{?with_openh264:BuildRequires: openh264-devel >= 1.3}
193 BuildRequires: openjpeg2-devel >= 2.1
194 BuildRequires: opus-devel
195 BuildRequires: perl-Encode
196 BuildRequires: perl-tools-pod
197 %{?with_pocketsphinx:BuildRequires: pocketsphinx-devel > 0.8}
198 BuildRequires: pkgconfig
199 %{?with_pulseaudio:BuildRequires: pulseaudio-devel}
200 %{?with_rkmpp:BuildRequires: rockchip-mpp-devel >= 1.3.7}
201 BuildRequires: rpmbuild(macros) >= 1.470
202 %{?with_rubberband:BuildRequires: rubberband-devel >= 1.8.1}
203 %{?with_shine:BuildRequires: shine-devel >= 3.0.0}
204 %{?with_snappy:BuildRequires: snappy-devel}
205 %{?with_soxr:BuildRequires: soxr-devel}
206 BuildRequires: speex-devel >= 1:1.2-rc1
207 %{?with_srt:BuildRequires: srt-devel >= 1.3}
208 %{?with_tesseract:BuildRequires: tesseract-devel}
209 %{?with_doc:BuildRequires: tetex}
210 %{?with_doc:BuildRequires: texi2html}
211 %{?with_doc:BuildRequires: texinfo}
212 BuildRequires: twolame-devel >= 0.3.10
213 %{?with_vapoursynth:BuildRequires: vapoursynth-devel >= 42}
214 %{?with_vidstab:BuildRequires: vid.stab-devel >= 0.98}
215 %{?with_vmaf:BuildRequires: vmaf-devel >= 1.3.9}
216 BuildRequires: vo-amrwbenc-devel
217 %{?with_wavpack:BuildRequires: wavpack-devel}
218 %{?with_ilbc:BuildRequires: webrtc-libilbc-devel}
219 BuildRequires: xavs-devel
220 %{?with_avs2:BuildRequires: xavs2-devel >= 1.3}
221 BuildRequires: xorg-lib-libX11-devel
222 BuildRequires: xorg-lib-libXext-devel
223 BuildRequires: xorg-lib-libXv-devel
224 BuildRequires: xvid-devel >= 1:1.1.0
225 BuildRequires: xz-devel
227 %{?with_zmq:BuildRequires: zeromq-devel}
228 %{?with_zimg:BuildRequires: zimg-devel >= 2.7.0}
229 BuildRequires: zlib-devel
230 %{?with_zvbi:BuildRequires: zvbi-devel >= 0.2.28}
231 %{?with_autoreqdep:BuildConflicts: libpostproc}
232 # overflows maximum hash table size
233 BuildConflicts: pdksh < 5.2.14-57
234 Requires: %{name}-libs = %{version}-%{release}
235 Obsoletes: libpostproc
236 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
238 %define specflags -fno-strict-aliasing
240 # -fomit-frame-pointer is always needed on x86 due to lack of registers (-fPIC takes one)
241 %define specflags_ia32 -fomit-frame-pointer
242 # -mmmx is needed to enable <mmintrin.h> code.
243 %define specflags_i586 -mmmx
244 %define specflags_i686 -mmmx
245 %define specflags_ppc -fPIC
248 FFmpeg is a complete solution to record, convert and stream audio and
249 video. It is a command line tool to convert one video file format to
250 another. It also supports grabbing and encoding in real time from a TV
253 %description -l pl.UTF-8
254 FFmpeg to kompletne rozwiÄ…zanie nagrywania, konwersji i transmisji
255 strumieni dźwięku i obrazu. Jest to działające z linii poleceń
256 narzędzie do konwersji obrazu z jednego formatu do innego. Obsługuje
257 także przechwytywanie i kodowanie w czasie rzeczywistym z karty
261 Summary: ffmpeg libraries
262 Summary(pl.UTF-8): Biblioteki ffmpeg
264 Requires: SDL2 >= 2.0.1
265 Requires: aom >= 1.0.0
266 Requires: celt >= 0.11.0
267 %{?with_dav1d:Requires: dav1d >= 0.2.1}
268 %{?with_avs2:Requires: davs2 >= 1.6}
269 %{?with_flite:Requires: flite >= 1.4}
270 %if "%(rpm -q --qf '%{V}' gnutls-devel)" >= "3.0.20"
271 # uses gnutls_certificate_set_x509_system_trust if >= 3.0.20
272 Requires: gnutls-libs >= 3.0.20
274 %{?with_kvazaar:Requires: kvazaar-libs >= 0.8.1}
275 %{?with_libmysofa:Requires: libmysofa >= 0.7-2.20190516.1}
276 %{?with_openmpt:Requires: libopenmpt >= 0.2.6557}
277 Requires: libtheora >= 1.0-0.beta3
279 Requires: libva >= 1.0.3
280 Requires: libva-drm >= 1.0.3
281 Requires: libva-x11 >= 1.0.3
283 Requires: libvdpau >= 0.2
284 %{?with_vpx:Requires: libvpx >= 1.4.0}
285 %{?with_webp:Requires: libwebp >= 0.4.0}
286 %{?with_x264:Requires: libx264 >= 0.1.3-1.20111212_2245}
287 %{?with_x265:Requires: libx265 >= 1.8}
288 Requires: libxcb >= 1.4
289 Requires: lame-libs >= 3.98.3
290 %{?with_openh264:Requires: openh264 >= 1.3}
291 Requires: openjpeg2 >= 2.1
292 %{?with_rkmpp:Requires: rockchip-mpp >= 1.3.7}
293 %{?with_rubberband:Requires: rubberband-libs >= 1.8.1}
294 %{?with_shine:Requires: shine >= 3.0.0}
295 Requires: speex >= 1:1.2-rc1
296 %{?with_srt:Requires: srt >= 1.3}
297 Requires: twolame-libs >= 0.3.10
298 %{?with_vapoursynth:Requires: vapoursynth >= 42}
299 %{?with_vidstab:Requires: vid.stab >= 0.98}
300 %{?with_vmaf:Requires: vmaf-libs >= 1.3.9}
301 %{?with_avs2:Requires: xavs2 >= 1.3}
302 Requires: xvid >= 1:1.1.0
303 %{?with_zimg:Requires: zimg >= 2.7.0}
304 %{?with_zvbi:Requires: zvbi >= 0.2.28}
307 This package contains the ffmpeg shared libraries:
308 - the codec library (libavcodec). It supports most existing encoding
309 formats (MPEG, DivX, MPEG4, AC3, DV...),
310 - demuxer library (libavformat). It supports most existing file
311 formats (AVI, MPEG, OGG, Matroska, ASF...),
312 - video postprocessing library (libpostproc).
314 %description libs -l pl.UTF-8
315 Ten pakiet zawiera biblioteki współdzielone ffmpeg:
316 - bibliotekę kodeków (libavcodec); obsługuje większość istniejących
317 formatów kodowania (MPEG, DivX, MPEG4, AC3, DV...),
318 - bibliotekę demuksera (libavformat); obsługuje większość istniejących
319 formatów plików (AVI, MPEG, OGG, Matroska, ASF...),
320 - bibliotekÄ™ postprocessingu (libpostproc).
323 Summary: ffmpeg header files
324 Summary(pl.UTF-8): Pliki nagłówkowe ffmpeg
325 Group: Development/Libraries
326 Requires: %{name}-libs = %{version}-%{release}
327 # Libs.private from *.pc
328 %{?with_openal:Requires: OpenAL-devel >= 1.1}
329 %{?with_opencl:Requires: OpenCL-devel >= 1.2}
330 %{?with_opengl:Requires: OpenGL-devel}
331 Requires: SDL2-devel >= 2.0.1
332 Requires: alsa-lib-devel
333 Requires: aom-devel >= 1.0.0
334 %{?with_aribb24:Requires: aribb24-devel}
335 %{?with_avs2:Requires: davs2-devel >= 1.6}
336 Requires: bzip2-devel
337 Requires: celt-devel >= 0.11.0
338 %{?with_codec2:Requires: codec2-devel}
339 %{?with_dav1d:Requires: dav1d-devel >= 0.2.1}
340 %{?with_fdk_aac:Requires: fdk-aac-devel}
341 %{?with_flite:Requires: flite-devel >= 1.4}
342 Requires: fontconfig-devel
343 Requires: freetype-devel
344 %{?with_fribidi:Requires: fribidi-devel}
345 %{?with_gme:Requires: game-music-emu-devel}
346 Requires: gnutls-devel
347 Requires: jack-audio-connection-kit-devel
348 %{?with_kvazaar:Requires: kvazaar-devel >= 0.8.1}
349 Requires: lame-libs-devel >= 3.98.3
350 %{?with_lensfun:Requires: lensfun-devel}
351 Requires: libass-devel
352 Requires: libavc1394-devel
353 Requires: libbluray-devel
354 %{?with_bs2b:Requires: libbs2b-devel}
355 %{?with_caca:Requires: libcaca-devel}
356 Requires: libcdio-paranoia-devel >= 0.90-2
357 %{?with_chromaprint:Requires: libchromaprint-devel}
358 Requires: libcrystalhd-devel
359 Requires: libdc1394-devel >= 2
360 %{?with_libdrm:Requires: libdrm-devel}
361 Requires: libgsm-devel
362 Requires: libiec61883-devel
363 Requires: libmodplug-devel
364 %{?with_libmysofa:Requires: libmysofa-devel >= 0.7-2.20190516.1}
365 %{?with_openmpt:Requires: libopenmpt-devel >= 0.2.6557}
366 Requires: libraw1394-devel >= 2
367 %{?with_librsvg:Requires: librsvg-devel >= 2}
368 Requires: librtmp-devel
369 %{?with_smb:Requires: libsmbclient-devel}
370 %{?with_ssh:Requires: libssh-devel}
371 Requires: libstdc++-devel
372 Requires: libtheora-devel >= 1.0-0.beta3
373 Requires: libv4l-devel
374 %{?with_va:Requires: libva-devel >= 1.0.3}
375 %{?with_va:Requires: libva-drm-devel >= 1.0.3}
376 %{?with_va:Requires: libva-x11-devel >= 1.0.3}
377 Requires: libvdpau-devel >= 0.2
378 Requires: libvorbis-devel
379 %{?with_vpx:Requires: libvpx-devel >= 1.4.0}
380 %{?with_webp:Requires: libwebp-devel >= 0.4.0}
381 %{?with_x264:Requires: libx264-devel >= 0.1.3-1.20110625_2245}
382 %{?with_x265:Requires: libx265-devel >= 1.8}
383 # libxcb xcb-shm xcb-xfixes xcb-shape
384 Requires: libxcb-devel >= 1.4
385 %{?with_libxml2:Requires: libxml2-devel >= 2}
386 %{?with_lv2:Requires: lilv-devel}
387 %{?with_mfx:Requires: mfx_dispatch-devel}
388 Requires: opencore-amr-devel
389 %{?with_opencv:Requires: opencv-devel >= 2}
390 %{?with_openh264:Requires: openh264-devel >= 1.3}
391 Requires: openjpeg2-devel >= 2.1
393 %{?with_pulseaudio:Requires: pulseaudio-devel}
394 %{?with_rkmpp:Requires: rockchip-mpp-devel >= 1.3.7}
395 %{?with_rubberband:Requires: rubberband-devel >= 1.8.1}
396 %{?with_shine:Requires: shine-devel >= 3.0.0}
397 %{?with_snappy:Requires: snappy-devel}
398 %{?with_soxr:Requires: soxr-devel}
399 Requires: speex-devel >= 1:1.2-rc1
400 %{?with_srt:Requires: srt-devel >= 1.3}
401 %{?with_tesseract:Requires: tesseract-devel}
402 Requires: twolame-devel >= 0.3.10
403 %{?with_vapoursynth:Requires: vapoursynth-devel >= 42}
404 %{?with_vidstab:Requires: vid.stab-devel >= 0.98}
405 Requires: vo-amrwbenc-devel
406 %{?with_vmaf:Requires: vmaf-devel >= 1.3.9}
407 %{?with_wavpack:Requires: wavpack-devel}
408 %{?with_ilbc:Requires: webrtc-libilbc-devel}
410 %{?with_avs2:Requires: xavs2-devel >= 1.3}
411 Requires: xorg-lib-libX11-devel
412 Requires: xorg-lib-libXext-devel
413 Requires: xorg-lib-libXv-devel
414 Requires: xvid-devel >= 1:1.1.0
416 %{?with_zmq:Requires: zeromq-devel}
417 %{?with_zimg:Requires: zimg-devel >= 2.7.0}
419 %{?with_zvbi:Requires: zvbi-devel >= 0.2.28}
420 Obsoletes: libpostproc-devel
425 %description devel -l pl.UTF-8
426 Pliki nagłówkowe ffmpeg.
429 Summary: ffmpeg static libraries
430 Summary(pl.UTF-8): Statyczne biblioteki ffmpeg
431 Group: Development/Libraries
432 Requires: %{name}-devel = %{version}-%{release}
435 ffmpeg static libraries (libavcodec and libavformat).
437 %description static -l pl.UTF-8
438 Statyczne biblioteki ffmpeg (libavcodec i libavformat).
441 Summary: FFplay - SDL-based media player
442 Summary(pl.UTF-8): FFplay - odtwarzacz mediów oparty na SDL
443 Group: Applications/Multimedia
444 Requires: %{name}-libs = %{version}-%{release}
447 FFplay is a very simple and portable media player using the FFmpeg
448 libraries and the SDL library. It is mostly used as a test bench for
449 the various APIs of FFmpeg.
451 %description ffplay -l pl.UTF-8
452 FFplay to bardzo prosty i przenośny odtwarzacz mediów używający
453 bibliotek FFmpeg oraz biblioteki SDL. Jest używany głównie do
454 testowania różnych API FFmpeg.
457 Summary: FFmpeg documentation in HTML format
458 Summary(pl.UTF-8): Dokumentacja pakietu FFmpeg w formacie HTML
460 %if "%{_rpmversion}" >= "5"
465 FFmpeg documentation in HTML format.
467 %description doc -l pl.UTF-8
468 Dokumentacja pakietu FFmpeg w formacie HTML.
474 # package the grep result for mplayer, the result formatted as ./mplayer/configure
475 cat <<EOF > ffmpeg-avconfig
477 libavdecoders_all="$(sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
478 libavencoders_all="$(sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
479 libavparsers_all="$(sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
480 libavbsfs_all="$(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
481 libavdemuxers_all="$(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')"
482 libavmuxers_all="$(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')"
483 libavprotocols_all="$(sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')"
484 libavhwaccels_all="$(sed -n 's/^[^#]*HWACCEL.*(.*, *\(.*\)).*/\1_hwaccel/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
485 libavfilters_all="$(sed -n 's/^[^#]*FILTER.*(.*, *\(.*\),.*).*/\1_filter/p' libavfilter/allfilters.c | tr '[a-z]' '[A-Z]')"
487 cat <<'EOF' >> ffmpeg-avconfig
491 echo $libavdecoders_all
494 echo $libavencoders_all
497 echo $libavparsers_all
503 echo $libavdemuxers_all
506 echo $libavmuxers_all
509 echo $libavprotocols_all
512 echo $libavhwaccels_all
515 echo $libavfilters_all
539 # - it's not autoconf configure
540 # - --disable-debug, --disable-optimizations, tune=generic causes not to override our optflags
542 --arch=%{_target_base_arch} \
543 --prefix=%{_prefix} \
544 --libdir=%{_libdir} \
545 --shlibdir=%{_libdir} \
546 --mandir=%{_mandir} \
547 --extra-cflags="-D_GNU_SOURCE=1 %{rpmcppflags} %{rpmcflags}%{?with_decklink: -I/usr/include/decklink}" \
548 --extra-ldflags="%{rpmcflags} %{rpmldflags}" \
551 --disable-optimizations \
552 --disable-stripping \
553 %{!?with_doc:--disable-doc} \
555 --enable-avresample \
556 %{?with_chromaprint:--enable-chromaprint} \
557 %{?with_cudasdk:--enable-cuda-nvcc} \
558 %{?with_decklink:--enable-decklink} \
559 %{!?with_ffnvcodec:--disable-ffnvcodec} \
563 %{?with_frei0r:--enable-frei0r} \
564 %{?with_ladspa:--enable-ladspa} \
566 %{?with_aribb24:--enable-libaribb24} \
569 %{?with_bs2b:--enable-libbs2b} \
570 %{?with_caca:--enable-libcaca} \
573 %{?with_codec2:--enable-libcodec2} \
574 %{?with_dav1d:--enable-libdav1d} \
575 %{?with_avs2:--enable-libdavs2} \
577 %{?with_libdrm:--enable-libdrm} \
578 %{?with_flite:--enable-libflite} \
579 --enable-libfontconfig \
580 --enable-libfreetype \
581 %{?with_fribidi:--enable-libfribidi} \
582 %{?with_gme:--enable-libgme} \
584 --enable-libiec61883 \
585 %{?with_ilbc:--enable-libilbc} \
587 %{?with_kvazaar:--enable-libkvazaar} \
588 %{?with_lensfun:--enable-liblensfun} \
589 %{?with_mfx:--enable-libmfx} \
590 --enable-libmodplug \
591 --enable-libmp3lame \
592 %{?with_libmysofa:--enable-libmysofa} \
593 --enable-libopencore-amrnb \
594 --enable-libopencore-amrwb \
595 %{?with_opencv:--enable-libopencv} \
596 %{?with_openh264:--enable-libopenh264} \
597 --enable-libopenjpeg \
598 %{?with_openmpt:--enable-libopenmpt} \
600 %{?with_pulseaudio:--enable-libpulse} \
601 %{?with_librsvg:--enable-librsvg} \
603 %{?with_srt:--enable-libsrt} \
604 %{?with_libxml2:--enable-libxml2} \
605 %{?with_rubberband:--enable-librubberband} \
606 %{?with_shine:--enable-libshine} \
607 %{?with_smb:--enable-libsmbclient} \
608 %{?with_snappy:--enable-libsnappy} \
609 %{?with_soxr:--enable-libsoxr} \
611 %{?with_ssh:--enable-libssh} \
612 %{?with_tesseract:--enable-libtesseract} \
614 --enable-libtwolame \
616 %{?with_vidstab:--enable-libvidstab} \
617 %{?with_vmaf:--enable-libvmaf} \
618 --enable-libvo-amrwbenc \
620 %{?with_vpx:--enable-libvpx} \
621 %{?with_wavpack:--enable-libwavpack} \
622 %{?with_webp:--enable-libwebp} \
623 %{?with_x264:--enable-libx264} \
624 %{?with_x265:--enable-libx265} \
626 %{?with_avs2:--enable-libxavs2} \
629 %{?with_zimg:--enable-libzimg} \
630 %{?with_zmq:--enable-libzmq} \
631 %{?with_zvbi:--enable-libzvbi} \
632 %{?with_lv2:--enable-lv2} \
633 %{?with_omx:--enable-omx} \
634 %{?with_openal:--enable-openal} \
635 %{?with_opencl:--enable-opencl} \
636 %{?with_opengl:--enable-opengl} \
637 %{?with_pocketsphinx:--enable-pocketsphinx} \
640 %{?with_rkmpp:--enable-rkmpp} \
643 %{!?with_va:--disable-vaapi} \
644 %{?with_vapoursynth:--enable-vapoursynth} \
645 %ifnarch %{ix86} %{x8664}
656 %{?with_fdk_aac:--enable-libfdk-aac} \
657 %{?with_npp:--enable-libnpp} \
659 --enable-runtime-cpudetect
664 # CC_O to add -c to commandline. makefile should be patched
665 %{__make} tools/qt-faststart V=1 CC_O='-c -o $@'
667 %{?with_tests:%{__make} check V=1}
670 rm -rf $RPM_BUILD_ROOT
671 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},/etc/{sysconfig,rc.d/init.d}} \
672 $RPM_BUILD_ROOT%{_includedir}/ffmpeg
674 %{__make} install install-headers \
675 DESTDIR=$RPM_BUILD_ROOT \
678 # install nonstandard, non-public headers manually
679 cp -a config.h $RPM_BUILD_ROOT%{_includedir}/ffmpeg
680 for a in libavutil/*/{asm,bswap}.h; do
681 install -Dp $a $RPM_BUILD_ROOT%{_includedir}/$a
683 cp -a libavformat/riff.h $RPM_BUILD_ROOT%{_includedir}/libavformat
685 install -p tools/qt-faststart $RPM_BUILD_ROOT%{_bindir}
687 # install as ffmpeg-avconfig to avoid with possible programs looking for
688 # ffmpeg-config and expecting --libs output from it which is not implemented
689 # simple to do (by querying pkgconfig), but why?
690 install -p ffmpeg-avconfig $RPM_BUILD_ROOT%{_bindir}/ffmpeg-avconfig
692 # packaged as %doc in -doc
694 %{__rm} $RPM_BUILD_ROOT%{_docdir}/ffmpeg/*.html
697 install -d $RPM_BUILD_ROOT%{_examplesdir}
698 %{__mv} $RPM_BUILD_ROOT%{_datadir}/ffmpeg/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
701 rm -rf $RPM_BUILD_ROOT
703 %post libs -p /sbin/ldconfig
704 %postun libs -p /sbin/ldconfig
707 %defattr(644,root,root,755)
708 %doc CREDITS LICENSE.md MAINTAINERS README.md RELEASE_NOTES doc/APIchanges
709 %attr(755,root,root) %{_bindir}/ffmpeg
710 %attr(755,root,root) %{_bindir}/ffprobe
711 %attr(755,root,root) %{_bindir}/qt-faststart
712 %dir %{_datadir}/ffmpeg
713 %{_datadir}/ffmpeg/*.ffpreset
714 %{_datadir}/ffmpeg/ffprobe.xsd
716 %{_mandir}/man1/ffmpeg.1*
717 %{_mandir}/man1/ffmpeg-all.1*
718 %{_mandir}/man1/ffmpeg-bitstream-filters.1*
719 %{_mandir}/man1/ffmpeg-codecs.1*
720 %{_mandir}/man1/ffmpeg-devices.1*
721 %{_mandir}/man1/ffmpeg-filters.1*
722 %{_mandir}/man1/ffmpeg-formats.1*
723 %{_mandir}/man1/ffmpeg-protocols.1*
724 %{_mandir}/man1/ffmpeg-resampler.1*
725 %{_mandir}/man1/ffmpeg-scaler.1*
726 %{_mandir}/man1/ffmpeg-utils.1*
727 %{_mandir}/man1/ffprobe.1*
728 %{_mandir}/man1/ffprobe-all.1*
732 %defattr(644,root,root,755)
733 %attr(755,root,root) %{_libdir}/libavcodec.so.*.*.*
734 %attr(755,root,root) %ghost %{_libdir}/libavcodec.so.58
735 %attr(755,root,root) %{_libdir}/libavdevice.so.*.*.*
736 %attr(755,root,root) %ghost %{_libdir}/libavdevice.so.58
737 %attr(755,root,root) %{_libdir}/libavfilter.so.*.*.*
738 %attr(755,root,root) %ghost %{_libdir}/libavfilter.so.7
739 %attr(755,root,root) %{_libdir}/libavformat.so.*.*.*
740 %attr(755,root,root) %ghost %{_libdir}/libavformat.so.58
741 %attr(755,root,root) %{_libdir}/libavresample.so.*.*.*
742 %attr(755,root,root) %ghost %{_libdir}/libavresample.so.4
743 %attr(755,root,root) %{_libdir}/libavutil.so.*.*.*
744 %attr(755,root,root) %ghost %{_libdir}/libavutil.so.56
745 %attr(755,root,root) %{_libdir}/libpostproc.so.*.*.*
746 %attr(755,root,root) %ghost %{_libdir}/libpostproc.so.55
747 %attr(755,root,root) %{_libdir}/libswresample.so.*.*.*
748 %attr(755,root,root) %ghost %{_libdir}/libswresample.so.3
749 %attr(755,root,root) %{_libdir}/libswscale.so.*.*.*
750 %attr(755,root,root) %ghost %{_libdir}/libswscale.so.5
753 %defattr(644,root,root,755)
754 %doc doc/optimization.txt
755 %attr(755,root,root) %{_bindir}/ffmpeg-avconfig
756 %attr(755,root,root) %{_libdir}/libavcodec.so
757 %attr(755,root,root) %{_libdir}/libavdevice.so
758 %attr(755,root,root) %{_libdir}/libavfilter.so
759 %attr(755,root,root) %{_libdir}/libavformat.so
760 %attr(755,root,root) %{_libdir}/libavresample.so
761 %attr(755,root,root) %{_libdir}/libavutil.so
762 %attr(755,root,root) %{_libdir}/libpostproc.so
763 %attr(755,root,root) %{_libdir}/libswresample.so
764 %attr(755,root,root) %{_libdir}/libswscale.so
765 %{_includedir}/ffmpeg
766 %{_includedir}/libavcodec
767 %{_includedir}/libavdevice
768 %{_includedir}/libavfilter
769 %{_includedir}/libavformat
770 %{_includedir}/libavresample
771 %{_includedir}/libavutil
772 %{_includedir}/libpostproc
773 %{_includedir}/libswresample
774 %{_includedir}/libswscale
775 %{_pkgconfigdir}/libavcodec.pc
776 %{_pkgconfigdir}/libavdevice.pc
777 %{_pkgconfigdir}/libavfilter.pc
778 %{_pkgconfigdir}/libavformat.pc
779 %{_pkgconfigdir}/libavresample.pc
780 %{_pkgconfigdir}/libavutil.pc
781 %{_pkgconfigdir}/libpostproc.pc
782 %{_pkgconfigdir}/libswresample.pc
783 %{_pkgconfigdir}/libswscale.pc
785 %{_mandir}/man3/libavcodec.3*
786 %{_mandir}/man3/libavdevice.3*
787 %{_mandir}/man3/libavfilter.3*
788 %{_mandir}/man3/libavformat.3*
789 %{_mandir}/man3/libavutil.3*
790 %{_mandir}/man3/libswresample.3*
791 %{_mandir}/man3/libswscale.3*
793 %{_examplesdir}/%{name}-%{version}
796 %defattr(644,root,root,755)
797 %{_libdir}/libavcodec.a
798 %{_libdir}/libavdevice.a
799 %{_libdir}/libavfilter.a
800 %{_libdir}/libavformat.a
801 %{_libdir}/libavresample.a
802 %{_libdir}/libavutil.a
803 %{_libdir}/libpostproc.a
804 %{_libdir}/libswresample.a
805 %{_libdir}/libswscale.a
808 %defattr(644,root,root,755)
809 %attr(755,root,root) %{_bindir}/ffplay
811 %{_mandir}/man1/ffplay.1*
812 %{_mandir}/man1/ffplay-all.1*
817 %defattr(644,root,root,755)