Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to compile FFmpeg but as you know its compile will (by default) look in the system's 'lib include bin' directories before following my orders set via --extra-cflags or --extra-ldflags Now the system directory has for instance faac, x264, vpx....which I don't want to modify simply because thy are interlinked with many other application such as firefox, skype, totem, vlc...& by removing them I will remove every dependent application so is there any way (flag) that I pass on to the ./compile such that it don't look at system directories only to the directories I specify myself.

share|improve this question

You need to compile any external libraries used as ffmpeg dependencies, such as x264 and libvpx (if you don't want to use the -dev versions from the repository), using a custom --prefix, and may need to use additional options. See ./configure --help for options specific to each library. Then compile ffmpeg telling it where the external libraries are and where you want to install it. See some examples in this thread:

[FFmpeg-user] Compiling ffmpeg with --prefix option

share|improve this answer
But I have done that already..For instance libfacc installed system wide is of older version & the newer .tar.gz I have downloaded & compiled say in /opt will be neglected while I compile ffmpeg because it 'preferably' will look into /usr/bin thus will be compiled with the older version! Now if I remove that older version I will loose vlc,openshot & what not – nightcrawler Dec 26 '12 at 20:52
@nightcrawler Your configure lines for your external libraries and ffmpeg would be useful. – LordNeckbeard Dec 26 '12 at 20:55
./configure --prefix=/opt/x264_ttmod --enable-libxvid --enable-libfaac -enable-libopencore --enable-shared --disable-static --extra-cflags=-L/opt/x264_ttmod/lib/ --extra-cflags=-I/opt/x264_ttmod/include/ --extra-ldflags=-L/opt/x264_ttmod/lib/ --extra-ldflags=-I/opt/x264_ttmod/include/ Dependant & new codecs were installed prior via ./configure --prefix=/opt/x264_ttmod --enable-shared && sudo make && sudo make install – nightcrawler Dec 27 '12 at 6:58
@nightcrawler It would have been easier to read as an update to your question instead of a comment and I almost mentioned that in my previous comment but thought it was unnecessary. – LordNeckbeard Dec 27 '12 at 7:26
Don't give up just tell me the flags that I have to pass to ./configure to make it blind towards /usr/... – nightcrawler Dec 28 '12 at 9:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.