Difference between revisions of "FFmpeg"

From CBLFS
Jump to navigationJump to search
Line 12: Line 12:
  
 
----
 
----
 +
 +
== Using a SVN Snapshot ==
 +
 +
If you would rather use a svn snapshot instead of the tarball above grab the source with [[Subversion]] and optionaly create a tarball for use at a later time:
 +
 +
svn co svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
 +
 +
tar cvjf ffmpeg-r$(svnversion ffmpeg).tar.bz2 ffmpeg
 +
 +
''NOTE:'' If you are building with a SVN Snapshot the dependencies may not be the same.
  
 
== Introduction to FFmpeg ==
 
== Introduction to FFmpeg ==
Line 20: Line 30:
  
 
Look at the output of '''./configure --help''' and add the parameters for the optional dependencies you have installed.
 
Look at the output of '''./configure --help''' and add the parameters for the optional dependencies you have installed.
 +
 +
A few options you may want to use:
 +
 +
--enable-pp
 +
--enable-liba52
 +
--enable-libfaac
 +
--enable-libfaad
 +
--enable-libmp3lame
 +
--enable-libogg
 +
--enable-libtheora
 +
--enable-x264
 +
--enable-xvid
 +
--enable-libvorbis
  
 
== Dependencies ==
 
== Dependencies ==
Line 37: Line 60:
  
 
== Non-Multilib ==
 
== Non-Multilib ==
 +
 +
If you are not building a SVN Snapshot apply the following patches:
 +
 +
patch -Np1 -i ../ffmpeg-{{FFmpeg-Version}}-pre1-gcc4-1.patch &&
 +
patch -Np1 -i ../ffmpeg-{{FFmpeg-Version}}-pre1-amr_fixes-1.patch
  
 
Compile the package:
 
Compile the package:
  
patch -Np1 -i ../ffmpeg-{{FFmpeg-Version}}-pre1-gcc4-1.patch &&
+
  ./configure --prefix=/usr --enable-shared \
patch -Np1 -i ../ffmpeg-{{FFmpeg-Version}}-pre1-amr_fixes-1.patch &&
+
    --enable-pthreads --enable-gpl \
sed -i "s/static uint64/const uint64/" \
+
    --disable-ffplay &&
    libavcodec/liba52/resample_mmx.c &&
 
  ./configure --prefix=/usr --enable-shared --enable-pthreads \
 
    --enable-gpl --disable-ffplay &&
 
 
  make
 
  make
  
Line 55: Line 80:
  
 
=== 32Bit ===
 
=== 32Bit ===
 +
 +
If you are not building a SVN Snapshot apply the following patches:
 +
 +
patch -Np1 -i ../ffmpeg-{{FFmpeg-Version}}-pre1-gcc4-1.patch &&
 +
patch -Np1 -i ../ffmpeg-{{FFmpeg-Version}}-pre1-amr_fixes-1.patch
  
 
Compile the package:
 
Compile the package:
  
  patch -Np1 -i ../ffmpeg-{{FFmpeg-Version}}-pre1-gcc4-1.patch &&
+
  export USE_ARCH=32 &&
  patch -Np1 -i ../ffmpeg-{{FFmpeg-Version}}-pre1-amr_fixes-1.patch &&
+
  CFLAGS="${BUILD32} -fPIC" \
CC="gcc ${BUILD32}" USE_ARCH=32 CFLAGS="-fPIC" ./configure --prefix=/usr \
+
./configure --prefix=/usr --cc="gcc ${BUILD32}" \
     --enable-shared  --enable-pthreads --enable-gpl --disable-ffplay &&
+
     --enable-shared  --enable-pthreads \
  make CC="gcc ${BUILD32}"
+
    --enable-gpl --disable-ffplay &&
 +
  make
  
 
Install the package
 
Install the package
  
  make install
+
  make install &&
 +
mv -v /usr/bin/ffmpeg{,-32} &&
 +
unset USE_ARCH
  
 
=== N32 ===
 
=== N32 ===
  
