Ubuntu 9.10, VLC, streaming and AAC codec missing for ffmpeg

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.

Ubuntu 9.10, VLC, streaming and AAC codec missing for ffmpeg

Postby hubertlepicki » Wed Sep 30, 2009 9:30 pm

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" . I guess ffmpeg package doesn't have AAC suport compiled in.

My command line is:
Code: Select all
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:

Code: Select all
[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:

Code: Select all
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? Am I doing something wrong? Is only solution to re-compile ffmpeg with AAC support?
hubertlepicki
New Cone
New Cone
 
Posts: 3
Joined: Wed Sep 30, 2009 9:27 pm

Re: Ubuntu 9.10, VLC, streaming and AAC codec missing for ffmpeg

Postby hubertlepicki » Wed Sep 30, 2009 10:01 pm

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:
Code: Select all
sudo apt-get install build-essential fakeroot dpkg-dev


Get build dependencies for ffmpeg:
Code: Select all
apt-get build-dep ffmpeg


Get ffmpeg's deb sources:
Code: Select all
apt-get source ffmpeg


Get faac codec for AAC:
Code: Select all
apt-get install faac libfaac0 libfaac-dev


Do something (extract?) sources:
Code: Select all
dpkg-source -x ffmpeg_0.5+svn20090706-2ubuntu1.dsc


Compile ffmpeg:
Code: Select all
cd ffmpeg_0.5+svn20090706 && DEB_BUILD_OPTIONS="--enable-faac" fakeroot debian/rules binary


Install ffmpeg and it's libraries that were packaged separately.
Code: Select all
cd .. && dpkg -i *.deb


Proper VLC command for streaming MP4 with AAC is:

Code: Select all
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!
hubertlepicki
New Cone
New Cone
 
Posts: 3
Joined: Wed Sep 30, 2009 9:27 pm

Re: Ubuntu 9.10, VLC, streaming and AAC codec missing for ffmpeg

Postby Mana » Wed Dec 02, 2009 2:04 am

I had the same problem. After update to Ubuntu 9.10 no stream. Same Error

Little changes for me
Code: Select all
dpkg-source -x ffmpeg_0.5+svn20090706-2ubuntu2.dsc


Remove all ffmpeg and it's libraries packages befor installing. I used the packetmanager and uninstalled vlc too.

Code: Select all
sudo dpkg -i *.deb


Code: Select all
sudo apt-get install vlc


Now my TV Stream works on my amd64 again :D

Thanks hubertlepicki!!!
Without your step by step commands I would never have made it so fast.
Mana
New Cone
New Cone
 
Posts: 1
Joined: Wed Dec 02, 2009 1:11 am

Re: Ubuntu 9.10, VLC, streaming and AAC codec missing for ffmpeg

Postby jankarlitos » Wed Dec 02, 2009 5:57 am

This didn't work for me...

What vlc version are you using? and are you downloading from the official repositories?
jankarlitos
Blank Cone
Blank Cone
 
Posts: 25
Joined: Sat Jan 24, 2009 12:49 am

Re: Ubuntu 9.10, VLC, streaming and AAC codec missing for ffmpeg

Postby jankarlitos » Wed Dec 02, 2009 5:22 pm

Ok, it actually works.

You just need to follow these steps, and only after, reinstall vlc.
jankarlitos
Blank Cone
Blank Cone
 
Posts: 25
Joined: Sat Jan 24, 2009 12:49 am

Re: Ubuntu 9.10, VLC, streaming and AAC codec missing for ff

Postby nikolaynag » Tue Jun 29, 2010 11:17 am

I had the same problem on Ubuntu 10.04. The solution is clear:

Code: Select all
mkdir ffmpeg                               # make directory for building ffmpeg
cd ffmpeg                                  # go into created directory
sudo aptitude install apt-src libfaac-dev  # install apt-src and FAAC library, version
                                           # for development
sudo apt-src install ffmpeg                # get ffmpeg sources and automatically install
                                           # all build dependencies
sudo chown -R myusername *                 # change owner of getted sources because they
                                           # are downloaded under sudo and have root as owner
cd ffmpeg-0.5.1                            # go into source tree
debuild -us -uc                            # build ffmpeg packages, libfaac will be detected
                                           # and enabled automatically
cd ..                                      # go back to source package directory
sudo dpkg -i *.deb                         # install builded packages
nikolaynag
New Cone
New Cone
 
Posts: 1
Joined: Tue Jun 29, 2010 11:02 am


Return to General VLC media player Troubleshooting

Who is online

Users browsing this forum: No registered users and 7 guests