# The Ubuntu Forum Community > Ubuntu Official Flavours Support > Multimedia Software > [ubuntu] 9.10, VLC, streaming and AAC codec missing for ffmpeg

## kajaman

Hi guys,

I have problem with VLC not being able to stream via RTP protocol. I want to encode stream to mp3, h264 and AAC audio. While encoding video is just fine, VLC shouts at me that my FFMPEG installation is "crippled"  :Wink: . I guess ffmpeg package doesn't have AAC suport compiled in.

My command line is:


```
vlc -vvv -I rc v4l2:// :v4l2-adev=/dev/dsp :input-slave=oss:// --sout "#transcode{venc=x264{keyint=60},vcodec=x264,vb=50,scale=1,width=160,height=140,acodec=aac,ab=32,channels=2,samplerate=22050}:rtp{dst=XXX.XXX.XXX.XXX,port=5432,sdp=http://0.0.0.0:5050/vlc.sdp}"
```

And error message printed out by VLC is:



```
[0x22afce8] avcodec encoder debug: libavcodec initialized (interface 0x341400)
[0x22afce8] avcodec encoder error: cannot find encoder MPEG AAC Audio
*** Your FFMPEG installation is crippled.   ***
*** Please check with your FFMPEG packager. ***
*** This is NOT a VLC media player issue.   ***
[0x22afce8] main encoder error: Streaming / Transcoding failed
[0x22afce8] main encoder error: It seems your FFMPEG (libavcodec) installation lacks the following encoder:
MPEG AAC Audio.
If you don't know how to fix this, ask for support from your distribution.

This is not an error inside VLC media player.
Do not contact the VideoLAN project about this issue.
```

FFMPEG says it was compiled with options:


```
FFmpeg version SVN-r19352-4:0.5+svn20090706-2ubuntu1, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --extra-version=4:0.5+svn20090706-2ubuntu1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --extra-cflags=-I/build/buildd/ffmpeg-0.5+svn20090706/debian/include --enable-shared --disable-static
  libavutil     49.15. 0 / 49.15. 0
  libavcodec    52.20. 0 / 52.20. 0
  libavformat   52.31. 0 / 52.31. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter    0. 4. 0 /  0. 4. 0
  libswscale     0. 7. 1 /  0. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Aug 26 2009 09:45:20, gcc: 4.4.1
At least one output file must be specified
```

Any ideas?

----------


## kajaman

Ugh, I have spent whole day trying to do it and now when I came back it was 15 mins enough to do so... need to take break more often.

Here is what I did to enable VLC AAC output (and ffmpeg AAC in general) in plain Ubuntu 9.10 install:

Get building tools if you don't have yet:


```
sudo apt-get install build-essential fakeroot dpkg-dev
```

Get build dependencies for ffmpeg:


```
apt-get build-dep ffmpeg
```

Get ffmpeg's deb sources:


```
apt-get source ffmpeg
```

Get faac codec for AAC:


```
apt-get install faac libfaac0 libfaac-dev
```

Do something (extract?) sources:


```
dpkg-source -x ffmpeg_0.5+svn20090706-2ubuntu1.dsc
```

Compile ffmpeg:


```
cd ffmpeg_0.5+svn20090706 && DEB_BUILD_OPTIONS="--enable-faac" fakeroot debian/rules binary
```

Install ffmpeg and it's libraries that were packaged separately.


```
cd .. && dpkg -i *.deb
```

Proper VLC command for streaming MP4 with AAC is:



```
vlc -vvv -I rc v4l2:// :v4l2-adev=/dev/dsp :input-slave=oss:// --sout "#transcode{venc=x264{keyint=60},vcodec=x264,vb=50,scale=1,width=160,height=140,acodec=mp4a,ab=32,channels=2,samplerate=22050}:rtp{dst=XXX.XXX.XXX.XXX,port=5432,sdp=http://0.0.0.0:5050/vlc.sdp}"
```

Voila!

----------


## FakeOutdoorsman

I wish I would have seen your first post earlier because I could have saved you some time:

HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoding in FFmpeg

----------


## mc4man

