aboutsummaryrefslogtreecommitdiffstats
path: root/main/ffmpeg2.8
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2016-03-29 17:10:30 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2016-03-31 12:48:15 +0000
commit42fcbd5597452189423055d816b0d7844f5886b2 (patch)
tree6018a0d07285341c6c60f0a80b1e9f9192c394ab /main/ffmpeg2.8
parent57e965a9e88bb2e1b4e7b1d4aa51f10a22a8f59d (diff)
downloadaports-42fcbd5597452189423055d816b0d7844f5886b2.tar.bz2
aports-42fcbd5597452189423055d816b0d7844f5886b2.tar.xz
main/ffmpeg2.8: add old version of ffmpeg for vlc
Diffstat (limited to 'main/ffmpeg2.8')
-rw-r--r--main/ffmpeg2.8/APKBUILD94
-rw-r--r--main/ffmpeg2.8/configure-dlvsym.patch28
-rw-r--r--main/ffmpeg2.8/fix-flv-extradata.patch44
3 files changed, 166 insertions, 0 deletions
diff --git a/main/ffmpeg2.8/APKBUILD b/main/ffmpeg2.8/APKBUILD
new file mode 100644
index 0000000000..8907ec99e5
--- /dev/null
+++ b/main/ffmpeg2.8/APKBUILD
@@ -0,0 +1,94 @@
+# Contributor: Ɓukasz Jendrysik <scadu@yandex.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=ffmpeg2.8
+pkgver=2.8.5
+pkgrel=0
+pkgdesc="Complete and free Internet live audio and video broadcasting solution for Linux/Unix"
+url="http://ffmpeg.org/"
+arch="all"
+license="GPL"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
+makedepends="gnutls-dev lame-dev libvorbis-dev xvidcore-dev zlib-dev
+ imlib2-dev x264-dev libtheora-dev coreutils bzip2-dev perl libvpx-dev
+ libvpx-dev sdl-dev libxfixes-dev libva-dev alsa-lib-dev rtmpdump-dev
+ v4l-utils-dev yasm opus-dev x265-dev"
+depends=
+source="http://ffmpeg.org/releases/ffmpeg-$pkgver.tar.bz2
+ configure-dlvsym.patch
+ fix-flv-extradata.patch
+ "
+
+_builddir="$srcdir"/ffmpeg-$pkgver
+prepare() {
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ local _dbg="--disable-debug"
+ local _asm=""
+ [ -n "$DEBUG" ] && _dbg="--enable-debug"
+
+ case "$CARCH" in
+ x86 | arm*) _asm="--disable-asm" ;;
+ esac
+
+ cd "$_builddir"
+ ./configure \
+ --prefix=/usr \
+ --enable-avresample \
+ --enable-avfilter \
+ --enable-gnutls \
+ --enable-gpl \
+ --enable-libmp3lame \
+ --enable-librtmp \
+ --enable-libvorbis \
+ --enable-libvpx \
+ --enable-libxvid \
+ --enable-libx264 \
+ --enable-libx265 \
+ --enable-libtheora \
+ --enable-libv4l2 \
+ --enable-postproc \
+ --enable-pic \
+ --enable-pthreads \
+ --enable-shared \
+ --enable-x11grab \
+ --disable-stripping \
+ --disable-static \
+ --enable-vaapi \
+ --enable-libopus \
+ $_asm $_dbg \
+ || return 1
+ make || return 1
+ ${CC:-gcc} -o tools/qt-faststart $CFLAGS tools/qt-faststart.c || return 1
+ make doc/ffmpeg.1 doc/ffplay.1 doc/ffserver.1 || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install install-man || return 1
+ install -D -m755 tools/qt-faststart "$pkgdir/usr/bin/qt-faststart" || return 1
+# strip --strip-debug "$pkgdir"/usr/lib/*.a || return 1
+}
+
+libs() {
+ pkgdesc="Libraries for ffmpeg"
+ replaces="ffmpeg"
+ mkdir -p "$subpkgdir"/usr
+ mv "$pkgdir"/usr/lib "$subpkgdir"/usr
+}
+
+md5sums="989d9024313c2b7e2eeaed58b751c0ee ffmpeg-2.8.5.tar.bz2
+d041c60890392d80f74a567523f4c54d configure-dlvsym.patch
+5f39e099cd7dfe71bb2f6b6615623d67 fix-flv-extradata.patch"
+sha256sums="3b6d9951533323ee64a21d0aa7667a780b3470bfe4e0fb7c1b33307ce290615a ffmpeg-2.8.5.tar.bz2
+ffd6beadaea4cdbc1326fe396d8cd34b3efb791a865a32f64b3fe998b679c1d0 configure-dlvsym.patch
+8324bd3e154c151e64df36afd1edf05b8dc2dcd8e520208be0355a34b4209ad5 fix-flv-extradata.patch"
+sha512sums="2a46bef5ac99d114be7d3ece561ae71d09b87eaecba5da3c02ff1fe7e5cf4913e1b6feecca405540d1d70f9126591c209055edd7df1ad1d8bbf02f107701929e ffmpeg-2.8.5.tar.bz2
+d9bb652093b1c2d03cead78bcafd59fc8305f36fe5359ac5d7caf038889f1239829e288c07e77a11bbef89de5fe54a5eae50a1c4718ec77137bb677ef9069e54 configure-dlvsym.patch
+d4d369055ef9ec8742f971786b05b89a5748a32cee711f623b71e8aea54b004bebda4e618017a351162647360632b13bcc7f09059938734e692ec841fe769c46 fix-flv-extradata.patch"
diff --git a/main/ffmpeg2.8/configure-dlvsym.patch b/main/ffmpeg2.8/configure-dlvsym.patch
new file mode 100644
index 0000000000..0e74e45b5c
--- /dev/null
+++ b/main/ffmpeg2.8/configure-dlvsym.patch
@@ -0,0 +1,28 @@
+--- ./configure.orig
++++ ./configure
+@@ -1680,6 +1680,7 @@
+ CoTaskMemFree
+ CryptGenRandom
+ dlopen
++ dlvsym
+ fcntl
+ flt_lim
+ fork
+@@ -4997,14 +4998,15 @@
+ -Wl,--wrap,sws_scale ||
+ disable xmm_clobber_test
+
++check_func dlvsym -lld
+ echo "X{};" > $TMPV
+ if test_ldflags -Wl,--version-script,$TMPV; then
+ append SHFLAGS '-Wl,--version-script,\$(SUBDIR)lib\$(NAME).ver'
+- check_cc <<EOF && enable symver_asm_label
++ enabled dlvsym && check_cc <<EOF && enable symver_asm_label
+ void ff_foo(void) __asm__ ("av_foo@VERSION");
+ void ff_foo(void) { ${inline_asm+__asm__($quotes);} }
+ EOF
+- check_cc <<EOF && enable symver_gnu_asm
++ enabled dlvsym && check_cc <<EOF && enable symver_gnu_asm
+ __asm__(".symver ff_foo,av_foo@VERSION");
+ void ff_foo(void) {}
+ EOF
diff --git a/main/ffmpeg2.8/fix-flv-extradata.patch b/main/ffmpeg2.8/fix-flv-extradata.patch
new file mode 100644
index 0000000000..2fe5b08bcc
--- /dev/null
+++ b/main/ffmpeg2.8/fix-flv-extradata.patch
@@ -0,0 +1,44 @@
+https://trac.ffmpeg.org/ticket/3175
+
+This patch is slightly cleaned up version of:
+http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2014-May/157791.html
+
+diff -ru ffmpeg-2.3.4.orig/libavformat/flvenc.c ffmpeg-2.3.4/libavformat/flvenc.c
+--- ffmpeg-2.3.4.orig/libavformat/flvenc.c 2014-10-03 04:49:20.000000000 -0300
++++ ffmpeg-2.3.4/libavformat/flvenc.c 2014-12-04 11:37:23.286586875 -0200
+@@ -414,11 +414,35 @@
+ if (enc->codec_id == AV_CODEC_ID_AAC) {
+ avio_w8(pb, get_audio_flags(s, enc));
+ avio_w8(pb, 0); // AAC sequence header
++ if (enc->extradata_size < 2) {
++ static const int mpeg4audio_sample_rates[16] = {
++ 96000, 88200, 64000, 48000, 44100, 32000,
++ 24000, 22050, 16000, 12000, 11025, 8000, 7350
++ };
++ int sample_rate_index;
++
++ av_log(s, AV_LOG_WARNING, "AAC extradata empty!.\n");
++ for (sample_rate_index = 0; sample_rate_index < 16; sample_rate_index++)
++ if (enc->sample_rate == mpeg4audio_sample_rates[sample_rate_index])
++ break;
++
++ if (sample_rate_index < 16 && (enc->extradata = av_mallocz(2)) != NULL) {
++ enc->extradata_size = 2;
++ enc->extradata[0] = 0x10 | (sample_rate_index>>1);
++ enc->extradata[1] = (sample_rate_index & 0x01)<<7 | enc->channels <<3;
++ }
++ }
++ if (enc->extradata_size >= 2)
++ av_log(s, AV_LOG_DEBUG, "AAC extradata size %d: %02x:%02x.\n", enc->extradata_size, enc->extradata[0], enc->extradata[1]);
+ avio_write(pb, enc->extradata, enc->extradata_size);
+ } else {
+ avio_w8(pb, enc->codec_tag | FLV_FRAME_KEY); // flags
+ avio_w8(pb, 0); // AVC sequence header
+ avio_wb24(pb, 0); // composition time
++ if(enc->extradata_size>=2)
++ av_log(s, AV_LOG_DEBUG, "Video extradata size %d: %02x:%02x.\n", enc->extradata_size, enc->extradata[0], enc->extradata[1]);
++ else
++ av_log(s, AV_LOG_WARNING, "Video extradata empty!.\n");
+ ff_isom_write_avcc(pb, enc->extradata, enc->extradata_size);
+ }
+ data_size = avio_tell(pb) - pos;