tags:

views:

79

answers:

2

I need to build ffmpeg for Mac for converting MOV to FLV in a Java application. I made and installed LAME and then FFMPEG, but I'm confused as to what file I should grab to include with the Java application. What is the binary file? The previous version that I grabbed from the source of ffmpegX was 10mb in size, but the file that's in my /usr/local/bin is only 0.1mb. Is that the right file, or what do I need to include?

I'm not too savvy with anything that needs to be typed into Terminal, so excuse the lack of technical jargon!

+1  A: 

I'm not a Mac expert by far, but I've a few tips. If you build the lib with dynamic linkage and the the other one was statically linked that might explain the size difference.

As for the location, what did you use? MacPorts, Fink, or source? If you built from source depends what you used :) MacPorts and Fink have their specific location for binaries (I don't remember anymore, but the documentation should have the info, otherwise the big G has it ;)

pszilard
+1  A: 

Short answer: that file in /usr/local/bin is either the real binary or a soft link to the real binary. If you run ls -l /usr/local/bin any links will be displayed with an arrow to their target location. But pszilard is probably right, that file might be the actual binary, which was dynamically linked to library code.

Long answer: If you compiled from source, then you ran the following three commands

./configure
make
make install

The first one creates a configuration file called config.mak. Near the top of that file, you'll see a lines similar to the following:

prefix=/usr/local
LIBDIR=$(DESTDIR)${prefix}/lib
SHLIBDIR=$(DESTDIR)${prefix}/lib
INCDIR=$(DESTDIR)${prefix}/include
BINDIR=$(DESTDIR)${prefix}/bin

DESTDIR is optional; it's irrelevant unless you ran make install with an additional argument. BINDIR is the actual install location. On my system (snow leopard) that was /usr/local/bin/.

If you're still having trouble, just don't install the build. If you run

make clean
make

The binary will be in your build folder.

Don't use MacPorts or Fink. You'll be happier in the long run if you compile from source yourself. If you insist on using a package manager, try Homebrew http://mxcl.github.com/homebrew/.

AndrewF
Just wondering what do you do if you want a bunch of gnu tools, also to use some of them instead of the Mac version (e.g. ls)? In this case compiling all dependencies manually one-by-one would be a pain. Does homebrew have dependency management?
pszilard
I'm not sure, I haven't used homebrew myself. I had enough bad experiences with MacPorts to switch to manual compiles and haven't had sufficient motivation to switch to something more automated.
AndrewF