[Libav-user] libav-user list post!

thanh nhan thanh nhan nhanndt_87 at yahoo.com
Mon Mar 4 09:57:48 CET 2013

Dear all,
I configured like this:
    ./configure --enable-gpl --enable-libfdk_aac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264
that i followed the link : http://ffmpeg.org/trac/ffmpeg/wiki/CentosCompilationGuide.
I got the same size when linking without -g option. I also tried with static and dynamic link but the result is still same.
All of ffmpeg functions i used come from 2 examples decoding_encoding.c and resampling_audio.c provided in /doc/example directory of ffmpeg.
whenever i remove any library specified in the linking command, the errors appear. For example:
If i remove -lavcodec, the error is:
g++ -o x2pcm main.o util.o -L/usr/lib64 -L/usr/local/lib -Wl,-Bstatic -lavformat -lavutil -lswresample -Wl,-Bdynamic -lvorbis -lx264 -lmp3lame -logg -lvorbisenc -lvpx -lz -lpthread
/usr/local/lib/libavformat.a(rl2.o): In function `rl2_read_packet':
/home/nhanndt/ffmpeg-source/ffmpeg/libavformat/rl2.c:245: undefined reference to `av_free_packet'
/usr/local/lib/libavformat.a(sbgdec.o): In function `sbg_read_packet':
/home/nhanndt/ffmpeg-source/ffmpeg/libavformat/sbgdec.c:1456: undefined reference to `av_new_packet'
/usr/local/lib/libavformat.a(swfdec.o): In function `swf_read_packet':
/home/nhanndt/ffmpeg-source/ffmpeg/libavformat/swfdec.c:440: undefined reference to `av_new_packet'
/home/nhanndt/ffmpeg-source/ffmpeg/libavformat/swfdec.c:352: undefined reference to `av_new_packet'
/home/nhanndt/ffmpeg-source/ffmpeg/libavformat/swfdec.c:363: undefined reference to `av_packet_new_side_data'
and so on...

 From: RenE J.V. Bertin <rjvbertin at gmail.com>
To: "This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter." <libav-user at ffmpeg.org> 
Sent: Monday, March 4, 2013 5:22 PM
Subject: Re: [Libav-user] libav-user list post!

On 4 Mar 2013, at 07:07, thanh nhan thanh nhan <nhanndt_87 at yahoo.com> wrote:

Dear libav-user list admin,
>I wanna post the following message on thi mailing list: 
>I am developing pcm decoding using ffmpeg libraries in Linux. I successfully built my program. The problem is the executable file size is very big ( ~ 63Mb) even though i just used few functions on audio decoding. I wanna downsize the executable file as much as possible. I think the problem is on the linking process. I made the Makefile with: 
>     "g++ -L/usr/lib64 -L/usr/local/lib -g -o x2pcm main.o util.o -lavformat -lavcodec -lavutil -lswresample -lvorbis -lx264 -lmp3lame -logg -lvorbisenc -lvpx -lpthread -lz" 
>Is there any suggestion for me to solve this problem?
>Thanks in advance!

What is the size you get when linking without the -g option? Also, are you using static or shared libraries, and why are you linking in video libraries if you're only doing decoding? 

Libav-user mailing list
Libav-user at ffmpeg.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20130304/2a76b3b2/attachment.html>

More information about the Libav-user mailing list