Recompiling ffmpeg for Fedora 12 to add faac support

| 8 Comments | No TrackBacks

The ffmpeg package that is available for Fedora 12 via the rpmfusion.org respository does not include faac support. This can be a problem when you want to create H.264 video content that incorporates the AAC (Advanced Audio Codec).

The most straightforward way I’ve found to rectify this situation is to build a new package from the source RPM.

First, download the source RPM using yumdownloader.

yumdownloader --source ffmpeg

This will download the .src.rpm file to the current directory. Install it using the rpm command. (This assumes you have a person RPM build environment set up. This blog post provides some good information on that.)

rpm -ivh ffmpeg-0.5-5.20091026svn.fc12.src.rpm

You probably want to indicate some sort of difference in the version numbering since this version is a modification of the upstream. Edit ~/rpm/SPECS/ffmpeg.spec and modify the Release: line by adding something to the end of it.

Release: 5.%{svn}svn%{?dist}_fozz

Now, you can try building the package with rpmbuild. Unless you’ve already installed all the development libraries and other dependencies ffmpeg relies on, you’ll get some dependency messages. Use yum to install those dependencies and then try building again.

rpmbuild -ba ~/rpm/SPEC/ffmpeg.spec --with faac

This will create RPM packages for you under ~/rpm/RPMS/. Use rpm to install the ffmpeg and ffmpeg-libs packages.

rpm -Uvh ~/rpm/RPMS/x86_64 ffmpeg-{libs-,}0.5-5.20091026svn.fc12_fozz.x86_64.rpm

No TrackBacks

TrackBack URL: http://fozzolog.fozzilinymoo.org/mt-tb.cgi/1673

8 Comments

during build, libdirac is not found. my fedora 12 : dirac-libs installed. i edited ffmpeg.spec to "--disable-libdirac"

You probably did not have the dirac-devel package installed. This is necessary, not dirac-libs, for compilation. But, being that dirac is fairly obscure, you're probably not going to miss it much. :)

Thanks for the great post!
I had the same libdirac error even though I had the dirac-devel package installed. Editing the spev worked for me too.

Thank your for that very usefull post!! :D

No errors for me, just a warning with libdirac when installing dependences...
(strange warning indeed... UFO in 'da place?)

well, thank you again.

Thanks for the tip. I'm still on Fedora 11, but the steps are the same. Unfortunately, I'm still not able to encode using faac. I can see that faac is enabled by viewing the output of 'ffmpeg'. I get:


ffmpeg
FFmpeg version 0.5-rpmfusion, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib --mandir=/usr/share/man --arch=i586 --extra-cflags=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i586 -mtune=generic -fasynchronous-unwind-tables --extra-version=rpmfusion --enable-bzlib --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-nonfree --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-vdpau --enable-x11grab --enable-avfilter --enable-avfilter-lavf --enable-postproc --enable-swscale --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib --cpu=i586 --disable-mmx2 --disable-sse --disable-ssse3 --disable-yasm

When I try to use "-acodec faac" I get: Unknown encoder 'faac'.

I both libfaac and libfaac-devel installed. Running 'ffmpeg -formats' shows that only aac decoding is supported.

Any suggestions?


Thanks,
Adam

Two things. You may want to try 'libfaac' instead of 'faac' as the argument to -acodec in the ffmpeg command line.

Also, make sure you update the 'ffmpeg-libs' package as well as 'ffmpeg' after you build the new RPMs.

I tryed this all worked fine but the last step is failling : complaining a bout a missing dependency :

rpm -Uvh rpmbuild/RPMS/x86_64/ffmpeg-{libs-,}0.5-5.20091026svn.fc12_jpp.x86_64.rpm

erreur: Dépendances requises:
ffmpeg-libs = 0.5-5.20091026svn.fc12 est nécessaire pour (déjà installé) ffmpeg-devel-0.5-5.20091026svn.fc12.x86_64

Worked perfectly for me on Fedora 11. This was just what I needed and google pointed me to the right spot. Thanks!

Leave a comment

About this Entry

This page contains a single entry by Doran L. Barton published on November 20, 2009 1:17 PM.

Patch to FFmpeg::Command to support multiple input files was the previous entry in this blog.

Book Review: Masterminds of Programming is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.