Compile the package:
+
If you are not building a SVN Snapshot apply the following patches and sed:
  
 
  patch -Np1 -i ../ffmpeg-{{FFmpeg-Version}}-pre1-gcc4-1.patch &&
 
  patch -Np1 -i ../ffmpeg-{{FFmpeg-Version}}-pre1-gcc4-1.patch &&
 
  patch -Np1 -i ../ffmpeg-{{FFmpeg-Version}}-pre1-amr_fixes-1.patch &&
 
  patch -Np1 -i ../ffmpeg-{{FFmpeg-Version}}-pre1-amr_fixes-1.patch &&
  sed -i 's:$(prefix)/lib:&32:g' $(grep -lr '$(prefix)/lib' *) &&
+
  sed -i 's:$(prefix)/lib:&32:g' $(grep -lr '$(prefix)/lib' *)
  CC="gcc ${BUILDN32}" USE_ARCH=n32 CFLAGS="-fPIC" ./configure --prefix=/usr \
+
 
     --enable-shared  --enable-pthreads --enable-gpl --disable-ffplay &&
+
Compile the package:
  make CC="gcc ${BUILDN32}"
+
 
 +
export USE_ARCH=n32 &&
 +
  CFLAGS="${BUILDN32} -fPIC" \
 +
./configure --prefix=/usr --cc="gcc ${BUILD32}" \
 +
    --{,sh}libdir=/usr/lib32 \
 +
     --enable-shared  --enable-pthreads \
 +
    --enable-gpl --disable-ffplay &&
 +
  make
  
 
Install the package
 
Install the package
  
  make install
+
  make install &&
 +
mv -v /usr/bin/ffmpeg{,-n32} &&
 +
unset USE_ARCH
  
 
=== 64Bit ===
 
=== 64Bit ===
  
Compile the package:
+
If you are not building a SVN Snapshot apply the following patches and sed:
  
 
  patch -Np1 -i ../ffmpeg-{{FFmpeg-Version}}-pre1-gcc4-1.patch &&
 
  patch -Np1 -i ../ffmpeg-{{FFmpeg-Version}}-pre1-gcc4-1.patch &&
 
  patch -Np1 -i ../ffmpeg-{{FFmpeg-Version}}-pre1-amr_fixes-1.patch &&
 
  patch -Np1 -i ../ffmpeg-{{FFmpeg-Version}}-pre1-amr_fixes-1.patch &&
  sed -i 's:$(prefix)/lib:&64:g' $(grep -lr '$(prefix)/lib' *) &&
+
  sed -i 's:$(prefix)/lib:&64:g' $(grep -lr '$(prefix)/lib' *)
  CC="gcc ${BUILD64}" USE_ARCH=64 CFLAGS="-fPIC" ./configure --prefix=/usr \
+
 
     --enable-shared  --enable-pthreads --enable-gpl --disable-ffplay &&
+
Compile the package:
  make CC="gcc ${BUILD64}"
+
 
 +
export USE_ARCH=64 &&
 +
  CFLAGS="${BUILD64} -fPIC" \
 +
./configure --prefix=/usr --cc="gcc ${BUILD64}" \
 +
    --{,sh}libdir=/usr/lib64 \
 +
     --enable-shared  --enable-pthreads \
 +
    --enable-gpl --disable-ffplay &&
 +
  make
  
 
Install the package
 
Install the package
  
  make install
+
  make install &&
 +
mv -v /usr/bin/ffmpeg{,-64} &&
 +
ln -sfv multiarch_wrapper /usr/bin/ffmpeg &&
 +
unset USE_ARCH

Revision as of 16:41, 1 March 2007

Download Source: http://prdownloads.sourceforge.net/ffmpeg/ffmpeg-0.4.9-pre1.tar.gz
Required Patch http://svn.cross-lfs.org/svn/repos/patches/ffmpeg/ffmpeg-0.4.9-pre1-gcc4-1.patch
Required Patch http://svn.cross-lfs.org/svn/repos/patches/ffmpeg/ffmpeg-0.4.9-pre1-amr_fixes-1.patch

Using a SVN Snapshot

