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