You are not logged in.

#1 2008-04-11 17:09:00

axel
Member
Registered: 2007-12-10
Posts: 68

[Solved] Unknown encoder 'aac'

I am trying to encode an flv video to a format suitable for my mobile phone. The following command was working fine on Fedora when I had tried it.

ffmpeg -i input.flv -vcodec mpeg4 -s 176x144 -r 15 -qscale 4 -acodec aac -ac 1 -ar 32000 -ab 32000 -f 3gp output.3gp

However now I get the following error: Unknown encoder 'aac'

I installed many codecs but the problem is still here. What package should I install to be able to encode aac audio?

Edit: I installed ffmpeg-amr-svn from AUR but I still get the same error

$ ffmpeg -formats | grep aac
FFmpeg version SVN-r12790, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: --prefix=/usr --enable-gpl --enable-nonfree --enable-libmp3lame --enable-libvorbis --enable-shared --enable-pthreads --enable-x11grab --enable-postproc --enable-libfaac --enable-libfaad --enable-liba52 --enable-libxvid --enable-libtheora --enable-libamr-nb --enable-libamr-wb --enable-libx264
  libavutil version: 49.6.0
  libavcodec version: 51.54.0
  libavformat version: 52.13.0
  libavdevice version: 52.0.0
  built on Apr 11 2008 20:31:55, gcc: 4.3.0
 D  aac             ADTS AAC
  EA    libfaac
 D A    mpeg4aac

Last edited by axel (2008-04-11 18:03:10)

Offline

#2 2008-04-11 17:56:50

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,932

Re: [Solved] Unknown encoder 'aac'

All external libraries in FFmpeg have been prefixed with lib. So to use aac call libfaac. Also, x264 will produce way higher quality h264 files than FFmpeg mpeg4 internal. The best guides I've found:

http://rob.opendot.cl/index.php/useful- … ing-guide/
http://rob.opendot.cl/index.php/useful- … n-mapping/

Last edited by skottish (2008-04-11 18:02:48)

Offline

#3 2008-04-11 18:02:53

axel
Member
Registered: 2007-12-10
Posts: 68

Re: [Solved] Unknown encoder 'aac'

Thanks skottish. libfaac did the trick! I also tried libx264. Indeed it produces higher quality videos. Thanks. smile

Offline

#4 2008-04-11 18:07:00

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,932

Re: [Solved] Unknown encoder 'aac'

axel wrote:

Thanks skottish. libfaac did the trick! I also tried libx264. Indeed it produces higher quality videos. Thanks. smile

Glad it helped. Man, that version of FFmpeg you were using before in ancient. There was a library rename in between the one you posted and I posted for aac. It was just aac, then faac, then libfaac. The last two have been around for a least a year!

Offline

#5 2008-04-11 18:09:41

axel
Member
Registered: 2007-12-10
Posts: 68

Re: [Solved] Unknown encoder 'aac'

Well it has a been a long time since I last wanted to convert an avi to 3gp. tongue

Thanks for the links also.

Offline

#6 2008-04-11 18:22:30

axel
Member
Registered: 2007-12-10
Posts: 68

Re: [Solved] Unknown encoder 'aac'

When I installed ffmpeg-amr-svn I had to uninstall ffmpeg. However ffmpeg is a dependency for k3b. Here is the output from yaourt.

$ yaourt -Syu --aur
Password:
:: Synchronizing package databases...
.
.
==> Searching for new version on AUR
.
.
ffmpeg-amr-svn:  (local=12790-1 aur=12559-1)
.
.
missing dependency for k3b : ffmpeg>=20070131

Will there be any problem to k3b with the aur version of ffmpeg?

Offline

#7 2008-04-11 18:41:42

dyscoria
Member
Registered: 2008-01-10
Posts: 1,007

Re: [Solved] Unknown encoder 'aac'

axel wrote:

Thanks skottish. libfaac did the trick! I also tried libx264. Indeed it produces higher quality videos. Thanks. smile

Wow! You managed to try x264 in 6 minutes! That's some damn fast encoding options wink

axel wrote:

When I installed ffmpeg-amr-svn I had to uninstall ffmpeg. However ffmpeg is a dependency for k3b. Here is the output from yaourt.

Hmm you could try to force uninstall ffmpeg with 'pacman -Rd ffmpeg' then install the AUR package. Having a look at the PKGBUILD it's supposed to provide ffmpeg so things should work fine.

Last edited by dyscoria (2008-04-11 18:42:15)


