Using ffmpeg (libavcodec and libavformat) libraries...
Hi,
I am working on some code which uses ffmpeg sourcecode. To compile it I use Code:
g++ -g -O3 -Wall -g -I. -I./ -I./libavcodec -I./libavformat -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o output_example.o output_example.cpp The only place where ffmpeg is used is in output_example.cpp Code:
#include <stdlib.h> Regards, Unpredictable. |
installing in the same directory as the FFMPEG source?? :confused: erm.. why?
you need to have the matching -devel rpm for any package against which you need to compile software. you won't need the source code. just install it, compile your software in a dedicated directory somewhere, and as long as you've installed the necessary packages and your include parameters for gcc are correct it will find the ffmpeg headers just fine. |
Thanks for the reply acid. I figured out that myself just now. I installed ffmpeg-devel.
And now I use these commands to compile... g++ -g -O3 -Wall -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o robovision.o robovision.cpp g++ -g -O3 -Wall -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o output_example.o output_example.cpp g++ -Wl,--warn-common -rdynamic -g -o output_example output_example.o -lavformat -lavcodec -lavcodec -lm -lz -ldl robovision.o -ljpeg and #include <ffmpeg/avformat.h> in the output_example.cpp file and it works just fine. I really don't know how to make a makefile. If you could make a makefile out of these random commands so that it compiles only when required and only the components which are changed, then please do it for me. Regards, Anurag. |
All times are GMT -5. The time now is 03:27 PM. |