If you would rather use a svn snapshot instead of the tarball above grab the source with Subversion and optionaly create a tarball for use at a later time:

svn co svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
tar cvjf ffmpeg-r$(svnversion ffmpeg).tar.bz2 ffmpeg

NOTE: If you are building with a SVN Snapshot the dependencies may not be the same.

Introduction to FFmpeg

FFmpeg is a solution to record, convert and stream audio and video. It is a very fast video and audio converter and it can also acquire from a live audio/video source. Designed to be intuitive, the command-line interface (ffmpeg) tries to figure out all the parameters, when possible. FFmpeg can also convert from any sample rate to any other, and resize video on the fly with a high quality polyphase filter. FFmpeg can use a video4linux compatible video source and any Open Sound System audio source.

Configuring

Look at the output of ./configure --help and add the parameters for the optional dependencies you have installed.

A few options you may want to use:

--enable-pp
--enable-liba52
--enable-libfaac
--enable-libfaad
--enable-libmp3lame
--enable-libogg
--enable-libtheora
--enable-x264
--enable-xvid
--enable-libvorbis

Dependencies

Optional

Non-Multilib

If you are not building a SVN Snapshot apply the following patches:

patch -Np1 -i ../ffmpeg-0.4.9-pre1-gcc4-1.patch &&
patch -Np1 -i ../ffmpeg-0.4.9-pre1-amr_fixes-1.patch

Compile the package:

./configure --prefix=/usr --enable-shared \
    --enable-pthreads --enable-gpl \
    --disable-ffplay &&
make

Install the package

make install

Multilib

32Bit

If you are not building a SVN Snapshot apply the following patches:

patch -Np1 -i ../ffmpeg-0.4.9-pre1-gcc4-1.patch &&
patch -Np1 -i ../ffmpeg-0.4.9-pre1-amr_fixes-1.patch

Compile the package:

export USE_ARCH=32 &&
CFLAGS="${BUILD32} -fPIC" \
./configure --prefix=/usr --cc="gcc ${BUILD32}" \
    --enable-shared  --enable-pthreads \
    --enable-gpl --disable-ffplay &&
make

Install the package

make install &&
mv -v /usr/bin/ffmpeg{,-32} &&
unset USE_ARCH

N32

If you are not building a SVN Snapshot apply the following patches and sed:

patch -Np1 -i ../ffmpeg-0.4.9-pre1-gcc4-1.patch &&
patch -Np1 -i ../ffmpeg-0.4.9-pre1-amr_fixes-1.patch &&
sed -i 's:$(prefix)/lib:&32:g' $(grep -lr '$(prefix)/lib' *)

Compile the package:

export USE_ARCH=n32 &&
CFLAGS="${BUILDN32} -fPIC" \
./configure --prefix=/usr --cc="gcc ${BUILD32}" \
    --{,sh}libdir=/usr/lib32 \
    --enable-shared  --enable-pthreads \
    --enable-gpl --disable-ffplay &&
make

Install the package

make install &&
mv -v /usr/bin/ffmpeg{,-n32} &&
unset USE_ARCH

64Bit

If you are not building a SVN Snapshot apply the following patches and sed:

patch -Np1 -i ../ffmpeg-0.4.9-pre1-gcc4-1.patch &&
patch -Np1 -i ../ffmpeg-0.4.9-pre1-amr_fixes-1.patch &&
sed -i 's:$(prefix)/lib:&64:g' $(grep -lr '$(prefix)/lib' *)

Compile the package:

export USE_ARCH=64 &&
CFLAGS="${BUILD64} -fPIC" \
./configure --prefix=/usr --cc="gcc ${BUILD64}" \
    --{,sh}libdir=/usr/lib64 \
    --enable-shared  --enable-pthreads \
    --enable-gpl --disable-ffplay &&
make

Install the package

make install &&
mv -v /usr/bin/ffmpeg{,-64} &&
ln -sfv multiarch_wrapper /usr/bin/ffmpeg &&
unset USE_ARCH
Retrieved from "?title=FFmpeg&oldid=8034"