flack 2.0.6: menu-driven BASH script to easily tag FLAC files (AUR)
knock-once 1.2: BASH script to easily create/send one-time sequences for knockd (forum/AUR)

Offline

#8 2008-04-11 18:46:57

axel
Member
Registered: 2007-12-10
Posts: 68

Re: [Solved] Unknown encoder 'aac'

dyscoria wrote:
axel wrote:

When I installed ffmpeg-amr-svn I had to uninstall ffmpeg. However ffmpeg is a dependency for k3b. Here is the output from yaourt.

Hmm you could try to force uninstall ffmpeg with 'pacman -Rd ffmpeg' then install the AUR package. Having a look at the PKGBUILD it's supposed to provide ffmpeg so things should work fine.

This is what I did. Then after installing ffmpeg-amr-svn I got the output you can see in my previous post (missing dependency for k3b : ffmpeg>=20070131). However when I run k3b I don't get any error. neutral

Offline

#9 2008-04-11 19:01:41

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,932

Re: [Solved] Unknown encoder 'aac'

For that exact same reason I have my own build scripts for FFmpeg and MPlayer from subversion, and x264 from git to name the packages by date. I heard it's possible to have versionpkg name packages by date and not by version number, but I never could get it to work outside of CVS.

Last edited by skottish (2008-04-11 19:03:03)

Offline

#10 2008-04-11 19:04:40

axel
Member
Registered: 2007-12-10
Posts: 68

Re: [Solved] Unknown encoder 'aac'

skottish wrote:

For that exact same reason I have my own build scripts for FFmpeg and MPlayer from subversion, and x264 from git to name the packages by date. I heard it's possible to have versionpkg name packages by date and not by version number, but I never could get it to work outside of CVS.

I see. Thanks again for the info.

Offline

#11 2008-04-12 14:18:24

axel
Member
Registered: 2007-12-10
Posts: 68

Re: [Solved] Unknown encoder 'aac'

Just for the record I took ffmpeg's PKBUILD from ABS and rebuild the package with aac support. Now there is no dependency error.

Offline

#12 2008-04-12 21:52:00

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,932

Re: [Solved] Unknown encoder 'aac'

This is what my setup is like. I have two files, a build script and a file that's nearly a complete PKGBUILD except that the pkgver is 00000000 and it doesn't pull the sources. The build script will copy that file (called original_PKGBUILD) to PKGBUILD, rename the pkgver line to the current date, pull the sources from subversion, and run makepkg. (It will also install the package and clean out the directory when it's done, but that may be a little risky for some people)

This is the file "original_PKGBUILD". It's simply a modified version of the Arch official file:

pkgname=ffmpeg
pkgver=00000000
pkgrel=1
pkgdesc="FFmpeg is a complete and free Internet live audio and video broadcasting solution for Linux/Unix"
arch=(i686 x86_64)
depends=('lame' 'sdl' 'libvorbis' 'a52dec' 'faad2' 'faac' 'libdts' 'xvidcore' 'zlib' 'imlib2' 'x264')
license=('GPL')


url="http://ffmpeg.mplayerhq.hu/"

build() {
     cd $startdir/src/$pkgname || return 1

     [ "${CARCH}" = "x86_64" ] && CFLAGS="${CFLAGS} -fPIC" && CXXFLAGS="${CXXFLAGS} -fPIC"

     # configure
     ./configure \
          --prefix=/usr \
          --enable-gpl \
          --enable-libmp3lame \
          --enable-libvorbis \
          --enable-libtheora \
          --enable-libfaac \
          --enable-libfaad \
          --enable-liba52 \
          --enable-libxvid \
          --enable-libx264 \
          --enable-shared \
          --disable-static \
          --enable-pthreads \
          --enable-network \
          --enable-x11grab \
          --enable-swscale \
          || return 1

     # build
     make -j 2 || return 1

     # install
     mkdir -p $startdir/pkg/usr/{bin,include,lib} || return 1
     make DESTDIR=$startdir/pkg install || return 1
}

This is the script titled "build_ffmpeg_subversion.sh":

cp ./original_PKGBUILD ./PKGBUILD

sed -i "1,2 s/pkgver=00000000/pkgver=`date +%Y%m%d`/" ./PKGBUILD

mkdir src

svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg

cp -r ffmpeg ./src

makepkg

sudo pacman -U *pkg.tar.gz

rm *pkg.tar.gz
rm -rf pkg
rm -rf src
rm -rf ffmpeg
rm PKGBUILD

Last edited by skottish (2008-04-12 21:52:35)

Offline

Board footer

Powered by FluxBB