I don't believe the 'extra' versions of ffmpeg (libavcodec- in karmic have acc encoding enabled
In which case you'd need to build a new ffmpeg w/ shared libs for vlc to use.

----------


## FakeOutdoorsman

> I don't believe the 'extra' versions of ffmpeg (libavcodec- in karmic have acc encoding enabled
> In which case you'd need to build a new ffmpeg w/ shared libs for vlc to use.


Karmic.  Oops.  My mind went into Jaunty mode.  I seem to do that too often.  Anyway, I have yet to do any Karmic testing.  Maybe I should get to work on that.

----------


## mc4man

I'm not really sure what the deal with faac is in karmic, 

I have 2 installs, one I'm using where i've replaced the repo ffmpeg with my own packages.

On the testing one everything is straightup, looking at the .diff 1 of the lines for faac is still there



> +confflags += $(call cond_enable_nf,/usr/include/faac.h,libfaac)


but it's not enabled in the build 
(what the difference is between decoding with faad and encoding with faac is beyond me

(overall karmic is excellent and what's not provided can be added one way or the other


from the repo one (greping aac,  faac, faad




> built on Aug 26 2009 09:45:50, gcc: 4.4.1
>  D  aac             raw ADTS AAC
>  D A    aac             Advanced Audio Coding
> D A    libfaad         libfaad AAC (Advanced Audio Codec)g


nothing for libfaac

----------


## andrew.46

Hi mc4man,




> I don't believe the 'extra' versions of ffmpeg (libavcodec- in karmic have aac encoding enabled
> In which case you'd need to build a new ffmpeg w/ shared libs for vlc to use.


So no aac encoding from any version of the official FFmpeg variants under Karmic? Looks like FakeOutdoorsman's guides will be _very_ popular under the new Karmic Koala  :Smile: .

Andrew

----------


## mc4man

Double checking on the install with the repo "extra" version it doesn't appear so

Ffmpeg will gladly decode .m4a but won't encode to it.

That and seeing also it's still using the non-free amr when the opensource is enabled in the -r of ffmpeg it's using, wierd
( as far as the amr, - maybe it can't enable version 3

----------


## andrew.46

Hi mc4man,




> Double checking on the install with the repo "extra" version it doesn't appear so


Looks like the answer is in the changelog:



```

ffmpeg-debian (4:0.5+svn20090609-1ubuntu3) karmic; urgency=low

  * do not forcefully enable objenjpeg, it is not avaiable in this build
    anyway
  * don't build against faac in any case, it is deemed non-free

 -- Reinhard Tartler <sire[....]re.de>  Sat, 25 Jul 2009 09:15:12 +0200
```

Unless I am misinterpreting this somehow?

Andrew

----------


## FakeOutdoorsman

mc4man,

With _libavcodec-extra-52_ (the new name for _libavcodec-unstripped-52_ I suppose) installed what do you get with:


```
ffmpeg -formats | grep aac
```

If Ubuntu is using a new enough FFmpeg then native AAC encoding is available if it shows:


```
DEA aac Advanced Audio Coding
```

That would be nice, although last I heard it is not as versatile as libfaac and doesn't match it's quality either, however that was months ago.  I haven't personally made any quality comparisons yet.

----------


## mc4man

> With libavcodec-extra-52


you only get 
D aac raw ADTS AAC
D A aac Advanced Audio Coding

ubuntu uses a package naming of 0.5+svn<date of -r>
So they're using -r19352

Andrew - 
the changelogs for ubuntu ffmpeg are somewhat alice in wonderland, you never know whether they refer to the main ffmpeg or the 'extra' (formerly known as un-stripped.

Clearly though it's been removed. (did someone think ffmpeg would support natively..?

----------


## andrew.46

Hi FakeOutdoorsman,

I reinstalled Karmic after a considerable temper tantrum following some abortive attempts to compile MPlayer with the new compiler  :Smile: . And the bad news is that the standard installation of FFmpeg shows:



```
andrew@skamandros:~$ ffmpeg -formats | grep aac
FFmpeg version SVN-r19352-4:0.5+svn20090706-2ubuntu1, 
Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --extra-version=4:0.5+svn20090706-2ubuntu1 --prefix=/usr
 --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib
 --enable-libgsm --enable-libschroedinger --enable-libspeex 
--enable-libtheora --enable-libvorbis --enable-pthreads 
--enable-zlib --disable-stripping --disable-vhook --enable-gpl 
--enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 
--extra-cflags=-I/build/buildd/ffmpeg-0.5+svn20090706/debian/include 
--enable-shared --disable-static
  libavutil     49.15. 0 / 49.15. 0
  libavcodec    52.20. 0 / 52.20. 0
  libavformat   52.31. 0 / 52.31. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter    0. 4. 0 /  0. 4. 0
  libswscale     0. 7. 1 /  0. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Aug 26 2009 09:45:50, gcc: 4.4.1
 D  aac             raw ADTS AAC
 D A    aac             Advanced Audio Coding
```

I installed libavcodec-extra-52 and then ran the same:



```
andrew@skamandros:~$ ffmpeg -formats | grep aac
FFmpeg version SVN-r19352-4:0.5+svn20090706-2ubuntu1, 
Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --extra-version=4:0.5+svn20090706-2ubuntu1 --prefix=/usr
 --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib 
--enable-libgsm --enable-libschroedinger --enable-libspeex 
--enable-libtheora --enable-libvorbis --enable-pthreads 
--enable-zlib --disable-stripping --disable-vhook --enable-gpl 
--enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394
 --extra-cflags=-I/build/buildd/ffmpeg-0.5+svn20090706/debian/include 
--enable-shared --disable-static
  libavutil     49.15. 0 / 49.15. 0
  libavcodec    52.20. 0 / 52.20. 0
  libavformat   52.31. 0 / 52.31. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter    0. 4. 0 /  0. 4. 0
  libswscale     0. 7. 1 /  0. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Aug 26 2009 09:45:50, gcc: 4.4.1
 D  aac             raw ADTS AAC
 D A    aac             Advanced Audio Coding
```

I exported _ffmpeg -formats_ on each version, calling the first 'standard_ffmpeg and the second extra_ffmpeg, and ran a diff which showed the following _additional_ codecs with libavcodec-extra-52:



```
--- standard_ffmpeg	2009-10-01 14:24:18.201398554 +1000
+++ extra_ffmpeg	2009-10-01 14:31:33.858612271 +1000
@@ -241,12 +241,18 @@
  D V D  interplayvideo  Interplay MVE video
  DEV D  jpegls          JPEG-LS
  D V    kmvc            Karl Morton's video codec
+  EV    libdirac        libdirac Dirac 2.2
+ D A    libfaad         libfaad AAC (Advanced Audio Codec)
  DEA    libgsm          libgsm GSM
  DEA    libgsm_ms       libgsm GSM Microsoft variant
+  EA    libmp3lame      libmp3lame MP3 (MPEG audio layer 3)
+ D V    libopenjpeg     OpenJPEG based JPEG 2000 decoder
  DEV    libschroedinger libschroedinger Dirac 2.2
  D A    libspeex        libspeex Speex
   EV    libtheora       libtheora Theora
   EA    libvorbis       libvorbis Vorbis
+  EV    libx264         libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
+  EV    libxvid         libxvidcore MPEG-4 part 2
   EV    ljpeg           Lossless JPEG
  D V D  loco            LOCO
  D A    mace3           MACE (Macintosh Audio Compression/Expansion) 3:1
```

Can anybody confirm these results?

Andrew

----------


## mc4man

It's been removed (libfaac-dev) from the build depends, so the repo version will not enable, (though the source is not stripped.
(there is a separate .diff for ffmpeg-extra 




> Source: ffmpeg-extra
> Section: libs
> Priority: optional
> Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com>
> XSBC-Original-Maintainer: Debian multimedia packages maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>
> Uploaders: Sam Hocevar (Debian packages) <sam+deb@zoy.org>,
>            Loic Minier <lool@dooz.org>,
>            Reinhard Tartler <siretart@tauware.de>,
>            Fabian Greffrath <fabian@debian-unofficial.org>,
> ...


It still is included as a confflag so if one was to apt-get and build the karmic source then libfaac would be enabled automatically (if libfaac-dev is installed on building system
( i didn't 'create' this configure, reflects the default




> /home/doug/ffj/ffmpeg-extra-0.5+svn20090706/configure \
> 		 --extra-version='4:0.5+svn20090706-2ubuntu1' --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libdirac --enable-libgsm --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook  	--enable-libmp3lame 	--enable-libmp3lame 	 	 	--enable-libfaac --enable-nonfree --enable-gpl --enable-postproc --enable-swscale --enable-x11grab 	--enable-libfaad 	--enable-libxvid 	--enable-libx264 --enable-libdc1394



jaunty has 1 .diff and confflags for multiverse




> +# this part below is intended for the 'ffmpeg' package in ubuntu/multiverse
> +confflags += $(call cond_enable,/usr/include/xvid.h,libxvid)
> +confflags += $(call cond_enable,/usr/include/lame/lame.h,libmp3lame)
> +confflags += $(call cond_enable,/usr/include/faac.h,libfaac)
> +confflags += $(call cond_enable,/usr/include/x264.h,libx264)
> +confflags += $(call cond_enable,/usr/include/vdpau/vdpau.h,vdpau)


While i do build sources a packages and use a pre-exiting .diff for 'multi-package' builds,  for the most part find the ubuntu .diff's unsuitable for use as a 'starter' .diff

The 'ideal' is when you can use a ...orig.tar.gz, and apply a decent, uncomplicated .diff to it. Then any changes made before building are written to a new .diff which becomes 'yours' so to speak

----------


## andrew.46

Hi mc4man,




> The 'ideal' is when you can use a ...orig.tar.gz, and apply a decent, uncomplicated .diff to it. Then any changes made before building are written to a new .diff which becomes 'yours' so to speak


But certainly for the average Ubuntu user there will be no aac encoding from FFmpeg under Karmic with either the standard FFmpeg or with the addition of libavcodec-extra-52. So many will be required to compile their own copy if they want my own favoured combination of h264 video + aac sound...

Andrew

----------


## kajaman

Ok, thanks for everyone involved.

I guess I'll just need to re-compile ffmpeg each time it gets updated in Ubuntu repository, I am afraid, and until it's released updates will be often I guess  :Wink:

----------


## mc4man

> I guess I'll just need to re-compile ffmpeg each time it gets updated in Ubuntu repository


The odds of ffmpeg getting updated are slim to none.

I'm thinking that when you build from the repo source as you did, that after installing the new .debs (seen as a 're-installation") the current repo versions then will be considered an 'update' to the some of the ones you just installed.

Most likely to be so would be ffmpeg and libavcodec52 ( and libavcodec-dev and ffmpeg-doc if you installed from your new package set.

If so and you update you'll be right back where you started.

To prevent that you'd need to append a -1 to version which will be a real pita using the repo's debian, debian/rules 

What you could do is lock the affected packages in synaptic

..................................................  ...............


Not to confuse this, so will mention in passing

you could work with the ffmpeg-extra source instead, in that case only libavcodec-extra-52 would need to be locked. ( and you'd be assured a full featured build

In that case you'd
sudo apt-get build-dep ffmpeg-extra
apt-get source ffmpeg-extra

( make sure that libfaac-dev is installed, (and the amr -devs from medibuntu if amr-nb, -wb  support is wanted,)
The -dev's of  libfaac, libamr-nb, libamr-wb will be auto-detected and enabled

Or what I do is just build a completely new ffmpeg package set installed to /usr, using a -r that suits me

or build to /usr/local as others do

----------


## FakeOutdoorsman

> Hi mc4man,
> 
> 
> 
> But certainly for the average Ubuntu user there will be no aac encoding from FFmpeg under Karmic with either the standard FFmpeg or with the addition of libavcodec-extra-52. So many will be required to compile their own copy if they want my own favoured combination of h264 video + aac sound...
> 
> Andrew


Andrew,

How troublesome for the end user and for us.  I wonder why the Ubuntu developers did not include the native AAC encoder (or use a new enough FFmpeg: I'm unsure what revision introduced native AAC encoding) because I don't think it is non-free.

----------


## mc4man

> I wonder why the Ubuntu developers did not include the native AAC encoder....


I find the -r they picked to be curious, though it may of been one at random or just the time when built

It happens to be one of a few that allows amr though both the non-free and opensource libs.

what has changed from jaunty to now concerning libfaac is unknown, maybe just someones opinion 

Anyway will attempt to get an explanation and maybe some idea on how the native encoder would be viewed here
add. comments, confirmation would be good

----------


## FakeOutdoorsman

> I find the -r they picked to be curious, though it may of been one at random or just the time when built
> 
> It happens to be one of a few that allows amr though both the non-free and opensource libs.
> 
> what has changed from jaunty to now concerning libfaac is unknown, maybe just someones opinion 
> 
> Anyway will attempt to get an explanation and maybe some idea on how the native encoder would be viewed here
> add. comments, confirmation would be good


In April the FFmpeg devs noticed that libfaac was probably not LGPL as it claimed.  Instead of dropping it, they required _--enable-nonfree_ when using _--enable-libfaac_, much like AMR, which makes FFmpeg non-distributable, I believe.  Comma splices.

[FFmpeg-devel] [RFC] Libfaac not LGPL?

----------


## mc4man

> they required --enable-nonfree


At times i's such an idiot, just noticed that in my own config (not in regards to karmic's source) that when I dropped lib-amr I had left --enable-nonfree, never noticed that it was now being used for libfaac

----------


## FakeOutdoorsman

I compiled r19352 and it seems to not support native AAC encoding.  The commit log has several aacenc entries on Sept 21 09, so I'll make a guess it was introduced then (r19942).

----------


## mc4man

It may have been here, if so, just 2 days after the current -r karmic is using, 07/06 vs. 07/08 (great timing..?

----------


## FakeOutdoorsman

> It may have been here, if so, just 2 days after the current -r karmic is using, 07/06 vs. 07/08 (great timing..?


Yeah, that seems more accurate than my guess.  Quite an unfortunate timimg.

----------


## mc4man

What I think is interesting is that the opencore amr libs were just added to the karmic repo's.
By themselves don't seem to be of much value ( unless they were added for the benefit of compilers)

If they do release a new ffmpeg for karmic, it will be interesting to see if they use the current -r or a newer one, which by default would probably include aac ( though I'd assume there have been relevant patches since -r 19375

I believe karmic's current -r supports both the nonfree and opencore in an  'one or the other' config, so they could keep the current -r and just replace

----------


## andrew.46

Hi FakeOutdoorsman,




> Yeah, that seems more accurate than my guess.  Quite an unfortunate timimg.


I have experimented a little with the new FFmpeg aac encoding and I will have to say that for my purposes it seems more than acceptable. I suspect once I have tested a little more I may consider dumping _--enable-libfaac_, but my needs are not great in this area...

Andrew

----------


## mc4man

Atm the final word on this is there will not be any update to ffmpeg in karmic, so the the ffmeg you have is the one you'll get.

They are open to 



> Patches that backport features from trunk however is something
> that I'm inclined to consider for review...


That would be simple for amr, for aac i'd think not quite as

The best (and safest) option would be to use FO's guide, there are a couple of ppa's that offer newer ffmpeg and lib's though I'd be extremely careful there.(personally would not use

Case in point the openshot ppa

----------


## FakeOutdoorsman

Now I'm a little annoyed with myself for not doing any Karmic testing at all.  Maybe I would have noticed a complete lack of aac encoding and maybe I would have prodded the developers about it, but alas...it's time to compile!

----------


## andrew.46

Hi mc4man,




> What I think is interesting is that the opencore amr libs were just added to the karmic repo's.
> By themselves don't seem to be of much value ( unless they were added for the benefit of compilers)


And moving right away from the original post: you may have noticed that the newer version of libopencore-amr now carries an amr _encoder_ named amrnb-enc...

Andrew

----------


## yester64

disregard my post, its the video file and every other file works. done!

I tired to follow the guide, but i get into some problems.
root@joerg-desktop:/home/joerg# dpkg-source -x ffmpeg_0.5+svn20090706-2ubuntu1.dsc
dpkg-source: failure: cannot open ffmpeg_0.5+svn20090706-2ubuntu1.dsc: No such file or directory
root@joerg-desktop:/home/joerg# cd ffmpeg_0.5+svn20090706 && DEB_BUILD_OPTIONS="--enable-faac" fakeroot debian/rules binary
bash: cd: ffmpeg_0.5+svn20090706: No such file or directory
root@joerg-desktop:/home/joerg# cd .. && dpkg -i *.deb
dpkg: error processing *.deb (--install):
 cannot access archive: No such file or directory
Errors were encountered while processing:
 *.debits probable noobie like, but i am stuck there.
But i am sure that i need to follow this guide, since i still get an error with winff saying that i miss moov atom.

----------


## chitowner2

> Hi FakeOutdoorsman,
> 
> 
> 
> I have experimented a little with the new FFmpeg aac encoding and I will have to say that for my purposes it seems more than acceptable. I suspect once I have tested a little more I may consider dumping _--enable-libfaac_, but my needs are not great in this area...
> 
> Andrew


*******
Andrew & Mc4man;

I've read this whole thread, having also encountered the same issue. I was going to post my CL stuff, but it's all the same as what I've seen in this thread. 

Bottom line here: Are we SOL on being able to encode AAC with koala? I know the full release is a few days away, but I gotta think there is a way to patch the resident ffmpeg somehow.

CT
 :Sad:

----------


## andrew.46

Hi chitowner,




> Are we SOL on being able to encode AAC with koala?


In terms of repository packages I believe this will be the case.

Andrew

----------


## FakeOutdoorsman

> Bottom line here: Are we SOL on being able to encode AAC with koala?


You have two (maybe three) alternatives thank I can think of.  Personally I think step one is the easiest, but I'm biased towards that choice:

*1.* Compile FFmpeg: HOWTO: Install and use the latest FFmpeg and x264

*2.* Use the repo FFmpeg and a separate AAC encoder (faac, neroaacenc) and combine the video and audio.  You could also use MP4Box, MEncoder, mkvmerge, or some other program capable of combining various media files.

*3.* Somehow fix the repo FFmpeg.  I don't know how to do this, or if it is possible or worth it, but mc4man probably would.

----------


## phenest

> disregard my post, its the video file and every other file works. done!
> 
> I tired to follow the guide, but i get into some problems.
> root@joerg-desktop:/home/joerg# dpkg-source -x ffmpeg_0.5+svn20090706-2ubuntu1.dsc
> dpkg-source: failure: cannot open ffmpeg_0.5+svn20090706-2ubuntu1.dsc: No such file or directory
> root@joerg-desktop:/home/joerg# cd ffmpeg_0.5+svn20090706 && DEB_BUILD_OPTIONS="--enable-faac" fakeroot debian/rules binary
> bash: cd: ffmpeg_0.5+svn20090706: No such file or directory
> root@joerg-desktop:/home/joerg# cd .. && dpkg -i *.deb
> dpkg: error processing *.deb (--install):
> ...


There is a couple of typo's in the guide.

1. The 'dpkg -x' command has ubuntu1.dsc in the filename, whereas you will have ubuntu2.dsc
2. The first 'cd' command has a _ in the folder name, but you should notice it has a - instead.

----------


## phenest

As far as removing AAC from FFmpeg is concerned, I don't understand the reason. There's plenty of non-free stuff available. What makes this different?

----------


## FakeOutdoorsman

> As far as removing AAC from FFmpeg is concerned, I don't understand the reason. There's plenty of non-free stuff available. What makes this different?


In in the FFmpeg configuration, including _--enable-libfaac_ requires _--enable-nonfree_ which makes FFmpeg non-free and unredistributable.  I think this is the only current ./configure option that requires _--enable-nonfree_.



```
./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
...
License: nonfree and unredistributable
```

Without _--enable-libfaac_ and _--enable-nonfree_:


```
License: GPL version 2 or later
```

----------


## yester64

> As far as removing AAC from FFmpeg is concerned, I don't understand the reason. There's plenty of non-free stuff available. What makes this different?


No, my problem (if you were refering to mine) is solved. The file was just simply broken. I checked that in windows too and there it made the same problem.  :Sad: 
So my guess is, that the program concluded it misses a codec but its just broken. Other file play well. I ususally use MP4 codec using handbrake.

----------


## paul.gevers

> There's plenty of non-free stuff available. What makes this different?


If it is known that it is non-free and in main or universe, a bug should be filed and the stuff should be removed from the repository. What you most likely will find is that non-free stuff got in because it was assumed to be free. Ubuntu's main and universe repositories are ONLY for free stuff.

----------


## DJ_Peng

> Originally Posted by chitowner2
> 
> 
> Bottom line here: Are we SOL on being able to encode AAC with koala? I know the full release is a few days away, but I gotta think there is a way to patch the resident ffmpeg somehow.
> 
> 
> You have two (maybe three) alternatives thank I can think of.  Personally I think step one is the easiest, but I'm biased towards that choice:
> 
> *1.* Compile FFmpeg: HOWTO: Install and use the latest FFmpeg and x264
> ...


I compiled ffmpeg as instructed in the thread you linked to, and without any errors, but when I tried to rip from DVD to mp4 with VLC using both the H.264  + AAC (TS) and the MPEG-4 + AAC I still got the error about missing the AAC encoder. I'm using Karmic, although this is reallymaking me seriously consider rolling back to Jaunty since I usually rip a DVD a week to enjoy away from my comp on the weekends. Any idea what I'm missing?

ETA: I meant to include this with my question:


```
:~$ ffmpeg -formats | grep aac
FFmpeg version SVN-r20463, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  built on Nov  5 2009 11:31:41 with gcc 4.4.1
  configuration: --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
  libavutil     50. 3. 0 / 50. 3. 0
  libavcodec    52.37. 1 / 52.37. 1
  libavformat   52.39. 2 / 52.39. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0. 7. 1 /  0. 7. 1
 D  aac             raw ADTS AAC
 DEA    aac             Advanced Audio Coding
  EA    libfaac         libfaac AAC (Advanced Audio Codec)
 text2movsub remove_extra noise mov2textsub mp3decomp mp3comp mjpegadump imxdump h264_mp4toannexb dump_extra aac_adtstoasc
```

----------


## mc4man

> when I tried to rip from DVD to mp4 with VLC using both the H.264 + AAC (TS) and the MPEG-4 + AAC I still got the error about missing the AAC encoder....


Vlc uses libavcodecXX (shared) for that so you need shared ffmpeg libs with aac encoding  enabled




> Somehow fix the repo FFmpeg....


Many ways to get and maintain shared ffmpeg libs, somewhat depends on the reason for, how it may or may not affect apps that depend on, ect. ect. ( in other words no one 'best' way or 'best' svn -r

The simplest to do and that requires no 'maintaining' is in post one, simply building the karmic repo source off of the debian/rules and with libfaac-dev installed will automatically enable it.

(one would probably want to make/add a minor version change to the changelog in the debian folder to prevent the repo packages from being seen as an upgrade

For more recent or the current svn a bit more forethought is advised and usually requires building some apps to take advantage of the newer libs (for instance vlc

----------


## DJ_Peng

What's the best (i.e. easiest) way to do shared ffmpeg libs for someone who is building from source? I think my week has been worse than it's been in a while because my brain can't translate  anything I've seen about possibly doing it in the threads I've seen today.

----------


## Louigi Verona

Yes, I would like to ask that too - compiled everything but VLC still says that there is no encoder.

----------


## fcastillo

Did anybody filed a bug about this? I'd like to subscribe to it...
This issue is really important, and annoying!
This is another of the reasons why Ubuntu is not ready yet for the public and the average consumer.

----------


## andrew.46

Hi fcastillo,




> Did anybody filed a bug about this? I'd like to subscribe to it...
> This issue is really important, and annoying!
> This is another of the reasons why Ubuntu is not ready yet for the public and the average consumer.


In defence of the packagers they are doing a difficult and often thankless job, particularly in their concerns that all parts of an application are licensed appropriately and thus suitable for a distribution such as Ubuntu. It is part of the _choice and freedom_ available to Linux users that individual users can restructure packages as they see fit and also to guide others along the same road.

All the best,

Andrew

----------


## DJ_Peng

> Did anybody filed a bug about this? I'd like to subscribe to it...
> This issue is really important, and annoying!
> This is another of the reasons why Ubuntu is not ready yet for the public and the average consumer.


Bug #412063https://bugs.launchpad.net/ubuntu/+s...ra/+bug/412063 looks like it may be part of what you're looking for, although bug #https://bugs.launchpad.net/ubuntu/+s...ac/+bug/374900374900 (mentioned on the other bug) may deal with the issue more directly. You may want to run a search for LP bugs (a click or two away from either of those bugs) to see if you can find one that better fits what you're looking for.




> In defence of the packagers they are doing a difficult and often thankless job, particularly in their concerns that all parts of an application are licensed appropriately and thus suitable for a distribution such as Ubuntu. It is part of the _choice and freedom_ available to Linux users that individual users can restructure packages as they see fit and also to guide others along the same road.


I agree that the devs and packagers deserve a lot more thanks than they probably get (I owe several rounds to some devs and packagers myself) I think castillo's question is more a case of wondering if there's any chance to getting a package that includes these codecs or if we need to build it from source. After reading the logic for removing them (which I can agree with to some extent) I also wish we had a choice whether to install a package with the codecs from either Medibuntu or a PPA. It would certainly make my life easier since I'm unable to use an app that I used to use on a weekly basis, all because in the upgrade to karmic I have an unmet dependency for the app I want to use (which has a fix released) and the alternative choices I have require the codec. Simply building ffmpeg from source to include the codec didn't seem to work so I'm pretty frustrated by this issue myself. I've had to consider rolling back to jaunty in order to get these apps (as well as epiphany-gecko) working again but decided to stick with karmic because the other advantages of the upgrade are too good to want to do without.

It is all about choices, and I enjoy helping out where I can, but our choices have been modified and some of the options we now have (changing code and packaging to name a pair) are simply above our pay grade for some of us.

I apologize if any offense is taken, none was intended.

----------


## BFG

I followed kajaman's instructions on page 1. I'm uncomfortable with compiling but I followed the cut and paste

I got :


```
Errors were encountered while processing:
 libavcodec52_0.5+svn20090706-2ubuntu2_amd64.deb
 libavutil49_0.5+svn20090706-2ubuntu2_amd64.deb
 ffmpeg-dbg
```

Still not working for me and now update complains.  How can I fix this?

----------


## cfriisha

I have the same problem with FFMpeg and VLC when converting a wav to mp3.
However, this works fine with audacity.  Would it then be possible to the same encoder in vlc as in audacity?

----------


## magiceffects

I have the same problem listed in this thread. I am recording video with my webcam, using Cheese.

I can open and play the file (which is saved in 'ogv' format) in both Totem Movie Player and VLC Media Player. The file has both video (from webcam) and audio (from mic).

I want to convert the ogv file to avi format, so that I can upload the file to Facebook for friends to view.

I have completed the following steps, listed in this thread:



```
sudo apt-get install build-essential fakeroot dpkg-dev
```



```
apt-get build-dep ffmpeg
```



```
apt-get source ffmpeg
```



```
apt-get install faac libfaac0 libfaac-dev
```

Once I get to the next step, I am instructed to enter the following code:



```
dpkg-source -x ffmpeg_0.5+svn20090706-2ubuntu1.dsc
```

But I am getting an error: dpkg-source: error: cannot open ffmpeg_0.5+svn20090706-2ubuntu1.dsc: No such file or directory.

I have also tried this, which was mentioned on another page...



```
sudo apt-get install ffmpeg libavcodec-extra-52
```

... although I am left with the same error message and I am unsure how to complete the process. I am pretty mediocre with linux knowledge and I am trying to learn, however I don't want to screw up the rest of my system playing with things I don't know how to use... so could someone please help me to complete this mission?  :Smile: 

Thanks

----------


## ron999

@magiceffects
Hi
If you're trying to compile and install a good version of ffmpeg then the tutorial to use is here:-http://ubuntu-ky.ubuntuforums.org/sh...d.php?t=786095

----------

