2 # - libnut enabled no (http://www.nut-container.org/)
5 %bcond_with nonfree # non free options of package
6 %bcond_without autoreqdep # don't care about package name deps generated by rpm
7 %bcond_without imlib2 # don't build imlib2 vhook module
9 Summary: FFmpeg is a very fast video and audio converter
10 Summary(pl.UTF-8): Koder audio/wideo czasu rzeczywistego oraz serwer strumieni
14 # LGPL or GPL, chosen at configure time (GPL version is more featured)
15 # (postprocessing, ac3, xvid, x264, faad)
16 License: GPL v3+ with LGPL v3+ parts
17 Group: Applications/Multimedia
18 Source0: http://ffmpeg.mplayerhq.hu/releases/%{name}-%{version}.tar.bz2
19 # Source0-md5: d6142a9a5821d6a6262a6edb903faa24
20 Source1: ffserver.init
21 Source2: ffserver.sysconfig
22 Source3: ffserver.conf
23 Patch0: %{name}-bug-803.patch
24 Patch1: %{name}-gsm.patch
25 URL: http://www.ffmpeg.org/
26 BuildRequires: SDL-devel
27 BuildRequires: dirac-devel >= 1.0.0
28 BuildRequires: faac-devel
29 BuildRequires: faad2-devel
30 BuildRequires: freetype-devel
32 # require version with altivec support fixed
33 BuildRequires: gcc >= 5:3.3.2-3
35 %{?with_imlib2:BuildRequires: imlib2-devel >= 1.3.0}
36 BuildRequires: lame-libs-devel
37 BuildRequires: libdc1394-devel
38 BuildRequires: libgsm-devel
39 BuildRequires: libraw1394-devel
40 BuildRequires: libtheora-devel >= 1.0-0.beta3
41 BuildRequires: libtool >= 2:1.4d-3
42 BuildRequires: libva-devel >= 1.0.3
43 BuildRequires: libvdpau-devel
44 BuildRequires: libvorbis-devel
45 BuildRequires: libvpx-devel
46 BuildRequires: libx264-devel >= 0.1.3
47 BuildRequires: opencore-amr-devel
48 BuildRequires: openjpeg-devel >= 1.3-2
49 BuildRequires: speex-devel
55 BuildRequires: perl-Encode
56 BuildRequires: perl-tools-pod
57 BuildRequires: pkgconfig
58 BuildRequires: rpmbuild(macros) >= 1.470
59 BuildRequires: schroedinger-devel
60 BuildRequires: speex-devel
62 BuildRequires: texi2html
63 BuildRequires: texinfo
64 BuildRequires: xvid-devel >= 1:1.1.0
65 BuildRequires: zlib-devel
66 %{?with_autoreqdep:BuildConflicts: libpostproc}
67 Requires: %{name}-libs = %{version}-%{release}
68 Requires: xvid >= 1:1.1.0
69 Obsoletes: libpostproc
70 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
72 %define _noautoreqdep libGL.so.1 libGLU.so.1
74 %define specflags -fno-strict-aliasing
76 # -fomit-frame-pointer is always needed on x86 due to lack of registers (-fPIC takes one)
77 %define specflags_ia32 -fomit-frame-pointer
78 # -mmmx is needed to enable <mmintrin.h> code.
79 %define specflags_i586 -mmmx
80 %define specflags_i686 -mmmx
81 %define specflags_ppc -fPIC
84 FFmpeg is a complete solution to record, convert and stream audio and
85 video. It is a command line tool to convert one video file format to
86 another. It also supports grabbing and encoding in real time from a TV
89 %description -l pl.UTF-8
90 ffmpeg jest bardzo szybkim koderem audio/wideo w czasie rzeczywistym
91 oraz serwerem strumieni multimedialnych. ffmpeg potrafi zrzucać dane
92 ze standardowego urządzenia Video4Linux i przekonwertować je w kilka
93 formatów plików bazujących na kodowaniu DCT/kompensacji ruchu. Dźwięk
94 jest kompresowany do strumienia MPEG audio layer 2 lub używając
95 strumienia kompatybilnego z AC3.
98 Summary: ffmpeg libraries
99 Summary(pl.UTF-8): Biblioteki ffmpeg
103 This package contains:
104 - the codec library from the ffmpeg project. It supports most existing
105 encoding formats (MPEG, DivX, MPEG4, AC3, DV...),
106 - demuxer library from the ffmpeg project. It supports most existing
107 file formats (AVI, MPEG, OGG, Matroska, ASF...),
108 - video postprocessing library from the ffmpeg project.
110 %description libs -l pl.UTF-8
111 Ten pakiet zawiera biblioteki współdzielone ffmpeg.
114 Summary: ffmpeg header files
115 Summary(pl.UTF-8): Pliki nagłówkowe ffmpeg
116 Group: Development/Libraries
117 Requires: %{name}-libs = %{version}-%{release}
119 Requires: dirac-devel
121 Requires: faad2-devel
122 Requires: lame-libs-devel
123 Requires: libgsm-devel
124 Requires: libraw1394-devel
125 Requires: libtheora-devel >= 1.0-0.alpha7
126 Requires: libvorbis-devel
127 Requires: libx264-devel >= 0.1.2-1.20060828_2245.1
128 Requires: xvid-devel >= 1:1.1.0
130 Obsoletes: libpostproc-devel
135 %description devel -l pl.UTF-8
136 Pliki nagłówkowe ffmpeg.
139 Summary: ffmpeg static libraries
140 Summary(pl.UTF-8): Statyczne biblioteki ffmpeg
141 Group: Development/Libraries
142 Requires: %{name}-devel = %{version}-%{release}
145 ffmpeg static libraries (libavcodec and libavformat).
147 %description static -l pl.UTF-8
148 Statyczne biblioteki ffmpeg (libavcodec i libavformat).
151 Summary: FFplay - SDL-based media player
152 Summary(pl.UTF-8): FFplay - odtwarzacz mediów oparty na SDL
153 Group: Applications/Multimedia
154 Requires: %{name}-libs = %{version}-%{release}
157 FFplay is a very simple and portable media player using the FFmpeg
158 libraries and the SDL library. It is mostly used as a test bench for
159 the various APIs of FFmpeg.
161 %description ffplay -l pl.UTF-8
162 FFplay to bardzo prosty i przenośny odtwarzacz mediów używający
163 bibliotek FFmpeg oraz biblioteki SDL. Jest używany głównie do
164 testowania różnych API FFmpeg.
167 Summary: FFserver video server
168 Summary(pl.UTF-8): FFserver - serwer strumieni obrazu
170 Requires(post,preun): /sbin/chkconfig
171 Requires: %{name}-libs = %{version}-%{release}
172 Requires: rc-scripts >= 0.4.0.10
174 %description ffserver
175 FFserver is a streaming server for both audio and video. It supports
176 several live feeds, streaming from files and time shifting on live
177 feeds (you can seek to positions in the past on each live feed,
178 provided you specify a big enough feed storage in ffserver.conf).
180 %description ffserver -l pl.UTF-8
181 FFserver to serwer strumieni dla dźwięku i obrazu. Obsługuje kilka
182 źródeł na żywo, przekazywanie strumieni z plików i przesuwanie w
183 czasie dla źródeł na żywo (można przeskakiwać na położenia w
184 przeszłości dla każdego źródła na żywo, pod warunkiem odpowiednio
185 dużej przestrzeni na dane skonfigurowanej w ffserver.conf).
192 # package the grep result for mplayer, the result formatted as ./mplayer/configure
193 cat <<EOF > ffmpeg-avconfig
195 _libavdecoders_all="`sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`"
196 _libavencoders_all="`sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`"
197 _libavparsers_all="`sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`"
198 _libavbsfs_all="`sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`"
199 _libavdemuxers_all="`sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`"
200 _libavmuxers_all="`sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`"
201 _libavprotocols_all="`sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`"
203 cat <<'EOF' >> ffmpeg-avconfig
207 echo $_libavdecoders_all
210 echo $_libavencoders_all
213 echo $_libavparsers_all
219 echo $_libavdemuxers_all
222 echo $_libavmuxers_all
225 echo $_libavprotocols_all
247 # - it's not autoconf configure
248 # - --disable-debug, --disable-optimizations, tune=generic causes not to override our optflags
250 --arch=%{_target_base_arch} \
251 --prefix=%{_prefix} \
252 --libdir=%{_libdir} \
253 --shlibdir=%{_libdir} \
254 --mandir=%{_mandir} \
256 --extra-cflags="-D_GNU_SOURCE=1 %{rpmcppflags} %{rpmcflags}" \
257 --extra-ldflags="%{rpmcflags} %{rpmldflags}" \
259 --disable-optimizations \
260 --disable-stripping \
267 --enable-libfaadbin \
269 --enable-libmp3lame \
270 --enable-libschroedinger \
277 --enable-libopencore-amrnb \
278 --enable-libopencore-amrwb \
279 --enable-libopenjpeg \
285 %ifnarch %{ix86} %{x8664}
295 --enable-runtime-cpudetect
297 # force oldscaler build
298 sed -i -e 's|#define.*CONFIG_OLDSCALER.*0|#define CONFIG_OLDSCALER 1|g' config.h
303 rm -rf $RPM_BUILD_ROOT
304 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},/etc/{sysconfig,rc.d/init.d}} \
305 $RPM_BUILD_ROOT%{_includedir}/ffmpeg \
306 $RPM_BUILD_ROOT/var/{cache,log}/ffserver
309 DESTDIR=$RPM_BUILD_ROOT
311 cp -a config.h $RPM_BUILD_ROOT%{_includedir}/ffmpeg
312 cp -a libavutil/intreadwrite.h $RPM_BUILD_ROOT%{_includedir}/libavutil
313 cp -a libavutil/bswap.h $RPM_BUILD_ROOT%{_includedir}/libavutil
314 cp -a libavutil/common.h $RPM_BUILD_ROOT%{_includedir}/libavutil
315 cp -a libavutil/mem.h $RPM_BUILD_ROOT%{_includedir}/libavutil
316 for a in libavutil/*/bswap.h; do
317 install -D $a $RPM_BUILD_ROOT%{_includedir}/$a
319 cp -a libavformat/riff.h $RPM_BUILD_ROOT%{_includedir}/libavformat
320 cp -a libavformat/avio.h $RPM_BUILD_ROOT%{_includedir}/libavformat
322 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ffserver
323 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ffserver
324 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/ffserver.conf
325 mv -f $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/ffserver
327 # install as ffmpeg-avconfig to avoid with possible programs looking for
328 # ffmpeg-config and expecting --libs output from it which is not implemented
329 # simple to do (by querying pkgconfig), but why?
330 install ffmpeg-avconfig $RPM_BUILD_ROOT%{_bindir}/ffmpeg-avconfig
333 rm -rf $RPM_BUILD_ROOT
335 %post libs -p /sbin/ldconfig
336 %postun libs -p /sbin/ldconfig
339 %groupadd -g 167 ffserver
340 %useradd -g ffserver -u 167 ffserver
343 /sbin/chkconfig --add ffserver
344 %service ffserver restart
347 if [ "$1" = 0 ]; then
348 %service ffserver stop
349 /sbin/chkconfig --del ffserver
353 if [ "$1" = 0 ]; then
355 %groupremove ffserver
359 %defattr(644,root,root,755)
360 %doc Changelog README doc/*.html doc/TODO
361 %attr(755,root,root) %{_bindir}/ffmpeg
362 %attr(755,root,root) %{_bindir}/ffprobe
363 %dir %{_datadir}/ffmpeg
364 %{_datadir}/ffmpeg/*.ffpreset
365 %{_mandir}/man1/ffmpeg.1*
366 %{_mandir}/man1/ffprobe.1*
369 %defattr(644,root,root,755)
370 %attr(755,root,root) %{_libdir}/libavcodec.so.*.*.*
371 %attr(755,root,root) %ghost %{_libdir}/libavcodec.so.52
372 %attr(755,root,root) %{_libdir}/libavdevice.so.*.*.*
373 %attr(755,root,root) %ghost %{_libdir}/libavdevice.so.52
374 %attr(755,root,root) %{_libdir}/libavfilter.so.*.*.*
375 %attr(755,root,root) %ghost %{_libdir}/libavfilter.so.1
376 %attr(755,root,root) %{_libdir}/libavformat.so.*.*.*
377 %attr(755,root,root) %ghost %{_libdir}/libavformat.so.52
378 %attr(755,root,root) %{_libdir}/libavutil.so.*.*.*
379 %attr(755,root,root) %ghost %{_libdir}/libavutil.so.50
380 %attr(755,root,root) %{_libdir}/libpostproc.so.*.*.*
381 %attr(755,root,root) %ghost %{_libdir}/libpostproc.so.51
382 %attr(755,root,root) %{_libdir}/libswscale.so.*.*.*
383 %attr(755,root,root) %ghost %{_libdir}/libswscale.so.0
386 %defattr(644,root,root,755)
387 %doc doc/optimization.txt
388 %attr(755,root,root) %{_libdir}/libavcodec.so
389 %attr(755,root,root) %{_libdir}/libavdevice.so
390 %attr(755,root,root) %{_libdir}/libavfilter.so
391 %attr(755,root,root) %{_libdir}/libavformat.so
392 %attr(755,root,root) %{_libdir}/libavutil.so
393 %attr(755,root,root) %{_libdir}/libpostproc.so
394 %attr(755,root,root) %{_libdir}/libswscale.so
395 %attr(755,root,root) %{_bindir}/ffmpeg-avconfig
396 %{_includedir}/ffmpeg
397 %{_includedir}/libavcodec
398 %{_includedir}/libavdevice
399 %{_includedir}/libavfilter
400 %{_includedir}/libavformat
401 %{_includedir}/libavutil
402 %{_includedir}/libpostproc
403 %{_includedir}/libswscale
404 %{_pkgconfigdir}/*.pc
407 %defattr(644,root,root,755)
411 %defattr(644,root,root,755)
412 %attr(755,root,root) %{_bindir}/ffplay
413 %{_mandir}/man1/ffplay.1*
416 %defattr(644,root,root,755)
417 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ffserver.conf
418 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ffserver
419 %attr(755,root,root) %{_sbindir}/ffserver
420 %attr(754,root,root) /etc/rc.d/init.d/ffserver
421 %{_mandir}/man1/ffserver.1*
422 %dir %attr(770,root,ffserver) /var/cache/ffserver
423 %dir %attr(770,root,ffserver) /var/log/ffserver