summaryrefslogtreecommitdiff
path: root/multimedia/ffmpeg
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/ffmpeg')
-rw-r--r--multimedia/ffmpeg/README34
-rw-r--r--multimedia/ffmpeg/ffmpeg.SlackBuild88
-rw-r--r--multimedia/ffmpeg/ffmpeg.info4
3 files changed, 94 insertions, 32 deletions
diff --git a/multimedia/ffmpeg/README b/multimedia/ffmpeg/README
index a2ae03130c..7ad186aaa1 100644
--- a/multimedia/ffmpeg/README
+++ b/multimedia/ffmpeg/README
@@ -2,22 +2,20 @@ FFmpeg is a complete solution to record, convert and stream audio
and video. It includes libavcodec, the leading audio/video codec
library.
-If you want to use the latest subversion source when building your
-ffmpeg package, you will need to get it from their svn server.
-To get the source code, you can use the included "ffmpeg-mksrctarball.sh"
-script, which will to download the source code and create a compressed
-tarball of it using the date (date +"%Y%m%d") as its version string.
+You can enable a lot of optional (not-autodetected) features by
+passing variables to the script (VAR=yes/no ./ffmpeg.SlackBuild):
+AMRNB=yes|no (default: no), requires amrnb (creates non-redistributable binary)
+AMRWB=yes|no (default: no), requires amrwb (creates non-redistributable binary)
+DC1394=yes|no (default: no), requires libdc1394
+DIRAC=yes|no (default: no), requires dirac
+FAAC=yes|no (default: yes), requires faac
+FAAD=yes|no (default: yes), requires faad2
+LAME=yes|no (default: yes), requires lame
+JP2=yes|no (default: no), requires openjpeg
+SCHROEDINGER=yes|no (default: no), requires schroedinger
+SPEEX=yes|no (default: no), requires speex
+VDPAU=yes|no (default: no), requires nvidia-driver and vdpau capable gpu
+X264=yes|no (default: yes), requires x264
+XVID=yes|no (default: no), requires xvidcore
-ffmpeg requires the following, all of which are available at SlackBuilds.org:
- lame, faac, faad2, speex, xvidcore, schroedinger, openjpeg and x264.
-
-If you additionally want support for amrnb and/or amrwb pass AMRNB=yes and/or
-AMRWB=yes to the script. This will create non-redistributable binaries though.
-amrnb and amrwb can also be found on SlackBuilds.org.
-
-Support for the (slower) dirac codec libdirac can be enabled by passing DIRAC=yes
-to the script. The (faster) dirac codec libschroedinger is already enabled by
-default.
-
-Those who have an nvidia graphics card which is capable of hardware video decoding
-can enable VDPAU by passing VDPAU=yes to the script.
+All of the mentioned requirements are available from SlackBuilds.org
diff --git a/multimedia/ffmpeg/ffmpeg.SlackBuild b/multimedia/ffmpeg/ffmpeg.SlackBuild
index 8c22619ac3..9970c5b7f7 100644
--- a/multimedia/ffmpeg/ffmpeg.SlackBuild
+++ b/multimedia/ffmpeg/ffmpeg.SlackBuild
@@ -19,12 +19,17 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
+# Configure ffmpeg features not autodetected by default
+
if [ "${AMRNB:-no}" = "no" ]; then
amr_nb=""
else
@@ -39,55 +44,112 @@ else
amr_wb="--enable-libamr-wb"
fi
+if [ "${DC1394:-no}" = "no" ]; then
+ libdc1394=""
+else
+ libdc1394="--enable-libdc1394"
+fi
+
if [ "${DIRAC:-no}" = "no" ]; then
dirac_slow=""
else
dirac_slow="--enable-libdirac"
fi
+if [ "${FAAC:-yes}" = "yes" ]; then
+ libfaac="--enable-libfaac"
+else
+ libfaac=""
+fi
+
+if [ "${FAAD:-yes}" = "yes" ]; then
+ libfaad="--enable-libfaad"
+else
+ libfaad=""
+fi
+
+if [ "${LAME:-yes}" = "yes" ]; then
+ mp3lame="--enable-libmp3lame"
+else
+ mp3lame=""
+fi
+
+if [ "${JP2:-no}" = "no" ]; then
+ openjpeg=""
+else
+ openjpeg="--enable-libopenjpeg"
+ SLKCFLAGS="$SLKCFLAGS -I/usr/include/openjpeg"
+fi
+
+if [ "${SCHROEDINGER:-no}" = "no" ]; then
+ dirac_fast=""
+else
+ dirac_fast="--enable-libschroedinger"
+fi
+
+if [ "${SPEEX:-no}" = "no" ]; then
+ libspeex=""
+else
+ libspeex="--enable-libspeex"
+fi
+
if [ "${VDPAU:-no}" = "no" ]; then
vdpau_opt="--disable-vdpau"
else
vdpau_opt="--enable-vdpau"
fi
+if [ "${X264:-yes}" = "yes" ]; then
+ libx264="--enable-libx264"
+else
+ libx264=""
+fi
+
+if [ "${XVID:-no}" = "no" ]; then
+ libxvid=""
+else
+ libxvid="--enable-libxvid"
+fi
+
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar -xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-CFLAGS="$SLKCFLAGS -I/usr/include/openjpeg" \
-CXXFLAGS="$SLKCFLAGS -I/usr/include/openjpeg" \
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --shlibdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
--disable-debug \
--enable-shared \
--disable-static \
--enable-pthreads \
--enable-libtheora \
- --enable-libvorbis \
--enable-gpl \
--enable-postproc \
--enable-swscale \
--enable-x11grab \
- --enable-libmp3lame \
- --enable-libfaac \
- --enable-libfaad \
- --enable-libxvid \
- --enable-libx264 \
--enable-avfilter \
--enable-avfilter-lavf \
- --enable-libschroedinger \
- --enable-libspeex \
- --enable-libopenjpeg \
+ $openjpeg \
+ $libdc1394 \
+ $mp3lame \
+ $libfaac \
+ $libfaad \
+ $libxvid \
+ $libx264 \
+ $libspeex \
$dirac_slow \
+ $dirac_fast \
$vdpau_opt \
$non_free \
$amr_nb \
@@ -117,4 +179,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/multimedia/ffmpeg/ffmpeg.info b/multimedia/ffmpeg/ffmpeg.info
index 2156adaf85..85f64f81da 100644
--- a/multimedia/ffmpeg/ffmpeg.info
+++ b/multimedia/ffmpeg/ffmpeg.info
@@ -2,7 +2,9 @@ PRGNAM="ffmpeg"
VERSION="0.5"
HOMEPAGE="http://www.ffmpeg.org"
DOWNLOAD="http://www.ffmpeg.org/releases/ffmpeg-0.5.tar.bz2"
+DOWNLOAD_x86_64=""
MD5SUM="be8503f15c3b81ba00eb8379ca8dcf33"
-MAINTAINER="ppr:kut"
+MD5SUM_x86_64=""
+MAINTAINER="pprkut"
EMAIL="pprkut@liwjatan.at"
APPROVED="rworkman"