Log in

View Full Version : ffmpeg can't find my libs


bnshrdr
21st July 2009, 20:07
I hope I'm posting this in the correct forum.

I am using Ubuntu (Jaunty) and want to compile all of my A/V libs myself (libfaad/libfaac/libx264/libxvid/etc). I have done this successfully but the problem is when I am compiling ffmpeg, it doesn't know where to find these compiled libs. I have read through the readme, command line switches, tutorials, but I don't know where to tell ffmpeg where the libs are.

It's kind of like when compiling with gcc/g++ when you want to tell it where headers/libs are (-I -L switches).

I'm sure it is something simple, but if someone can point me in the right direction I would be grateful. Thanks!

nm
22nd July 2009, 00:09
I am using Ubuntu (Jaunty) and want to compile all of my A/V libs myself (libfaad/libfaac/libx264/libxvid/etc). I have done this successfully but the problem is when I am compiling ffmpeg, it doesn't know where to find these compiled libs. I have read through the readme, command line switches, tutorials, but I don't know where to tell ffmpeg where the libs are.
You should install those self-built libraries to the system. Then FFmpeg's configure script picks them up automatically and you can use shared libraries instead of statically linked.

To make removing and updating custom libraries or programs easier, use checkinstall to create deb packages and automatically register them to the package management system:
sudo checkinstall -D make install

WalterK
22nd July 2009, 06:34
you are in Jaunty so use this tutorial on how to compile svn ffmpeg with svn libx264 and some but not all optional libraries, http://ubuntuforums.org/showthread.php?t=786095
If there are other libraries you need install them via synaptic before going off and compiling them yourself (less hassle for you) also remember when linking libraries you will need the developer headers e.g. libfaad-dev for libfaad support in ffmpeg/ffplay.
Fastest way to install all the needed dependencies for ffmpeg including the libraries is
sudo apt-get build-dep ffmpeg then compile your svn with all the needed libraries selected via the configure script
Edit
The latest ffmpeg for jaunty is the newest stable build 0.5 so you could use that HOWEVER by default ubuntu for legal reasons doesnt have the mpeg4 etc encoders installed.
Follow this guide to get it working http://ubuntuforums.org/showthread.php?t=1117283

Henrikx
22nd July 2009, 09:23
I have uninstalled all "unstripped" Libs only "normal" Libs are installed.

libavcodec
libavdevice
libavformat
libavutil
libpostproc
libswscale

svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
sudo apt-get build-dep ffmpeg

cd /ffmpeg
sudo ldconfig

./configure --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-libdc1394

make
sudo checkinstall --pkgname=ffmpeg --pkgversion "3:0.svn`date +%Y%m%d`-12ubuntu3" --default


FFmpeg version SVN-r19471, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-libdc1394
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.32. 0 / 52.32. 0
libavformat 52.36. 0 / 52.36. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Jul 20 2009 21:53:30, gcc: 4.3.3

WalterK
22nd July 2009, 12:43
Give encoding a try and see if it works.
Seems to look ok you have mpeg4 encoding as well as vorbis and theora, although i see the version 3 gpl license was not enabled but thats not too important
Heres mine but i added more libraries for my compile of ffmpeg to make it more complete something that is not necessary.

FFmpeg version git-68dbe30, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --prefix=/usr --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-avfilter --enable-pthreads --enable-x11grab --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.32. 0 / 52.32. 0
libavformat 52.36. 0 / 52.36. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 0. 5. 0 / 0. 5. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Jul 18 2009 13:50:45, gcc: 4.3.3

Henrikx
22nd July 2009, 13:52
FFmpeg version SVN-r19483, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-avfilter --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-libdc1394
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.32. 0 / 52.32. 0
libavformat 52.36. 0 / 52.36. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 0. 5. 0 / 0. 5. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Jul 22 2009 14:41:06, gcc: 4.3.3

Now with --enable-version3 --enable-avfilter

x264 = core:68 r1184 88b35c2

bnshrdr
22nd July 2009, 21:41
Thanks for the replies but is what I guess I am ultimately asking is whether or not I can tell ffmpeg to use relative paths rather than paths that are involved in the system. I have even tried adding the directory where I am going to install to the PATH variable, but it still can't seem to find my libs.

For example:
/home/me/Desktop/ffmpeg/bin/x264
/home/me/Desktop/ffmpeg/bin/faac
/home/me/Desktop/ffmpeg/bin/xvid
/home/me/Desktop/ffmpeg/bin/faad

./configure --prefix=/home/me/Desktop/ffmpeg
This won't work. I have also tried adding "/home/me/Desktop/ffmpeg/bin" to PATH, but it still won't work.

I know this is possible because I know people run two version of the same program on the same machine. I just want to keep my stuff a little more organized. I'm not saying I will be keeping it on my desktop, but I just want to go the extra lengths of keeping my system spick and span.

WalterK
22nd July 2009, 22:54
Why cant you use default system libraries?
as far as i know (i am no ffmpeg compiling guru) you CAN have a local version of ffmpeg that is not installed in your /usr or /usr/local folder just make sure to set your prefix correctly
But external library headers for the encoders/decoders not so sure theres a way to point to the dev headers if its not installed system wide in /usr or /usr/local

bnshrdr
22nd July 2009, 23:03
I see what you're saying. I won't just have different versions of ffmpeg, but of my libs as well. Oh well, guess I'll have to stick to the standards.

shevegen
23rd July 2009, 01:18
Oh well, guess I'll have to stick to the standards.

First rule of Ubuntu - if you ever want to compile something, you are using the wrong distribution.

And I am not joking. Anyone that wants to compile anything shouldn't use Ubuntu. Because Ubuntu is meant to be a windows replacement.

WalterK
23rd July 2009, 03:32
Actually you can compile any software on ubuntu once you have the needed dependencies, what i wouldnt recommend is creating deb files unless you know what you are doing (checkinstall is a dirty way of doing this) because sometimes you go to install something off of the official repos and may run into dependency problems as ubuntu tries to stay within stable versions of whatever software it is and this usually means using stable older non svn/git versions.
Besides i think this may be a ffmpeg thing and not an ubuntu thing , not being able to point to say a specific folder where dev headers are compiled/installed when its not /usr or /usr/local.
Mplayer seems to do the same thing with the exception of the libdvdnav libdvdread headers etc.
I guess its possible to edit the configure script so the software looks in other folders besides /usr and /usr/local but thats beyond me.

Henrikx
23rd July 2009, 08:05
Anyone that wants to compile anything shouldn't use Ubuntu.
Humor?
I compile a lot of programs with Ubuntu.

Examples : x264, XVID, ffmpeg, MPlayer/mencoder, SMPlayer, sx264, lmms.