FORUMS: list search recent posts

path to libavformat after Mac Ports install?

COW Forums : FFmpeg

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
derek winnicki
path to libavformat after Mac Ports install?
on Mar 2, 2011 at 3:29:38 am

Hey all,

I've been banging my head against the wall over this issue for a while so any help would be amazing.
I'm trying to compile a C program which needs the libraries from FFMpeg. I'm using Snow Leopard and I installed FFMPeg using Mac Ports which put it into the directory opt/local/bin/ffmpeg, but it appears that the libraries are in opt/local/include because that is where I see the libavformat etc.. folders and also the header files in them.

This is what my Makefile looks like for the C program:

all:
gcc -Wall -g live_segmenter.c -o live_segmenter -I/opt/local/include -I/opt/local/bin -I/opt/local/include/libavutil -L/opt/local/include/libavformat -libavformat -L/opt/local/include -libavcodec -L/opt/local/include -libavutil -L/opt/local/include -libavcore -lbz2 -lm -lz -lfaac -lmp3lame -lx264 -lfaad -lpthread

clean:
rm -f live_segmenter


And when I try to compile it gives me this:


ld: library not found for -libavformat
collect2: ld returned 1 exit status
make: *** [all] Error 1


Another thing I should mention; When I look into opt/local/include/libavformat , there are only two .h files -- avformat.h and avio.h.

I came across a doxygen documentation for FFMpeg on the net and it looked as though libavformat had more then 20 or 30 header files in it.

Does any of this seem weird to anybody? Am I missing part of the libavformat library or am I just giving the makefile the wrong path?

Furthermore.. when I run ffmpeg at Terminal, it spits out this:

FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers
built on Feb 27 2011 18:27:43 with gcc 4.2.1 (Apple Inc. build 5664)
configuration: --prefix=/opt/local --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-avfilter-lavf --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libfaad --enable-libxvid --enable-libx264 --enable-libvpx --enable-libspeex --mandir=/opt/local/share/man --enable-shared --enable-pthreads --disable-indevs --cc=/usr/bin/gcc-4.2 --arch=x86_64
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 1.11. 0 / 1.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'


which gives me the impression that I in fact DO have these libraries. Please help!


Return to posts index

Michael Rampe
Re: path to libavformat after Mac Ports install?
on Mar 3, 2011 at 9:56:27 pm

[derek winnicki] "Am I missing part of the libavformat library or am I just giving the makefile the wrong path?"

[derek winnicki] "which gives me the impression that I in fact DO have these libraries. Please help!"

Not really sure *where* Mac ports puts all of it's stuff. Try to compile FFmpeg from latest source. This way you will definately know where they are.

Michael


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]