2 # - libndi_newtek[nonfree, BR: Processing.NDI.Lib.h - probably https://www.newtek.com/ndi/sdk/]
3 # - libcodec2 [-lcodec2 codec2/codec2.h]
4 # - libdavs2 [pkgconfig(davs2) >= 1.5.115 davs2.h]
5 # - libklvanc [-lklvanc libklvanc/vanc.h]
6 # - libtensorflow [-ltensorflow tensorflow/c/c_api.h]
7 # - libxavs2 [pkgconfig(xavs2) >= 1.2.77
8 # - AMF >= 1.4.4.1 (available at https://github.com/GPUOpen-LibrariesAndSDKs/AMF, where is original source?)
10 # How to deal with ffmpeg/opencv/chromaprint checken-egg problem:
11 # 1. make-request -r --with bootstrap ffmpeg.spec
12 # 2 bump release of opencv.spec and chromaprint.spec
13 # 3. make-request -r opencv.spec chromaprint.spec
14 # 4. bump release of ffmpeg.spec
15 # 5. make-request -r ffmpeg.spec
18 %bcond_with bootstrap # disable features to able to build without installed ffmpeg
19 %bcond_with nonfree # unblock non free options of package (currently: cuda_sdk, decklib, fdk_aac, libndi_newtek, npp, openssl, libressl/libtls)
20 %bcond_without bs2b # BS2B audio filter support
21 %bcond_without caca # textual display using libcaca
22 %bcond_without chromaprint # audio fingerprinting with chromaprint
23 %bcond_with cudasdk # NVIDIA CUDA code using SDK [BR: cuda.h, non-free]
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_without pulseaudio # PulseAudio input support
50 %bcond_with rkmpp # Rockchip Media Process Platform code [implies libdrm]
51 %bcond_without rubberband # rubberband filter
52 %bcond_without shine # shine fixed-point MP3 encoder
53 %bcond_without snappy # Snappy compression support (needed for hap encoding)
54 %bcond_without srt # Haivision SRT protocol support
55 %bcond_without ssh # SFTP protocol support via libssh
56 %bcond_with smb # SMB support via libsmbclient
57 %bcond_without soxr # SoX Resampler support
58 %bcond_with tesseract # OCR filter based on Tesseract
59 %bcond_without vmaf # VMAF filter support
60 %bcond_without x264 # H.264 x264 encoder
61 %bcond_without x265 # H.265/HEVC x265 encoder
62 %bcond_without va # VAAPI (Video Acceleration API)
63 %bcond_without vapoursynth # VapourSynth demuxer
64 %bcond_without vidstab # vid.stab video stabilization support
65 %bcond_without vpx # VP8, a high-quality video codec
66 %bcond_without wavpack # wavpack encoding support
67 %bcond_without webp # WebP encoding support
68 %bcond_without zimg # zscale filter based on z.lib
69 %bcond_without zmq # 0MQ message passing
70 %bcond_without zvbi # teletext via libzvbi
71 %bcond_without doc # don't build docs
72 %bcond_with tests # "make check" (some tests fail as of 2.5)
76 %undefine with_chromaprint
82 %ifnarch %{ix86} %{x8664}
83 %undefine with_ffnvcodec
85 %ifnarch %{ix86} %{x8664} %{arm}
91 Summary: FFmpeg - a very fast video and audio converter
92 Summary(pl.UTF-8): FFmpeg - szybki konwerter audio/wideo
96 # LGPL or GPL, chosen at configure time (GPL version is more featured)
97 # GPL: frei0r libcdio libdavs2 rubberband vidstab x264 x265 xavs xavs2 xvid
98 # v3 (allows *GPLv3 or Apache-licensed libs): gmp lensfun opencore-amr vmaf vo-*enc rkmpp
100 License: GPL v3+ with LGPL v3+ parts
101 Group: Applications/Multimedia
102 Source0: http://ffmpeg.org/releases/%{name}-%{version}.tar.xz
103 # Source0-md5: dcc20dd2682ea01c678b7b8324339d43
104 Patch0: %{name}-omx-libnames.patch
105 URL: http://www.ffmpeg.org/
106 %{?with_decklink:BuildRequires: Blackmagic_DeckLink_SDK >= 10.9.5}
107 %{?with_openal:BuildRequires: OpenAL-devel >= 1.1}
108 %{?with_opencl:BuildRequires: OpenCL-devel >= 1.2}
109 %{?with_opengl:BuildRequires: OpenGL-GLX-devel}
110 # libomxil-bellagio-devel or limoi-core-devel (just headers, library is dlopened at runtime)
111 %{?with_omx:BuildRequires: OpenMAX-IL-devel}
112 BuildRequires: SDL2-devel >= 2.0.1
113 BuildRequires: SDL2-devel < 2.1.0
114 BuildRequires: alsa-lib-devel
115 BuildRequires: aom-devel >= 1.0.0
116 BuildRequires: bzip2-devel
117 BuildRequires: celt-devel >= 0.11.0
118 %{?with_fdk_aac:BuildRequires: fdk-aac-devel}
119 %{?with_flite:BuildRequires: flite-devel >= 1.4}
120 BuildRequires: fontconfig-devel
121 BuildRequires: freetype-devel
122 %{?with_frei0r:BuildRequires: frei0r-devel}
123 %{?with_fribidi:BuildRequires: fribidi-devel}
124 %{?with_gme:BuildRequires: game-music-emu-devel}
126 # require version with altivec support fixed
127 BuildRequires: gcc >= 5:3.3.2-3
129 BuildRequires: gmp-devel
130 BuildRequires: gnutls-devel
131 BuildRequires: jack-audio-connection-kit-devel
132 %{?with_kvazaar:BuildRequires: kvazaar-devel >= 0.8.1}
133 %{?with_ladspa:BuildRequires: ladspa-devel}
134 BuildRequires: lame-libs-devel >= 3.98.3
135 %{?with_lensfun:BuildRequires: lensfun-devel}
136 BuildRequires: libass-devel
137 BuildRequires: libavc1394-devel
138 %{?with_bs2b:BuildRequires: libbs2b-devel}
139 BuildRequires: libbluray-devel
140 %{?with_caca:BuildRequires: libcaca-devel}
141 BuildRequires: libcdio-paranoia-devel >= 0.90-2
142 %{?with_chromaprint:BuildRequires: libchromaprint-devel}
143 BuildRequires: libcrystalhd-devel
144 BuildRequires: libdc1394-devel >= 2
145 %{?with_libdrm:BuildRequires: libdrm-devel}
146 BuildRequires: libgsm-devel
147 BuildRequires: libiec61883-devel
148 BuildRequires: libmodplug-devel
149 %{?with_libmysofa:BuildRequires: libmysofa-devel}
150 %{?with_openmpt:BuildRequires: libopenmpt-devel >= 0.2.6557}
151 BuildRequires: libraw1394-devel >= 2
152 %{?with_librsvg:BuildRequires: librsvg-devel >= 2}
153 BuildRequires: librtmp-devel
154 %{?with_ssh:BuildRequires: libssh-devel}
155 %{?with_smb:BuildRequires: libsmbclient-devel}
156 BuildRequires: libtheora-devel >= 1.0-0.beta3
157 BuildRequires: libtool >= 2:1.4d-3
158 BuildRequires: libv4l-devel
160 BuildRequires: libva-devel >= 1.0.3
161 BuildRequires: libva-drm-devel >= 1.0.3
162 BuildRequires: libva-x11-devel >= 1.0.3
164 BuildRequires: libvdpau-devel >= 0.2
165 BuildRequires: libvorbis-devel
166 %{?with_vpx:BuildRequires: libvpx-devel >= 1.4.0}
167 %{?with_webp:BuildRequires: libwebp-devel >= 0.4.0}
169 %{?with_x264:BuildRequires: libx264-devel >= 0.1.3-1.20111212_2245}
171 %{?with_x265:BuildRequires: libx265-devel >= 1.8}
172 # libxcb xcb-shm xcb-xfixes xcb-shape
173 BuildRequires: libxcb-devel >= 1.4
174 %{?with_libxml2:BuildRequires: libxml2-devel >= 2}
175 %{?with_lv2:BuildRequires: lilv-devel}
176 %{?with_lv2:BuildRequires: lv2-devel}
177 %{?with_mfx:BuildRequires: mfx_dispatch-devel}
183 %{?with_ffnvcodec:BuildRequires: nv-codec-headers >= 8.1.24.2}
185 BuildRequires: opencore-amr-devel
186 %{?with_opencv:BuildRequires: opencv-devel >= 2}
187 %{?with_openh264:BuildRequires: openh264-devel >= 1.3}
188 BuildRequires: openjpeg2-devel >= 2.1
189 BuildRequires: opus-devel
190 BuildRequires: perl-Encode
191 BuildRequires: perl-tools-pod
192 BuildRequires: pkgconfig
193 %{?with_pulseaudio:BuildRequires: pulseaudio-devel}
194 %{?with_rkmpp:BuildRequires: rockchip-mpp-devel >= 1.3.7}
195 BuildRequires: rpmbuild(macros) >= 1.470
196 %{?with_rubberband:BuildRequires: rubberband-devel >= 1.8.1}
197 %{?with_shine:BuildRequires: shine-devel >= 3.0.0}
198 %{?with_snappy:BuildRequires: snappy-devel}
199 %{?with_soxr:BuildRequires: soxr-devel}
200 BuildRequires: speex-devel >= 1:1.2-rc1
201 %{?with_srt:BuildRequires: srt-devel >= 1.3}
202 %{?with_tesseract:BuildRequires: tesseract-devel}
203 %{?with_doc:BuildRequires: tetex}
204 %{?with_doc:BuildRequires: texi2html}
205 %{?with_doc:BuildRequires: texinfo}
206 BuildRequires: twolame-devel >= 0.3.10
207 %{?with_vapoursynth:BuildRequires: vapoursynth-devel >= 42}
208 %{?with_vidstab:BuildRequires: vid.stab-devel >= 0.98}
209 %{?with_vmaf:BuildRequires: vmaf-devel >= 1.3.9}
210 BuildRequires: vo-amrwbenc-devel
211 %{?with_wavpack:BuildRequires: wavpack-devel}
212 %{?with_ilbc:BuildRequires: webrtc-libilbc-devel}
213 BuildRequires: xavs-devel
214 BuildRequires: xorg-lib-libX11-devel
215 BuildRequires: xorg-lib-libXext-devel
216 BuildRequires: xorg-lib-libXv-devel
217 BuildRequires: xvid-devel >= 1:1.1.0
218 BuildRequires: xz-devel
220 %{?with_zmq:BuildRequires: zeromq-devel}
221 %{?with_zimg:BuildRequires: zimg-devel >= 2.7.0}
222 BuildRequires: zlib-devel
223 %{?with_zvbi:BuildRequires: zvbi-devel >= 0.2.28}
224 %{?with_autoreqdep:BuildConflicts: libpostproc}
225 # overflows maximum hash table size
226 BuildConflicts: pdksh < 5.2.14-57
227 Requires: %{name}-libs = %{version}-%{release}
228 Obsoletes: libpostproc
229 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
231 %define specflags -fno-strict-aliasing
233 # -fomit-frame-pointer is always needed on x86 due to lack of registers (-fPIC takes one)
234 %define specflags_ia32 -fomit-frame-pointer
235 # -mmmx is needed to enable <mmintrin.h> code.
236 %define specflags_i586 -mmmx
237 %define specflags_i686 -mmmx
238 %define specflags_ppc -fPIC
241 FFmpeg is a complete solution to record, convert and stream audio and
242 video. It is a command line tool to convert one video file format to
243 another. It also supports grabbing and encoding in real time from a TV
246 %description -l pl.UTF-8
247 FFmpeg to kompletne rozwiązanie nagrywania, konwersji i transmisji
248 strumieni dźwięku i obrazu. Jest to działające z linii poleceń
249 narzędzie do konwersji obrazu z jednego formatu do innego. Obsługuje
250 także przechwytywanie i kodowanie w czasie rzeczywistym z karty
254 Summary: ffmpeg libraries
255 Summary(pl.UTF-8): Biblioteki ffmpeg
257 Requires: SDL2 >= 2.0.1
258 Requires: aom >= 1.0.0
259 Requires: celt >= 0.11.0
260 %{?with_flite:Requires: flite >= 1.4}
261 %if "%(rpm -q --qf '%{V}' gnutls-devel)" >= "3.0.20"
262 # uses gnutls_certificate_set_x509_system_trust if >= 3.0.20
263 Requires: gnutls-libs >= 3.0.20
265 %{?with_kvazaar:Requires: kvazaar-libs >= 0.8.1}
266 %{?with_openmpt:Requires: libopenmpt >= 0.2.6557}
267 Requires: libtheora >= 1.0-0.beta3
269 Requires: libva >= 1.0.3
270 Requires: libva-drm >= 1.0.3
271 Requires: libva-x11 >= 1.0.3
273 Requires: libvdpau >= 0.2
274 %{?with_vpx:Requires: libvpx >= 1.4.0}
275 %{?with_webp:Requires: libwebp >= 0.4.0}
276 %{?with_x264:Requires: libx264 >= 0.1.3-1.20111212_2245}
277 %{?with_x265:Requires: libx265 >= 1.8}
278 Requires: libxcb >= 1.4
279 Requires: lame-libs >= 3.98.3
280 %{?with_openh264:Requires: openh264 >= 1.3}
281 Requires: openjpeg2 >= 2.1
282 %{?with_rkmpp:Requires: rockchip-mpp >= 1.3.7}
283 %{?with_rubberband:Requires: rubberband-libs >= 1.8.1}
284 %{?with_shine:Requires: shine >= 3.0.0}
285 Requires: speex >= 1:1.2-rc1
286 %{?with_srt:Requires: srt >= 1.3}
287 Requires: twolame-libs >= 0.3.10
288 %{?with_vapoursynth:Requires: vapoursynth >= 42}
289 %{?with_vidstab:Requires: vid.stab >= 0.98}
290 %{?with_vmaf:Requires: vmaf-libs >= 1.3.9}
291 Requires: xvid >= 1:1.1.0
292 %{?with_zimg:Requires: zimg >= 2.7.0}
293 %{?with_zvbi:Requires: zvbi >= 0.2.28}
296 This package contains the ffmpeg shared libraries:
297 - the codec library (libavcodec). It supports most existing encoding
298 formats (MPEG, DivX, MPEG4, AC3, DV...),
299 - demuxer library (libavformat). It supports most existing file
300 formats (AVI, MPEG, OGG, Matroska, ASF...),
301 - video postprocessing library (libpostproc).
303 %description libs -l pl.UTF-8
304 Ten pakiet zawiera biblioteki współdzielone ffmpeg:
305 - bibliotekę kodeków (libavcodec); obsługuje większość istniejących
306 formatów kodowania (MPEG, DivX, MPEG4, AC3, DV...),
307 - bibliotekę demuksera (libavformat); obsługuje większość istniejących
308 formatów plików (AVI, MPEG, OGG, Matroska, ASF...),
309 - bibliotekę postprocessingu (libpostproc).
312 Summary: ffmpeg header files
313 Summary(pl.UTF-8): Pliki nagłówkowe ffmpeg
314 Group: Development/Libraries
315 Requires: %{name}-libs = %{version}-%{release}
316 # Libs.private from *.pc
317 %{?with_openal:Requires: OpenAL-devel >= 1.1}
318 %{?with_opencl:Requires: OpenCL-devel >= 1.2}
319 %{?with_opengl:Requires: OpenGL-devel}
320 Requires: SDL2-devel >= 2.0.1
321 Requires: alsa-lib-devel
322 Requires: aom-devel >= 1.0.0
323 Requires: bzip2-devel
324 Requires: celt-devel >= 0.11.0
325 %{?with_fdk_aac:Requires: fdk-aac-devel}
326 %{?with_flite:Requires: flite-devel >= 1.4}
327 Requires: fontconfig-devel
328 Requires: freetype-devel
329 %{?with_fribidi:Requires: fribidi-devel}
330 %{?with_gme:Requires: game-music-emu-devel}
331 Requires: gnutls-devel
332 Requires: jack-audio-connection-kit-devel
333 %{?with_kvazaar:Requires: kvazaar-devel >= 0.8.1}
334 Requires: lame-libs-devel >= 3.98.3
335 %{?with_lensfun:Requires: lensfun-devel}
336 Requires: libass-devel
337 Requires: libavc1394-devel
338 Requires: libbluray-devel
339 %{?with_bs2b:Requires: libbs2b-devel}
340 %{?with_caca:Requires: libcaca-devel}
341 Requires: libcdio-paranoia-devel >= 0.90-2
342 %{?with_chromaprint:Requires: libchromaprint-devel}
343 Requires: libcrystalhd-devel
344 Requires: libdc1394-devel >= 2
345 %{?with_libdrm:Requires: libdrm-devel}
346 Requires: libgsm-devel
347 Requires: libiec61883-devel
348 Requires: libmodplug-devel
349 %{?with_libmysofa:Requires: libmysofa-devel}
350 %{?with_openmpt:Requires: libopenmpt-devel >= 0.2.6557}
351 Requires: libraw1394-devel >= 2
352 %{?with_librsvg:Requires: librsvg-devel >= 2}
353 Requires: librtmp-devel
354 %{?with_smb:Requires: libsmbclient-devel}
355 %{?with_ssh:Requires: libssh-devel}
356 Requires: libstdc++-devel
357 Requires: libtheora-devel >= 1.0-0.beta3
358 Requires: libv4l-devel
359 %{?with_va:Requires: libva-devel >= 1.0.3}
360 %{?with_va:Requires: libva-drm-devel >= 1.0.3}
361 %{?with_va:Requires: libva-x11-devel >= 1.0.3}
362 Requires: libvdpau-devel >= 0.2
363 Requires: libvorbis-devel
364 %{?with_vpx:Requires: libvpx-devel >= 1.4.0}
365 %{?with_webp:Requires: libwebp-devel >= 0.4.0}
366 %{?with_x264:Requires: libx264-devel >= 0.1.3-1.20110625_2245}
367 %{?with_x265:Requires: libx265-devel >= 1.8}
368 # libxcb xcb-shm xcb-xfixes xcb-shape
369 Requires: libxcb-devel >= 1.4
370 %{?with_libxml2:Requires: libxml2-devel >= 2}
371 %{?with_lv2:Requires: lilv-devel}
372 %{?with_mfx:Requires: mfx_dispatch-devel}
373 Requires: opencore-amr-devel
374 %{?with_opencv:Requires: opencv-devel >= 2}
375 %{?with_openh264:Requires: openh264-devel >= 1.3}
376 Requires: openjpeg2-devel >= 2.1
378 %{?with_pulseaudio:Requires: pulseaudio-devel}
379 %{?with_rkmpp:Requires: rockchip-mpp-devel >= 1.3.7}
380 %{?with_rubberband:Requires: rubberband-devel >= 1.8.1}
381 %{?with_shine:Requires: shine-devel >= 3.0.0}
382 %{?with_snappy:Requires: snappy-devel}
383 %{?with_soxr:Requires: soxr-devel}
384 Requires: speex-devel >= 1:1.2-rc1
385 %{?with_srt:Requires: srt-devel >= 1.3}
386 %{?with_tesseract:Requires: tesseract-devel}
387 Requires: twolame-devel >= 0.3.10
388 %{?with_vapoursynth:Requires: vapoursynth-devel >= 42}
389 %{?with_vidstab:Requires: vid.stab-devel >= 0.98}
390 Requires: vo-amrwbenc-devel
391 %{?with_vmaf:Requires: vmaf-devel >= 1.3.9}
392 %{?with_wavpack:Requires: wavpack-devel}
393 %{?with_ilbc:Requires: webrtc-libilbc-devel}
395 Requires: xorg-lib-libX11-devel
396 Requires: xorg-lib-libXext-devel
397 Requires: xorg-lib-libXv-devel
398 Requires: xvid-devel >= 1:1.1.0
400 %{?with_zmq:Requires: zeromq-devel}
401 %{?with_zimg:Requires: zimg-devel >= 2.7.0}
403 %{?with_zvbi:Requires: zvbi-devel >= 0.2.28}
404 Obsoletes: libpostproc-devel
409 %description devel -l pl.UTF-8
410 Pliki nagłówkowe ffmpeg.
413 Summary: ffmpeg static libraries
414 Summary(pl.UTF-8): Statyczne biblioteki ffmpeg
415 Group: Development/Libraries
416 Requires: %{name}-devel = %{version}-%{release}
419 ffmpeg static libraries (libavcodec and libavformat).
421 %description static -l pl.UTF-8
422 Statyczne biblioteki ffmpeg (libavcodec i libavformat).
425 Summary: FFplay - SDL-based media player
426 Summary(pl.UTF-8): FFplay - odtwarzacz mediów oparty na SDL
427 Group: Applications/Multimedia
428 Requires: %{name}-libs = %{version}-%{release}
431 FFplay is a very simple and portable media player using the FFmpeg
432 libraries and the SDL library. It is mostly used as a test bench for
433 the various APIs of FFmpeg.
435 %description ffplay -l pl.UTF-8
436 FFplay to bardzo prosty i przenośny odtwarzacz mediów używający
437 bibliotek FFmpeg oraz biblioteki SDL. Jest używany głównie do
438 testowania różnych API FFmpeg.
441 Summary: FFmpeg documentation in HTML format
442 Summary(pl.UTF-8): Dokumentacja pakietu FFmpeg w formacie HTML
444 %if "%{_rpmversion}" >= "5"
449 FFmpeg documentation in HTML format.
451 %description doc -l pl.UTF-8
452 Dokumentacja pakietu FFmpeg w formacie HTML.
458 # package the grep result for mplayer, the result formatted as ./mplayer/configure
459 cat <<EOF > ffmpeg-avconfig
461 libavdecoders_all="$(sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
462 libavencoders_all="$(sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
463 libavparsers_all="$(sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
464 libavbsfs_all="$(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
465 libavdemuxers_all="$(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')"
466 libavmuxers_all="$(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')"
467 libavprotocols_all="$(sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]')"
468 libavhwaccels_all="$(sed -n 's/^[^#]*HWACCEL.*(.*, *\(.*\)).*/\1_hwaccel/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')"
469 libavfilters_all="$(sed -n 's/^[^#]*FILTER.*(.*, *\(.*\),.*).*/\1_filter/p' libavfilter/allfilters.c | tr '[a-z]' '[A-Z]')"
471 cat <<'EOF' >> ffmpeg-avconfig
475 echo $libavdecoders_all
478 echo $libavencoders_all
481 echo $libavparsers_all
487 echo $libavdemuxers_all
490 echo $libavmuxers_all
493 echo $libavprotocols_all
496 echo $libavhwaccels_all
499 echo $libavfilters_all
523 # - it's not autoconf configure
524 # - --disable-debug, --disable-optimizations, tune=generic causes not to override our optflags
526 --arch=%{_target_base_arch} \
527 --prefix=%{_prefix} \
528 --libdir=%{_libdir} \
529 --shlibdir=%{_libdir} \
530 --mandir=%{_mandir} \
531 --extra-cflags="-D_GNU_SOURCE=1 %{rpmcppflags} %{rpmcflags}%{?with_decklink: -I/usr/include/decklink}" \
532 --extra-ldflags="%{rpmcflags} %{rpmldflags}" \
535 --disable-optimizations \
536 --disable-stripping \
537 %{!?with_doc:--disable-doc} \
539 --enable-avresample \
540 %{?with_chromaprint:--enable-chromaprint} \
541 %{?with_cudasdk:--enable-cuda-sdk} \
542 %{?with_decklink:--enable-decklink} \
543 %{!?with_ffnvcodec:--disable-ffnvcodec} \
547 %{?with_frei0r:--enable-frei0r} \
548 %{?with_ladspa:--enable-ladspa} \
552 %{?with_bs2b:--enable-libbs2b} \
553 %{?with_caca:--enable-libcaca} \
557 %{?with_libdrm:--enable-libdrm} \
558 %{?with_flite:--enable-libflite} \
559 --enable-libfontconfig \
560 --enable-libfreetype \
561 %{?with_fribidi:--enable-libfribidi} \
562 %{?with_gme:--enable-libgme} \
564 --enable-libiec61883 \
565 %{?with_ilbc:--enable-libilbc} \
567 %{?with_kvazaar:--enable-libkvazaar} \
568 %{?with_lensfun:--enable-liblensfun} \
569 %{?with_mfx:--enable-libmfx} \
570 --enable-libmodplug \
571 --enable-libmp3lame \
572 %{?with_libmysofa:--enable-libmysofa} \
573 --enable-libopencore-amrnb \
574 --enable-libopencore-amrwb \
575 %{?with_opencv:--enable-libopencv} \
576 %{?with_openh264:--enable-libopenh264} \
577 --enable-libopenjpeg \
578 %{?with_openmpt:--enable-libopenmpt} \
580 %{?with_pulseaudio:--enable-libpulse} \
581 %{?with_librsvg:--enable-librsvg} \
583 %{?with_srt:--enable-libsrt} \
584 %{?with_libxml2:--enable-libxml2} \
585 %{?with_rubberband:--enable-librubberband} \
586 %{?with_shine:--enable-libshine} \
587 %{?with_smb:--enable-libsmbclient} \
588 %{?with_snappy:--enable-libsnappy} \
589 %{?with_soxr:--enable-libsoxr} \
591 %{?with_ssh:--enable-libssh} \
592 %{?with_tesseract:--enable-libtesseract} \
594 --enable-libtwolame \
596 %{?with_vidstab:--enable-libvidstab} \
597 %{?with_vmaf:--enable-libvmaf} \
598 --enable-libvo-amrwbenc \
600 %{?with_vpx:--enable-libvpx} \
601 %{?with_wavpack:--enable-libwavpack} \
602 %{?with_webp:--enable-libwebp} \
603 %{?with_x264:--enable-libx264} \
604 %{?with_x265:--enable-libx265} \
608 %{?with_zimg:--enable-libzimg} \
609 %{?with_zmq:--enable-libzmq} \
610 %{?with_zvbi:--enable-libzvbi} \
611 %{?with_lv2:--enable-lv2} \
612 %{?with_omx:--enable-omx} \
613 %{?with_openal:--enable-openal} \
614 %{?with_opencl:--enable-opencl} \
615 %{?with_opengl:--enable-opengl} \
618 %{?with_rkmpp:--enable-rkmpp} \
621 %{!?with_va:--disable-vaapi} \
622 %{?with_vapoursynth:--enable-vapoursynth} \
623 %ifnarch %{ix86} %{x8664}
634 %{?with_fdk_aac:--enable-libfdk-aac} \
635 %{?with_npp:--enable-libnpp} \
637 --enable-runtime-cpudetect
642 # CC_O to add -c to commandline. makefile should be patched
643 %{__make} tools/qt-faststart V=1 CC_O='-c -o $@'
645 %{?with_tests:%{__make} check V=1}
648 rm -rf $RPM_BUILD_ROOT
649 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},/etc/{sysconfig,rc.d/init.d}} \
650 $RPM_BUILD_ROOT%{_includedir}/ffmpeg
652 %{__make} install install-headers \
653 DESTDIR=$RPM_BUILD_ROOT \
656 # install nonstandard, non-public headers manually
657 cp -a config.h $RPM_BUILD_ROOT%{_includedir}/ffmpeg
658 for a in libavutil/*/{asm,bswap}.h; do
659 install -Dp $a $RPM_BUILD_ROOT%{_includedir}/$a
661 cp -a libavformat/riff.h $RPM_BUILD_ROOT%{_includedir}/libavformat
663 install -p tools/qt-faststart $RPM_BUILD_ROOT%{_bindir}
665 # install as ffmpeg-avconfig to avoid with possible programs looking for
666 # ffmpeg-config and expecting --libs output from it which is not implemented
667 # simple to do (by querying pkgconfig), but why?
668 install -p ffmpeg-avconfig $RPM_BUILD_ROOT%{_bindir}/ffmpeg-avconfig
670 # packaged as %doc in -doc
672 %{__rm} $RPM_BUILD_ROOT%{_docdir}/ffmpeg/*.html
675 install -d $RPM_BUILD_ROOT%{_examplesdir}
676 %{__mv} $RPM_BUILD_ROOT%{_datadir}/ffmpeg/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
679 rm -rf $RPM_BUILD_ROOT
681 %post libs -p /sbin/ldconfig
682 %postun libs -p /sbin/ldconfig
685 %defattr(644,root,root,755)
686 %doc CREDITS LICENSE.md MAINTAINERS README.md RELEASE_NOTES doc/APIchanges
687 %attr(755,root,root) %{_bindir}/ffmpeg
688 %attr(755,root,root) %{_bindir}/ffprobe
689 %attr(755,root,root) %{_bindir}/qt-faststart
690 %dir %{_datadir}/ffmpeg
691 %{_datadir}/ffmpeg/*.ffpreset
692 %{_datadir}/ffmpeg/ffprobe.xsd
694 %{_mandir}/man1/ffmpeg.1*
695 %{_mandir}/man1/ffmpeg-all.1*
696 %{_mandir}/man1/ffmpeg-bitstream-filters.1*
697 %{_mandir}/man1/ffmpeg-codecs.1*
698 %{_mandir}/man1/ffmpeg-devices.1*
699 %{_mandir}/man1/ffmpeg-filters.1*
700 %{_mandir}/man1/ffmpeg-formats.1*
701 %{_mandir}/man1/ffmpeg-protocols.1*
702 %{_mandir}/man1/ffmpeg-resampler.1*
703 %{_mandir}/man1/ffmpeg-scaler.1*
704 %{_mandir}/man1/ffmpeg-utils.1*
705 %{_mandir}/man1/ffprobe.1*
706 %{_mandir}/man1/ffprobe-all.1*
710 %defattr(644,root,root,755)
711 %attr(755,root,root) %{_libdir}/libavcodec.so.*.*.*
712 %attr(755,root,root) %ghost %{_libdir}/libavcodec.so.58
713 %attr(755,root,root) %{_libdir}/libavdevice.so.*.*.*
714 %attr(755,root,root) %ghost %{_libdir}/libavdevice.so.58
715 %attr(755,root,root) %{_libdir}/libavfilter.so.*.*.*
716 %attr(755,root,root) %ghost %{_libdir}/libavfilter.so.7
717 %attr(755,root,root) %{_libdir}/libavformat.so.*.*.*
718 %attr(755,root,root) %ghost %{_libdir}/libavformat.so.58
719 %attr(755,root,root) %{_libdir}/libavresample.so.*.*.*
720 %attr(755,root,root) %ghost %{_libdir}/libavresample.so.4
721 %attr(755,root,root) %{_libdir}/libavutil.so.*.*.*
722 %attr(755,root,root) %ghost %{_libdir}/libavutil.so.56
723 %attr(755,root,root) %{_libdir}/libpostproc.so.*.*.*
724 %attr(755,root,root) %ghost %{_libdir}/libpostproc.so.55
725 %attr(755,root,root) %{_libdir}/libswresample.so.*.*.*
726 %attr(755,root,root) %ghost %{_libdir}/libswresample.so.3
727 %attr(755,root,root) %{_libdir}/libswscale.so.*.*.*
728 %attr(755,root,root) %ghost %{_libdir}/libswscale.so.5
731 %defattr(644,root,root,755)
732 %doc doc/optimization.txt
733 %attr(755,root,root) %{_bindir}/ffmpeg-avconfig
734 %attr(755,root,root) %{_libdir}/libavcodec.so
735 %attr(755,root,root) %{_libdir}/libavdevice.so
736 %attr(755,root,root) %{_libdir}/libavfilter.so
737 %attr(755,root,root) %{_libdir}/libavformat.so
738 %attr(755,root,root) %{_libdir}/libavresample.so
739 %attr(755,root,root) %{_libdir}/libavutil.so
740 %attr(755,root,root) %{_libdir}/libpostproc.so
741 %attr(755,root,root) %{_libdir}/libswresample.so
742 %attr(755,root,root) %{_libdir}/libswscale.so
743 %{_includedir}/ffmpeg
744 %{_includedir}/libavcodec
745 %{_includedir}/libavdevice
746 %{_includedir}/libavfilter
747 %{_includedir}/libavformat
748 %{_includedir}/libavresample
749 %{_includedir}/libavutil
750 %{_includedir}/libpostproc
751 %{_includedir}/libswresample
752 %{_includedir}/libswscale
753 %{_pkgconfigdir}/libavcodec.pc
754 %{_pkgconfigdir}/libavdevice.pc
755 %{_pkgconfigdir}/libavfilter.pc
756 %{_pkgconfigdir}/libavformat.pc
757 %{_pkgconfigdir}/libavresample.pc
758 %{_pkgconfigdir}/libavutil.pc
759 %{_pkgconfigdir}/libpostproc.pc
760 %{_pkgconfigdir}/libswresample.pc
761 %{_pkgconfigdir}/libswscale.pc
763 %{_mandir}/man3/libavcodec.3*
764 %{_mandir}/man3/libavdevice.3*
765 %{_mandir}/man3/libavfilter.3*
766 %{_mandir}/man3/libavformat.3*
767 %{_mandir}/man3/libavutil.3*
768 %{_mandir}/man3/libswresample.3*
769 %{_mandir}/man3/libswscale.3*
771 %{_examplesdir}/%{name}-%{version}
774 %defattr(644,root,root,755)
775 %{_libdir}/libavcodec.a
776 %{_libdir}/libavdevice.a
777 %{_libdir}/libavfilter.a
778 %{_libdir}/libavformat.a
779 %{_libdir}/libavresample.a
780 %{_libdir}/libavutil.a
781 %{_libdir}/libpostproc.a
782 %{_libdir}/libswresample.a
783 %{_libdir}/libswscale.a
786 %defattr(644,root,root,755)
787 %attr(755,root,root) %{_bindir}/ffplay
789 %{_mandir}/man1/ffplay.1*
790 %{_mandir}/man1/ffplay-all.1*
795 %defattr(644,root,root,755)