+++ /dev/null
---- ffmpeg-0.5.2/libavcodec/libfaad.c~ 2009-02-22 15:48:55.000000000 +0200
-+++ ffmpeg-0.5.2/libavcodec/libfaad.c 2010-09-09 21:07:55.741372311 +0300
-@@ -43,7 +43,7 @@
-
- #if CONFIG_LIBFAADBIN
- #include <dlfcn.h>
--static const char* const libfaadname = "libfaad.so";
-+static const char* const libfaadname = "libfaad.so.0";
- #else
- #define dlopen(a)
- #define dlclose(a)
+++ /dev/null
-diff --git ffpresets/libvpx-1080p.ffpreset ffpresets/libvpx-1080p.ffpreset
-new file mode 100644
-index 0000000..71d7a73
---- /dev/null
-+++ ffpresets/libvpx-1080p.ffpreset
-@@ -0,0 +1,13 @@
-+vcodec=libvpx
-+g=120
-+rc_lookahead=16
-+level=216
-+profile=1
-+qmax=42
-+qmin=10
-+token_partitions=4
-+vb=2M
-+
-+#ignored unless using -pass 2
-+maxrate=24M
-+minrate=100k
-diff --git ffpresets/libvpx-1080p50_60.ffpreset ffpresets/libvpx-1080p50_60.ffpreset
-new file mode 100644
-index 0000000..1b447ca
---- /dev/null
-+++ ffpresets/libvpx-1080p50_60.ffpreset
-@@ -0,0 +1,13 @@
-+vcodec=libvpx
-+g=120
-+rc_lookahead=25
-+level=216
-+profile=1
-+qmax=42
-+qmin=10
-+token_partitions=4
-+vb=2M
-+
-+#ignored unless using -pass 2
-+maxrate=24M
-+minrate=100k
-diff --git ffpresets/libvpx-360p.ffpreset ffpresets/libvpx-360p.ffpreset
-new file mode 100644
-index 0000000..dea0468
---- /dev/null
-+++ ffpresets/libvpx-360p.ffpreset
-@@ -0,0 +1,12 @@
-+vcodec=libvpx
-+g=120
-+rc_lookahead=16
-+level=216
-+profile=0
-+qmax=51
-+qmin=1
-+vb=768k
-+
-+#ignored unless using -pass 2
-+maxrate=1.5M
-+minrate=40k
-diff --git ffpresets/libvpx-720p.ffpreset ffpresets/libvpx-720p.ffpreset
-new file mode 100644
-index 0000000..adc9c3a
---- /dev/null
-+++ ffpresets/libvpx-720p.ffpreset
-@@ -0,0 +1,13 @@
-+vcodec=libvpx
-+g=120
-+rc_lookahead=16
-+level=216
-+profile=0
-+qmax=42
-+qmin=10
-+token_partitions=4
-+vb=2M
-+
-+#ignored unless using -pass 2
-+maxrate=24M
-+minrate=100k
-diff --git ffpresets/libvpx-720p50_60.ffpreset ffpresets/libvpx-720p50_60.ffpreset
-new file mode 100644
-index 0000000..e9b361e
---- /dev/null
-+++ ffpresets/libvpx-720p50_60.ffpreset
-@@ -0,0 +1,13 @@
-+vcodec=libvpx
-+g=120
-+rc_lookahead=25
-+level=216
-+profile=0
-+qmax=42
-+qmin=10
-+token_partitions=4
-+vb=2M
-+
-+#ignored unless using -pass 2
-+maxrate=24M
-+minrate=100k
-diff --git libavcodec/avcodec.h libavcodec/avcodec.h
-index 974e87c..3afd41b 100644
---- libavcodec/avcodec.h
-+++ libavcodec/avcodec.h
-@@ -30,7 +30,7 @@
- #include "libavutil/avutil.h"
-
- #define LIBAVCODEC_VERSION_MAJOR 52
--#define LIBAVCODEC_VERSION_MINOR 72
-+#define LIBAVCODEC_VERSION_MINOR 73
- #define LIBAVCODEC_VERSION_MICRO 2
-
- #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
-@@ -598,6 +598,7 @@ typedef struct RcOverride{
- #define CODEC_FLAG2_MBTREE 0x00040000 ///< Use macroblock tree ratecontrol (x264 only)
- #define CODEC_FLAG2_PSY 0x00080000 ///< Use psycho visual optimizations.
- #define CODEC_FLAG2_SSIM 0x00100000 ///< Compute SSIM during encoding, error[] values are undefined.
-+#define CODEC_FLAG2_ALT_REF 0x00400000 ///< Allow encoder to insert alternate reference frames (VP8 only)
-
- /* Unsupported options :
- * Syntax Arithmetic coding (SAC)
-@@ -2652,6 +2653,18 @@ typedef struct AVCodecContext {
- * - decoding: unused
- */
- int rc_lookahead;
-+
-+ /**
-+ * Number of token partitions.
-+ * Indicates number of sub-streams in the bitstream. Used for parallelized
-+ * decoding.
-+ * Valid values are 1, 2, 4 & 8
-+ * - encoding: Set by user.
-+ * - decoding: unused
-+ *
-+ * \attention VP8 specific
-+ */
-+ int token_partitions;
- } AVCodecContext;
-
- /**
-diff --git libavcodec/libvpxenc.c libavcodec/libvpxenc.c
-index fa393b8..3801800 100644
---- libavcodec/libvpxenc.c
-+++ libavcodec/libvpxenc.c
-@@ -36,13 +36,13 @@
- * One encoded frame returned from the library.
- */
- struct FrameListData {
-- void *buf; /**≤ compressed data buffer */
-- size_t sz; /**≤ length of compressed data */
-- int64_t pts; /**≤ time stamp to show frame
-+ void *buf; /**< compressed data buffer */
-+ size_t sz; /**< length of compressed data */
-+ int64_t pts; /**< time stamp to show frame
- (in timebase units) */
-- unsigned long duration; /**≤ duration to show frame
-+ unsigned long duration; /**< duration to show frame
- (in timebase units) */
-- uint32_t flags; /**≤ flags for this frame */
-+ uint32_t flags; /**< flags for this frame */
- struct FrameListData *next;
- };
-
-@@ -218,11 +218,21 @@ static av_cold int vp8_init(AVCodecContext *avctx)
- }
- dump_enc_cfg(avctx, &enccfg);
-
-+ /* With altref set an additional frame at the same pts may be produced.
-+ Increasing the time_base gives the library a window to place these frames
-+ ensuring strictly increasing timestamps. */
-+ if (avctx->flags2 & CODEC_FLAG2_ALT_REF) {
-+ avctx->ticks_per_frame = 2;
-+ avctx->time_base = av_mul_q(avctx->time_base,
-+ (AVRational){1, avctx->ticks_per_frame});
-+ }
-+
- enccfg.g_w = avctx->width;
- enccfg.g_h = avctx->height;
- enccfg.g_timebase.num = avctx->time_base.num;
- enccfg.g_timebase.den = avctx->time_base.den;
- enccfg.g_threads = avctx->thread_count;
-+ enccfg.g_lag_in_frames= FFMIN(avctx->rc_lookahead, 25); //0-25, avoids init failure
-
- if (avctx->flags & CODEC_FLAG_PASS1)
- enccfg.g_pass = VPX_RC_FIRST_PASS;
-@@ -277,7 +287,29 @@ static av_cold int vp8_init(AVCodecContext *avctx)
- enccfg.rc_twopass_stats_in = ctx->twopass_stats;
- }
-
-- ctx->deadline = VPX_DL_GOOD_QUALITY;
-+ /* 0-3: For non-zero values the encoder increasingly optimizes for reduced
-+ complexity playback on low powered devices at the expense of encode
-+ quality. */
-+ if (avctx->profile != FF_PROFILE_UNKNOWN)
-+ enccfg.g_profile = avctx->profile;
-+ switch (FFABS(avctx->level) / 100) {
-+ case 1:
-+ ctx->deadline = VPX_DL_BEST_QUALITY;
-+ break;
-+ case 2:
-+ default:
-+ ctx->deadline = VPX_DL_GOOD_QUALITY;
-+ break;
-+ case 3:
-+ ctx->deadline = VPX_DL_REALTIME;
-+ break;
-+ }
-+ av_log(avctx, AV_LOG_DEBUG, "Using deadline: %lu\n", ctx->deadline);
-+
-+ if (avctx->level != FF_LEVEL_UNKNOWN) {
-+ enccfg.g_error_resilient = avctx->level < 0;
-+ cpuused = FFABS(avctx->level) % 100 - 16; //[-16,16]
-+ }
-
- dump_enc_cfg(avctx, &enccfg);
- /* Construct Encoder Context */
-@@ -291,6 +323,8 @@ static av_cold int vp8_init(AVCodecContext *avctx)
- av_log(avctx, AV_LOG_DEBUG, "vpx_codec_control\n");
- codecctl_int(avctx, VP8E_SET_CPUUSED, cpuused);
- codecctl_int(avctx, VP8E_SET_NOISE_SENSITIVITY, avctx->noise_reduction);
-+ codecctl_int(avctx, VP8E_SET_ENABLEAUTOALTREF, !!(avctx->flags2 & CODEC_FLAG2_ALT_REF));
-+ codecctl_int(avctx, VP8E_SET_TOKEN_PARTITIONS, av_log2(avctx->token_partitions));
-
- //provide dummy value to initialize wrapper, values will be updated each _encode()
- vpx_img_wrap(&ctx->rawimg, VPX_IMG_FMT_I420, avctx->width, avctx->height, 1,
-diff --git libavcodec/options.c libavcodec/options.c
-index 6835352..d619dcf 100644
---- libavcodec/options.c
-+++ libavcodec/options.c
-@@ -411,6 +411,8 @@ static const AVOption options[]={
- {"aq_strength", "specify aq strength", OFFSET(aq_strength), FF_OPT_TYPE_FLOAT, 1.0, 0, FLT_MAX, V|E},
- {"rc_lookahead", "specify number of frames to look ahead for frametype", OFFSET(rc_lookahead), FF_OPT_TYPE_INT, 40, 0, INT_MAX, V|E},
- {"ssim", "ssim will be calculated during encoding", 0, FF_OPT_TYPE_CONST, CODEC_FLAG2_SSIM, INT_MIN, INT_MAX, V|E, "flags2"},
-+{"altref", "enable use of alternate reference frames (VP8/2-pass only)", 0, FF_OPT_TYPE_CONST, CODEC_FLAG2_ALT_REF, INT_MIN, INT_MAX, V|E, "flags2"},
-+{"token_partitions", "Number of sub-streams in bitstream (1,2,4,8). Used for parallelized decoding.", OFFSET(token_partitions), FF_OPT_TYPE_INT, 1, 1, INT_MAX, V|E},
- {NULL},
- };
-
---- ffmpeg-20080908/libavcodec/libmp3lame.c.orig 2008-08-09 21:37:36.000000000 +0400
-+++ ffmpeg-20080908/libavcodec/libmp3lame.c 2009-02-03 11:22:37.000000000 +0300
-@@ -34,6 +34,7 @@
+--- ffmpeg-0.8/libavcodec/libmp3lame.c.orig 2011-06-21 21:29:25.000000000 +0200
++++ ffmpeg-0.8/libavcodec/libmp3lame.c 2011-06-26 17:35:11.772209142 +0200
+@@ -35,6 +35,7 @@
int stereo;
uint8_t buffer[BUFFER_SIZE];
int buffer_index;
+ int flushed;
- } Mp3AudioContext;
+ struct {
+ int *left;
+ int *right;
+@@ -169,11 +170,16 @@
+ /* lame 3.91 dies on '1-channel interleaved' data */
- static av_cold int MP3lame_encode_init(AVCodecContext *avctx)
-@@ -166,12 +167,18 @@
+ if(!data){
++ if(s->flushed)
++ lame_result = 0;
++ else {
++ s->flushed = 1;
+ lame_result= lame_encode_flush(
+ s->gfp,
+ s->buffer + s->buffer_index,
+ BUFFER_SIZE - s->buffer_index
+ );
++ }
+ #if 2147483647 == INT_MAX
+ }else if(AV_SAMPLE_FMT_S32 == avctx->sample_fmt){
+ if (s->stereo) {
+@@ -205,6 +211,7 @@
BUFFER_SIZE - s->buffer_index
);
}
-+ s->flushed = 0;
++ s->flushed = 0;
+ #endif
}else{
-+ if (s->flushed)
-+ lame_result = 0;
-+ else {
-+ s->flushed = 1;
- lame_result= lame_encode_flush(
- s->gfp,
- s->buffer + s->buffer_index,
+ if (s->stereo) {
+@@ -225,6 +232,7 @@
BUFFER_SIZE - s->buffer_index
);
-+ }
+ }
++ s->flushed = 0;
}
- if(lame_result==-1) {
+ if(lame_result < 0){
---- configure~ 2010-06-15 21:44:30.000000000 +0200
-+++ configure 2010-06-18 07:51:49.083904825 +0200
-@@ -2611,7 +2611,7 @@
- require libdirac libdirac_encoder/dirac_encoder.h dirac_encoder_init $(pkg-config --libs dirac)
+--- configure.orig 2011-06-21 21:29:25.000000000 +0200
++++ configure 2011-06-26 20:07:17.579181375 +0200
+@@ -2920,7 +2920,7 @@
+ "dirac_decoder_init dirac_encoder_init"
enabled libfaac && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac
- enabled libfaad && require2 libfaad faad.h faacDecOpen -lfaad
+ enabled libfreetype && require_pkg_config freetype2 "ft2build.h freetype/freetype.h" FT_Init_FreeType
-enabled libgsm && require libgsm gsm/gsm.h gsm_create -lgsm
+enabled libgsm && require libgsm gsm.h gsm_create -lgsm
- enabled libmp3lame && require libmp3lame lame/lame.h lame_init -lmp3lame -lm
+ enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame
enabled libnut && require libnut libnut.h nut_demuxer_init -lnut
- enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb -lm
+ enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb
--- libavcodec/libgsm.c~ 2010-04-20 16:45:34.000000000 +0200
+++ libavcodec/libgsm.c 2010-06-18 08:05:19.692574999 +0200
@@ -28,7 +28,7 @@
# TODO
+# - is bug803 patch still needed? the code changed somehow
# - libnut enabled no (http://www.nut-container.org/)
+# - frei0r (frei0r.h)?
+# - libvo_aacenc, libvo_amrwbenc?
+# - libxavs?
#
# Conditional build:
%bcond_with nonfree # non free options of package
%bcond_without vpx # VP8, a high-quality video codec
%bcond_without doc # don't build docs
-Summary: FFmpeg is a very fast video and audio converter
-Summary(pl.UTF-8): Koder audio/wideo czasu rzeczywistego oraz serwer strumieni
+Summary: FFmpeg - a very fast video and audio converter
+Summary(pl.UTF-8): FFmpeg - szybki konwerter audio/wideo
Name: ffmpeg
-Version: 0.6.3
+Version: 0.8
Release: 1
# LGPL or GPL, chosen at configure time (GPL version is more featured)
-# (postprocessing, ac3, xvid, x264, faad)
+# (postprocessing, ac3, xvid, x264)
License: GPL v3+ with LGPL v3+ parts
Group: Applications/Multimedia
Source0: http://ffmpeg.org/releases/%{name}-%{version}.tar.bz2
-# Source0-md5: cdf4ad9b2a4d195b5ca874494bc7b0b0
+# Source0-md5: 7e9b8c8a6952de0c477027e48249f3ed
Source1: ffserver.init
Source2: ffserver.sysconfig
Source3: ffserver.conf
Patch0: %{name}-bug-803.patch
Patch1: %{name}-gsm.patch
-Patch2: faadbin-libfaadname.patch
-# vhook is gone. this patch needs different approach
-#PatchX: imagewidth.patch
-# http://webm.googlecode.com/files/ffmpeg-0.6_libvpx-0.9.1.diff.gz
-Patch3: ffmpeg-0.6_libvpx-0.9.1.diff
URL: http://www.ffmpeg.org/
BuildRequires: SDL-devel
+BuildRequires: alsa-lib-devel
+BuildRequires: celt-devel
BuildRequires: dirac-devel >= 1.0.0
BuildRequires: faac-devel
-BuildRequires: faad2-devel
BuildRequires: freetype-devel
%ifarch ppc
# require version with altivec support fixed
BuildRequires: gcc >= 5:3.3.2-3
%endif
-BuildRequires: lame-libs-devel
+BuildRequires: jack-audio-connection-kit-devel
+BuildRequires: lame-libs-devel >= 3.98.3
BuildRequires: libdc1394-devel
BuildRequires: libgsm-devel
BuildRequires: libraw1394-devel
+BuildRequires: librtmp-devel
BuildRequires: libtheora-devel >= 1.0-0.beta3
BuildRequires: libtool >= 2:1.4d-3
%{?with_va:BuildRequires: libva-devel >= 1.0.3}
BuildRequires: libvorbis-devel
%{?with_vpx:BuildRequires: libvpx-devel >= 0.9.1}
# X264_BUILD >= 83
-BuildRequires: libx264-devel >= 0.1.3-1.20100424_2245.1
+BuildRequires: libx264-devel >= 0.1.3-1.20110625_2245
BuildRequires: opencore-amr-devel
BuildRequires: openjpeg-devel >= 1.3-2
BuildRequires: speex-devel >= 1:1.2-rc1
%{?with_doc:BuildRequires: tetex}
%{?with_doc:BuildRequires: texi2html}
%{?with_doc:BuildRequires: texinfo}
+BuildRequires: xorg-lib-libXext-devel
+BuildRequires: xorg-lib-libXfixes-devel
BuildRequires: xvid-devel >= 1:1.1.0
BuildRequires: zlib-devel
%{?with_autoreqdep:BuildConflicts: libpostproc}
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
Summary(pl.UTF-8): Biblioteki ffmpeg
Group: Libraries
-Suggests: faad2-libs
%description libs
-This package contains:
-- the codec library from the ffmpeg project. It supports most existing
- encoding formats (MPEG, DivX, MPEG4, AC3, DV...),
-- demuxer library from the ffmpeg project. It supports most existing
- file formats (AVI, MPEG, OGG, Matroska, ASF...),
-- video postprocessing library from the ffmpeg project.
+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
# for libavcodec:
Requires: dirac-devel
Requires: faac-devel
-Requires: faad2-devel
Requires: lame-libs-devel
Requires: libgsm-devel
Requires: libraw1394-devel
%setup -q
%patch0 -p1
%patch1 -p0
-%patch2 -p1
-%patch3 -p0
# package the grep result for mplayer, the result formatted as ./mplayer/configure
cat <<EOF > ffmpeg-avconfig
--enable-gpl \
--enable-version3 \
--enable-libdc1394 \
+ --enable-libcelt \
--enable-libdirac \
- --enable-libfaad \
- --enable-libfaadbin \
--enable-libgsm \
--enable-libmp3lame \
+ --enable-libopencore-amrnb \
+ --enable-libopencore-amrwb \
+ --enable-libopenjpeg \
+ --enable-librtmp \
--enable-libschroedinger \
--enable-libspeex \
--enable-libtheora \
%{?with_vpx:--enable-libvpx} \
--enable-libx264 \
--enable-libxvid \
- --enable-libopencore-amrnb \
- --enable-libopencore-amrwb \
- --enable-libopenjpeg \
--enable-postproc \
--enable-pthreads \
--enable-shared \
%endif
--enable-runtime-cpudetect
+# --enable-libopencv would cause dependency loop
+
# force oldscaler build
%{__sed} -i -e 's|#define.*CONFIG_OLDSCALER.*0|#define CONFIG_OLDSCALER 1|g' config.h
%files
%defattr(644,root,root,755)
-%doc Changelog LICENSE README %{?with_doc:doc/*.html} doc/TODO
+%doc CREDITS LICENSE MAINTAINERS README doc/{APIchanges,RELEASE_NOTES,TODO} %{?with_doc:doc/*.html}
%attr(755,root,root) %{_bindir}/ffmpeg
%attr(755,root,root) %{_bindir}/ffprobe
%attr(755,root,root) %{_bindir}/qt-faststart
%files libs
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libavcodec.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libavcodec.so.52
+%attr(755,root,root) %ghost %{_libdir}/libavcodec.so.53
%attr(755,root,root) %{_libdir}/libavdevice.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libavdevice.so.52
+%attr(755,root,root) %ghost %{_libdir}/libavdevice.so.53
%attr(755,root,root) %{_libdir}/libavfilter.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libavfilter.so.1
+%attr(755,root,root) %ghost %{_libdir}/libavfilter.so.2
%attr(755,root,root) %{_libdir}/libavformat.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libavformat.so.52
+%attr(755,root,root) %ghost %{_libdir}/libavformat.so.53
%attr(755,root,root) %{_libdir}/libavutil.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libavutil.so.50
+%attr(755,root,root) %ghost %{_libdir}/libavutil.so.51
%attr(755,root,root) %{_libdir}/libpostproc.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libpostproc.so.51
%attr(755,root,root) %{_libdir}/libswscale.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libswscale.so.0
+%attr(755,root,root) %ghost %{_libdir}/libswscale.so.2
%files devel
%defattr(644,root,root,755)