X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=ffmpeg.spec;h=329ccc42dc1571d614d74fce56d51d42355785d4;hb=daf9a670ef1c0bdf8fd0953f738fa58e5b16368e;hp=4c9f5b6678af7e1434745945217510c9046f6fc0;hpb=d0a0ec26c77d65734296755e35e2d96c9a9535e1;p=packages%2Fffmpeg.git diff --git a/ffmpeg.spec b/ffmpeg.spec index 4c9f5b6..329ccc4 100644 --- a/ffmpeg.spec +++ b/ffmpeg.spec @@ -1,65 +1,103 @@ # TODO -# - libnut enabled no (http://www.nut-container.org/) +# - is bug803 patch still needed? the code changed somehow +# +# Workaround ffmpeg.spec & opencv.spec updating: +# +# 1. make-request -r --without opencv ffmpeg.spec +# 2. make-request -r opencv.spec +# 3. bump release of ffmpeg.spec +# 4. make-request -r ffmpeg.spec # # Conditional build: -%bcond_with amr # build 3GPP Adaptive Multi Rate (AMR) speech codec +%bcond_with nonfree # non free options of package (currently: faac) +%bcond_with aacplus # AAC+ encoding via libaacplus (requires nonfree) %bcond_without autoreqdep # don't care about package name deps generated by rpm -%bcond_without imlib2 # don't build imlib2 vhook module -# -%define _snap 2008-01-31 -%define snap %(echo %{_snap} | tr -d -) -%define _rel 0.1 -Summary: Realtime audio/video encoder and streaming server -Summary(pl.UTF-8): Koder audio/wideo czasu rzeczywistego oraz serwer strumieni +%bcond_without frei0r # build without frei0r video filtering +%bcond_without openal # build without OpenAL 1.1 capture support +%bcond_without opencv # build without opencv video filtering +%bcond_without pulseaudio # build without PulseAudio input support +%bcond_without x264 # build without x264 encoder +%bcond_without utvideo # build without Ut Video decoder +%bcond_without va # VAAPI (Video Acceleration API) +%bcond_without vpx # VP8, a high-quality video codec +%bcond_without doc # don't build docs + +Summary: FFmpeg - a very fast video and audio converter +Summary(pl.UTF-8): FFmpeg - szybki konwerter audio/wideo Name: ffmpeg -Version: 0.4.9 -Release: 4.%{snap}.%{_rel} +Version: 0.9 +Release: 2 # LGPL or GPL, chosen at configure time (GPL version is more featured) -# (postprocessing, a52, xvid, x264, faad) -License: GPL v2+ with LGPL v2.1+ parts +# (postprocessing, some filters, x264, xavs, xvid, x11grab) +# using v3 allows Apache-licensed libs (opencore-amr, libvo-*enc) +License: GPL v3+ with LGPL v3+ parts Group: Applications/Multimedia -#Source0: http://dl.sourceforge.net/ffmpeg/%{name}-%{version}-pre1.tar.gz -Source0: http://ffmpeg.mplayerhq.hu/%{name}-export-snapshot.tar.bz2 -# Source0-md5: 6c8b32545838a4090348b93d5195bd08 +Source0: http://ffmpeg.org/releases/%{name}-%{version}.tar.bz2 +# Source0-md5: 795058de6fc432aa11271408273a0535 Source1: ffserver.init Source2: ffserver.sysconfig Source3: ffserver.conf -Patch0: %{name}-gcc4.patch -Patch1: %{name}-img_convert_symbol.patch -#Patch2: %{name}-a52bin.patch -Patch3: %{name}-pkgconfig-lib64.patch -URL: http://ffmpeg.mplayerhq.hu/ +Patch0: %{name}-bug-803.patch +Patch1: %{name}-gsm.patch +URL: http://www.ffmpeg.org/ +%{?with_openal:BuildRequires: OpenAL-devel} BuildRequires: SDL-devel -BuildRequires: a52dec-libs-devel -%if %{with amr} -BuildRequires: amrnb-devel >= 6.1.0.4 -BuildRequires: amrwb-devel >= 7.0.0.1 -%endif -BuildRequires: faac-devel -BuildRequires: faad2-devel +BuildRequires: alsa-lib-devel +BuildRequires: bzip2-devel +BuildRequires: celt-devel >= 0.11.0 +BuildRequires: dirac-devel >= 1.0.0 +%{?with_nonfree:BuildRequires: faac-devel} BuildRequires: freetype-devel +%{?with_frei0r:BuildRequires: frei0r-devel} %ifarch ppc # require version with altivec support fixed BuildRequires: gcc >= 5:3.3.2-3 %endif -%{?with_imlib2:BuildRequires: imlib2-devel >= 1.3.0} -BuildRequires: lame-libs-devel +BuildRequires: gnutls-devel +BuildRequires: jack-audio-connection-kit-devel +BuildRequires: lame-libs-devel >= 3.98.3 +%{?with_aacplus:BuildRequires: libaacplus-devel >= 2.0.0} +BuildRequires: libass-devel +BuildRequires: libcdio-devel +BuildRequires: libdc1394-devel BuildRequires: libgsm-devel -BuildRequires: libraw1394-devel -BuildRequires: libtheora-devel >= 1.0-0.alpha7 +BuildRequires: libmodplug-devel +BuildRequires: libnut-devel +BuildRequires: libraw1394-devel >= 2 +BuildRequires: librtmp-devel +BuildRequires: libtheora-devel >= 1.0-0.beta3 BuildRequires: libtool >= 2:1.4d-3 +BuildRequires: libv4l-devel +%{?with_va:BuildRequires: libva-devel >= 1.0.3} +BuildRequires: libvdpau-devel BuildRequires: libvorbis-devel -BuildRequires: libx264-devel >= 0.1.2-1.20061024_2245.1 +%{?with_vpx:BuildRequires: libvpx-devel >= 0.9.6} +# X264_BUILD >= 118 +%{?with_x264:BuildRequires: libx264-devel >= 0.1.3-1.20111212_2245} +BuildRequires: opencore-amr-devel +%{?with_opencv:BuildRequires: opencv-devel} +BuildRequires: openjpeg-devel >= 1.3-2 +%{?with_pulseaudio:BuildRequires: pulseaudio-devel} +BuildRequires: speex-devel >= 1:1.2-rc1 %ifarch %{ix86} %ifnarch i386 i486 BuildRequires: nasm %endif %endif +BuildRequires: perl-Encode BuildRequires: perl-tools-pod -BuildRequires: rpmbuild(macros) >= 1.268 -BuildRequires: tetex -BuildRequires: texinfo -%{?with_amr:BuildRequires: unzip} +BuildRequires: pkgconfig +BuildRequires: rpmbuild(macros) >= 1.470 +BuildRequires: schroedinger-devel +%{?with_doc:BuildRequires: tetex} +%{?with_doc:BuildRequires: texi2html} +%{?with_doc:BuildRequires: texinfo} +%{?with_utvideo:BuildRequires: utvideo-devel} +BuildRequires: vo-aacenc-devel +BuildRequires: vo-amrwbenc-devel +BuildRequires: xavs-devel +BuildRequires: xorg-lib-libXext-devel +BuildRequires: xorg-lib-libXfixes-devel BuildRequires: xvid-devel >= 1:1.1.0 BuildRequires: zlib-devel %{?with_autoreqdep:BuildConflicts: libpostproc} @@ -77,21 +115,20 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) # -mmmx is needed to enable code. %define specflags_i586 -mmmx %define specflags_i686 -mmmx +%define specflags_ppc -fPIC %description -ffmpeg is a hyper fast realtime audio/video encoder and streaming -server. It can grab from a standard Video4Linux video source and -convert it into several file formats based on DCT/motion compensation -encoding. Sound is compressed in MPEG audio layer 2 or using an AC3 -compatible stream. +FFmpeg is a complete solution to record, convert and stream audio and +video. It is a command line tool to convert one video file format to +another. It also supports grabbing and encoding in real time from a TV +card. %description -l pl.UTF-8 -ffmpeg jest bardzo szybkim koderem audio/wideo w czasie rzeczywistym -oraz serwerem strumieni multimedialnych. ffmpeg potrafi zrzucać dane -ze standardowego urządzenia Video4Linux i przekonwertować je w kilka -formatów plików bazujących na kodowaniu DCT/kompensacji ruchu. Dźwięk -jest kompresowany do strumienia MPEG audio layer 2 lub używając -strumienia kompatybilnego z AC3. +FFmpeg to kompletne rozwiązanie nagrywania, konwersji i transmisji +strumieni dźwięku i obrazu. Jest to działające z linii poleceń +narzędzie do konwersji obrazu z jednego formatu do innego. Obsługuje +także przechwytywanie i kodowanie w czasie rzeczywistym z karty +telewizyjnej. %package libs Summary: ffmpeg libraries @@ -99,28 +136,54 @@ Summary(pl.UTF-8): Biblioteki ffmpeg Group: Libraries %description libs -This package contains ffmpeg shared libraries. +This package contains the ffmpeg shared libraries: +- the codec library (libavcodec). It supports most existing encoding + formats (MPEG, DivX, MPEG4, AC3, DV...), +- demuxer library (libavformat). It supports most existing file + formats (AVI, MPEG, OGG, Matroska, ASF...), +- video postprocessing library (libpostproc). %description libs -l pl.UTF-8 -Ten pakiet zawiera biblioteki współdzielone ffmpeg. +Ten pakiet zawiera biblioteki współdzielone ffmpeg: +- bibliotekę kodeków (libavcodec); obsługuje większość istniejących + formatów kodowania (MPEG, DivX, MPEG4, AC3, DV...), +- bibliotekę demuksera (libavformat); obsługuje większość istniejących + formatów plików (AVI, MPEG, OGG, Matroska, ASF...), +- bibliotekę postprocessingu (libpostproc). %package devel Summary: ffmpeg header files Summary(pl.UTF-8): Pliki nagłówkowe ffmpeg Group: Development/Libraries Requires: %{name}-libs = %{version}-%{release} -# for libavcodec: -%if %{with amr} -Requires: amrnb-devel -Requires: amrwb-devel >= 5.3.0 -%endif -Requires: faac-devel -Requires: faad2-devel -Requires: lame-libs-devel +# Libs.private from *.pc (unreasonably they are all the same) +Requires: SDL-devel +Requires: alsa-lib-devel +Requires: bzip2-devel +Requires: celt-devel +Requires: dirac-devel >= 1.0.0 +%{?with_nonfree:Requires: faac-devel} +Requires: jack-audio-connection-kit-devel +Requires: lame-libs-devel >= 3.98.3 +Requires: libdc1394-devel Requires: libgsm-devel -Requires: libtheora-devel >= 1.0-0.alpha7 +Requires: libnut-devel +Requires: libraw1394-devel >= 2 +Requires: librtmp-devel +Requires: libtheora-devel >= 1.0-0.beta3 +%{?with_va:Requires: libva-devel >= 1.0.3} Requires: libvorbis-devel -Requires: libx264-devel >= 0.1.2-1.20060828_2245.1 +%{?with_vpx:Requires: libvpx-devel >= 0.9.6} +%{?with_x264:Requires: libx264-devel >= 0.1.3-1.20110625_2245} +Requires: opencore-amr-devel +Requires: openjpeg-devel >= 1.3-2 +Requires: schroedinger-devel +Requires: speex-devel >= 1:1.2-rc1 +Requires: vo-aacenc-devel +Requires: vo-amrwbenc-devel +Requires: xavs-devel +Requires: xorg-lib-libXext-devel +Requires: xorg-lib-libXfixes-devel Requires: xvid-devel >= 1:1.1.0 Requires: zlib-devel Obsoletes: libpostproc-devel @@ -159,24 +222,6 @@ FFplay to bardzo prosty i przenośny odtwarzacz mediów używający bibliotek FFmpeg oraz biblioteki SDL. Jest używany głównie do testowania różnych API FFmpeg. -%package vhook-imlib2 -Summary: imlib2 based hook -Summary(pl.UTF-8): Moduł przejściowy oparty o imlib2 -Group: Libraries -Requires: %{name}-libs = %{version}-%{release} - -%description vhook-imlib2 -This module implements a text overlay for a video image. Currently it -supports a fixed overlay or reading the text from a file. The string -is passed through strftime so that it is easy to imprint the date and -time onto the image. - -%description vhook-imlib2 -l pl.UTF-8 -Ten moduł implementuje tekstową nakładkę dla obrazu. Aktualnie -obsługuje stałą nakładkę lub wczytywanie tekstu z pliku. Łańcuch jest -przepuszczany przez strftime, więc łatwo umieścić datę i czas na -obrazie. - %package ffserver Summary: FFserver video server Summary(pl.UTF-8): FFserver - serwer strumieni obrazu @@ -199,13 +244,62 @@ przeszłości dla każdego źródła na żywo, pod warunkiem odpowiednio dużej przestrzeni na dane skonfigurowanej w ffserver.conf). %prep -%setup -q -n %{name}-export-%{_snap} +%setup -q %patch0 -p1 -%patch1 -p1 -#%patch2 -p1 -%ifarch %{x8664} -%patch3 -p0 -%endif +%patch1 -p0 + +# package the grep result for mplayer, the result formatted as ./mplayer/configure +cat < ffmpeg-avconfig +#! /bin/sh +_libavdecoders_all="`sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`" +_libavencoders_all="`sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`" +_libavparsers_all="`sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`" +_libavbsfs_all="`sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`" +_libavdemuxers_all="`sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`" +_libavmuxers_all="`sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`" +_libavprotocols_all="`sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' libavformat/allformats.c | tr '[a-z]' '[A-Z]'`" +EOF +cat <<'EOF' >> ffmpeg-avconfig + +case "$1" in +--decoders) + echo $_libavdecoders_all + ;; +--encoders) + echo $_libavencoders_all + ;; +--parsers) + echo $_libavparsers_all + ;; +--bsfs) + echo $_libavbsfs_all + ;; +--demuxers) + echo $_libavdemuxers_all + ;; +--muxers) + echo $_libavmuxers_all + ;; +--protocols) + echo $_libavprotocols_all + ;; +*) + cat <