2

ffmpeg does not compile. Every time there is an error no matter what I do. I installed clean 12.04, followed the tutorial on ffmpeg website, but it is still not working.

If its not libfdk-aac error, it's libx246 error.

Can someone please help?

I just tried to follow another tutorial and it complaints about libfdk-aac. I have it installed, multiverse reps are done too, it's all there. If I remove --enable-libfdk-aac from ffmpeg ./configure, then it complaints about libx264. I installed libx264-dev and it works but eventually comes with failed error mentioning x264:

libavcodec/libx264.c:552: error: undefined reference to 'x264_encoder_open_130' collect2: ld returned 1 exit status make: *** [ffmpeg_g] Error 1 
Kevin Bowen
  • 20,055
  • 57
  • 82
  • 84
Andrej
  • 21

1 Answers1

2

We solved the problems after various discussions in the comments where I linked to my detailed guide, which also references the official ffmpeg guide.

Andrej's system was Ubuntu 12.04 server.

It is only possible to list some general points below, as there was no one single issue that was the problem in the failed compilation attempts:

  • Firstly, it is necessary to remove any existing packages with

    sudo apt-get remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
    

    so that possible conflicts are avoided when trying to compile ffmpeg and its libraries later.

  • In the official ffmpeg guide the dependencies are slightly different for desktop and server, and there are also several notes throughout the guide that should be followed if installing on a server. The sets of build dependencies for desktop and server are listed in the official guide.
  • One thing Andrej mentioned was that he had got dependencies such as libx264-dev, but actually that is one of the things that should be removed (as in the first command above). If you want x264 support or aac support, etc, you must compile x264, fdk-aac, libvpx and opus before you build ffmpeg. Compiling ffmpeg should be the last thing done; you should not download the build dependencies and then begin compiling ffmpeg as you need to compile several libraries yourself if you want the various support for certain audio/video types.
  • If it is proving problematic to compile certain libraries or build ffmpeg with support for them, you should be able to edit the ffmpeg ./configure line in the guide; e.g. to remove an --enable-libxxx line. Conversely, for opus support, you need to add --enable-libopus. I was about to suggest further tweaking the ./configure line, when Andrej solved his problem, but it is useful to remember this for future builds if problems occur.

  • For more details on compiling ffmpeg and possible problems that can arise, see my detailed answer for this question.