LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problem with --enable-libx264 option in ffmpeg (https://www.linuxquestions.org/questions/linux-newbie-8/problem-with-enable-libx264-option-in-ffmpeg-822156/)

sumeet inani 07-26-2010 01:47 AM

problem with --enable-libx264 option in ffmpeg
 
I am using ubuntu 8.04.
i unzipped ffmpeg-checkout-2010-06-05
Then
Code:

$./configure --enable-gpl --enable-postproc --enable-swscale --enable-pthreads --enable-x11grab --enable-libdc1394 --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree
went well.
Actually I am trying to build most powerful ffmpeg able to transcode any media format file.
'Make' gives following error
Code:

$time make
CC        ffmpeg.o
ffmpeg.c: In function ‘new_audio_stream’:
ffmpeg.c:673: warning: ‘best’ may be used uninitialized in this function
ffmpeg.c:673: note: ‘best’ was declared here
CC        cmdutils.o
LD        ffmpeg_g
/home/lxuser/tarball/ffmpeg-checkout-2010-06-05/libavcodec/libavcodec.a(libx264.o): In function `X264_frame':
/home/lxuser/tarball/ffmpeg-checkout-2010-06-05/libavcodec/libx264.c:92: undefined reference to `x264_picture_init'
/home/lxuser/tarball/ffmpeg-checkout-2010-06-05/libavcodec/libx264.c:113: undefined reference to `x264_encoder_delayed_frames'
/home/lxuser/tarball/ffmpeg-checkout-2010-06-05/libavcodec/libavcodec.a(libx264.o): In function `X264_init':
/home/lxuser/tarball/ffmpeg-checkout-2010-06-05/libavcodec/libx264.c:300: undefined reference to `x264_encoder_open_98'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1

Though I have installed x264,libx264-dev via 'apt-get'

bathory 07-26-2010 02:46 AM

Hi,

My guess is that the installed libx264 is a bit old for the current version of ffmpeg.
Why don't you get the latest libx264 source and compile it using ""--enable-shared" option?

sumeet inani 07-26-2010 03:36 AM

Currently I have also installed x264-snapshot-20100621-2245.tar.bz2 with "--enable-shared" option.

Still the output same as before.

bathory 07-26-2010 04:04 AM

Are you sure you're using the newly installed libx264?
If you didn't use a prefix when installing libx264, then it's installed in /usr/local/lib/libx264.so. You can use:
Code:

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
before compiling ffmpeg. Also don't forget to run "make clean" or "make distclean" before recompiling

Regards

sumeet inani 07-26-2010 04:33 AM

Yeah , I did after installing x264 tarball
Code:

$sudo ldconfig
$cd ~/tarball/ffmpeg-checkout-2010-06-05/
$make clean;
$export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
$./configure --enable-gpl --enable-postproc --enable-swscale --enable-pthreads --enable-x11grab --enable-libdc1394 --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree
$time make

Still same error.

bathory 07-26-2010 06:07 AM

Well it looks like you need a different version of x264 :banghead:
To verify, run
Code:

nm /usr/local/lib/libx264.a |grep x264_encoder_open
to see the exact symbol name.
In my case the above command gave x264_encoder_open_98 (the sources used were dated Jun 21)
After that I downloaded the latest x264 from git, compiled and I got x264_encoder_open_104
So download and compile x264-snapshot-20100621-2245.tar.bz2 and see if it helps

Regards

sumeet inani 07-26-2010 09:23 AM

When I ran
Code:

$ nm /usr/local/lib/libx264.a |grep x264_encoder_open
00002b10 T x264_encoder_open_98

So now i extracted the latest tarball of x264 i.e x264-snapshot-20100725-2245
Code:


$ cd x264-snapshot-20100725-2245/;./configure --enable-shared
./version.sh: line 2: git: command not found # was the same in case of x264-snapshot-20100621-2245
Platform:  X86
System:    LINUX
asm:        yes
avs:        no
lavf:      yes
ffms:      no
gpac:      no
pthread:    yes
filters:    resize crop select_every
debug:      no
gprof:      no
PIC:        no
shared:    yes
visualize:  no
bit depth:  8

You can run 'make' or 'make fprofiled' now.
$ time make;
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o common/mc.o common/mc.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o common/predict.o common/predict.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o common/pixel.o common/pixel.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o common/macroblock.o common/macroblock.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o common/frame.o common/frame.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o common/dct.o common/dct.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o common/cpu.o common/cpu.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o common/cabac.o common/cabac.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o common/common.o common/common.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o common/mdate.o common/mdate.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o common/rectangle.o common/rectangle.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o common/set.o common/set.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o common/quant.o common/quant.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o common/deblock.o common/deblock.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o common/vlc.o common/vlc.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o common/mvpred.o common/mvpred.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o common/bitstream.o common/bitstream.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o encoder/analyse.o encoder/analyse.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o encoder/me.o encoder/me.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o encoder/ratecontrol.o encoder/ratecontrol.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o encoder/set.o encoder/set.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o encoder/macroblock.o encoder/macroblock.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o encoder/cabac.o encoder/cabac.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o encoder/cavlc.o encoder/cavlc.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o encoder/encoder.o encoder/encoder.c
encoder/encoder.c: In function ‘x264_slice_write’:
encoder/encoder.c:1819: warning: ‘bs_bak.i_bits_encoded’ may be used uninitialized in this function
encoder/encoder.c:1819: warning: ‘bs_bak.i_left’ may be used uninitialized in this function
encoder/encoder.c:1819: warning: ‘bs_bak.cur_bits’ may be used uninitialized in this function
encoder/encoder.c:1819: warning: ‘bs_bak.p_end’ may be used uninitialized in this function
encoder/encoder.c:1819: warning: ‘bs_bak.p’ may be used uninitialized in this function
encoder/encoder.c:1819: warning: ‘bs_bak.p_start’ may be used uninitialized in this function
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o encoder/lookahead.o encoder/lookahead.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o common/threadpool.o common/threadpool.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o common/x86/mc-c.o common/x86/mc-c.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o common/x86/predict-c.o common/x86/predict-c.c
yasm -O2 -f elf -Icommon/x86/ -o common/x86/const-a.o common/x86/const-a.asm
yasm -O2 -f elf -Icommon/x86/ -o common/x86/cabac-a.o common/x86/cabac-a.asm
yasm -O2 -f elf -Icommon/x86/ -o common/x86/dct-a.o common/x86/dct-a.asm
yasm -O2 -f elf -Icommon/x86/ -o common/x86/deblock-a.o common/x86/deblock-a.asm
yasm -O2 -f elf -Icommon/x86/ -o common/x86/mc-a.o common/x86/mc-a.asm
yasm -O2 -f elf -Icommon/x86/ -o common/x86/mc-a2.o common/x86/mc-a2.asm
yasm -O2 -f elf -Icommon/x86/ -o common/x86/pixel-a.o common/x86/pixel-a.asm
yasm -O2 -f elf -Icommon/x86/ -o common/x86/predict-a.o common/x86/predict-a.asm
yasm -O2 -f elf -Icommon/x86/ -o common/x86/quant-a.o common/x86/quant-a.asm
yasm -O2 -f elf -Icommon/x86/ -o common/x86/sad-a.o common/x86/sad-a.asm
yasm -O2 -f elf -Icommon/x86/ -o common/x86/cpu-a.o common/x86/cpu-a.asm
yasm -O2 -f elf -Icommon/x86/ -o common/x86/dct-32.o common/x86/dct-32.asm
yasm -O2 -f elf -Icommon/x86/ -o common/x86/bitstream-a.o common/x86/bitstream-a.asm
yasm -O2 -f elf -Icommon/x86/ -o common/x86/pixel-32.o common/x86/pixel-32.asm
gcc -shared -o libx264.so.104 common/mc.o common/predict.o common/pixel.o common/macroblock.o common/frame.o common/dct.o common/cpu.o common/cabac.o common/common.o common/mdate.o common/rectangle.o common/set.o common/quant.o common/deblock.o common/vlc.o common/mvpred.o common/bitstream.o encoder/analyse.o encoder/me.o encoder/ratecontrol.o encoder/set.o encoder/macroblock.o encoder/cabac.o encoder/cavlc.o encoder/encoder.o encoder/lookahead.o common/threadpool.o common/x86/mc-c.o common/x86/predict-c.o common/x86/const-a.o common/x86/cabac-a.o common/x86/dct-a.o common/x86/deblock-a.o common/x86/mc-a.o common/x86/mc-a2.o common/x86/pixel-a.o common/x86/predict-a.o common/x86/quant-a.o common/x86/sad-a.o common/x86/cpu-a.o common/x86/dct-32.o common/x86/bitstream-a.o common/x86/pixel-32.o  -Wl,-soname,libx264.so.104 -lm -lpthread -s
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o x264.o x264.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o input/input.o input/input.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o input/timecode.o input/timecode.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o input/raw.o input/raw.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o input/y4m.o input/y4m.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o output/raw.o output/raw.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o output/matroska.o output/matroska.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o output/matroska_ebml.o output/matroska_ebml.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o output/flv.o output/flv.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o output/flv_bytestream.o output/flv_bytestream.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o filters/filters.o filters/filters.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o filters/video/video.o filters/video/video.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o filters/video/source.o filters/video/source.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o filters/video/internal.o filters/video/internal.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o filters/video/resize.o filters/video/resize.c
filters/video/resize.c: In function ‘round_dbl’:
filters/video/resize.c:181: warning: declaration of ‘truncate’ shadows a global declaration
/usr/include/unistd.h:952: warning: shadowed declaration is here
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o filters/video/cache.o filters/video/cache.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o filters/video/fix_vfr_pts.o filters/video/fix_vfr_pts.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o filters/video/select_every.o filters/video/select_every.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o filters/video/crop.o filters/video/crop.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o input/thread.o input/thread.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include  -s -fomit-frame-pointer -fno-tree-vectorize  -c -o input/lavf.o input/lavf.c
ar rc libx264.a common/mc.o common/predict.o common/pixel.o common/macroblock.o common/frame.o common/dct.o common/cpu.o common/cabac.o common/common.o common/mdate.o common/rectangle.o common/set.o common/quant.o common/deblock.o common/vlc.o common/mvpred.o common/bitstream.o encoder/analyse.o encoder/me.o encoder/ratecontrol.o encoder/set.o encoder/macroblock.o encoder/cabac.o encoder/cavlc.o encoder/encoder.o encoder/lookahead.o common/threadpool.o common/x86/mc-c.o common/x86/predict-c.o common/x86/const-a.o common/x86/cabac-a.o common/x86/dct-a.o common/x86/deblock-a.o common/x86/mc-a.o common/x86/mc-a2.o common/x86/pixel-a.o common/x86/predict-a.o common/x86/quant-a.o common/x86/sad-a.o common/x86/cpu-a.o common/x86/dct-32.o common/x86/bitstream-a.o common/x86/pixel-32.o
ranlib libx264.a
gcc -o x264 x264.o input/input.o input/timecode.o input/raw.o input/y4m.o output/raw.o output/matroska.o output/matroska_ebml.o output/flv.o output/flv_bytestream.o filters/filters.o filters/video/video.o filters/video/source.o filters/video/internal.o filters/video/resize.o filters/video/cache.o filters/video/fix_vfr_pts.o filters/video/select_every.o filters/video/crop.o input/thread.o input/lavf.o libx264.a -L.  -pthread -L/usr/local/lib -lavformat -lavcodec -lz -lfaac -lfaad -lgsm -lmp3lame -ltheoraenc -ltheoradec -lvorbisenc -lvorbis -logg -lx264 -lm -lxvidcore -ldc1394_control -lraw1394 -lX11 -lXext -lXfixes -ldl -lswscale -lavutil    -lm -lpthread -s
/usr/local/lib/libavcodec.a(libx264.o): In function `X264_init':
/home/lxuser/tarball/ffmpeg-export-2010-06-05/libavcodec/libx264.c:300: undefined reference to `x264_encoder_open_98'
collect2: ld returned 1 exit status
make: *** [x264] Error 1

real        0m26.651s
user        0m24.342s
sys        0m0.872s


bathory 07-26-2010 12:58 PM

Well, I don't get it!
Quote:

/usr/local/lib/libavcodec.a(libx264.o): In function `X264_init':
/home/lxuser/tarball/ffmpeg-export-2010-06-05/libavcodec/libx264.c:300: undefined reference to `x264_encoder_open_98'
collect2: ld returned 1 exit status
make: *** [x264] Error 1
How did this came out
Can you move /home/lxuser/tarball/ffmpeg-export-2010-06-05 and /usr/local/lib/libavcodec.* in /tmp, make distclean and recompile x264

Andrew Benton 07-26-2010 06:36 PM

Quote:

Originally Posted by sumeet inani (Post 4045766)
libx264.so.104

That looks a bit odd. Where did you get libx264 from? I use a git pull from about 6 weeks ago and it installs /usr/lib/libx264.so.98
Quote:

undefined reference to `x264_encoder_open_98'
Maybe you have the wrong version of x264 installed?

I've just tried compiling the current x264 and it now installs libx264.so.104, like you have. Maybe your ffmpeg source is out of date?

sumeet inani 07-26-2010 11:33 PM

As you said I uninstalled ffmpeg as well as x264 & deleted extracted tarball.

Now installing x264-snapshot-20100725-2245 went well.
Now with 'make' of ffmpeg-checkout-2010-06-05 I got error
Code:

ffmpeg.c: In function ‘new_audio_stream’:
ffmpeg.c:673: warning: ‘best’ may be used uninitialized in this function
ffmpeg.c:673: note: ‘best’ was declared here
CC        cmdutils.o
LD        ffmpeg_g
/home/lxuser/tarball/ffmpeg-checkout-2010-06-05/libavcodec/libavcodec.a(libx264.o): In function `X264_frame':
/home/lxuser/tarball/ffmpeg-checkout-2010-06-05/libavcodec/libx264.c:92: undefined reference to `x264_picture_init'
/home/lxuser/tarball/ffmpeg-checkout-2010-06-05/libavcodec/libx264.c:113: undefined reference to `x264_encoder_delayed_frames'
/home/lxuser/tarball/ffmpeg-checkout-2010-06-05/libavcodec/libavcodec.a(libx264.o): In function `X264_init':
/home/lxuser/tarball/ffmpeg-checkout-2010-06-05/libavcodec/libx264.c:300: undefined reference to `x264_encoder_open_104'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1

same thing happened with ffmpeg-0.6 & even ffmpeg-export-2010-07-27
I like tarballs because you can use them on offline computers.

sumeet inani 07-27-2010 12:43 AM

Now I am surprised
I ran
Code:


$git clone git://git.videolan.org/x264.git
;cd x264;./configure;make;sudo make install;sudo ldconfig;cd .. #everything goes well
$git clone git://git.ffmpeg.org/ffmpeg/;cd ffmpeg;git clone git://git.ffmpeg.org/libswscale/
$ ./configure --enable-gpl --enable-postproc --enable-swscale --enable-pthreads --enable-x11grab --enable-libdc1394 --enable-libfaac  --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree;make;

something something without error
libavutil/random_seed.c: In function ‘get_generic_seed’:
libavutil/random_seed.c:51: warning: suggest parentheses around && within ||
CC        libavutil/rational.o
CC        libavutil/rc4.o
CC        libavutil/sha.o
CC        libavutil/tree.o
CC        libavutil/utils.o
AR        libavutil/libavutil.a
CC        ffmpeg.o
CC        cmdutils.o
LD        ffmpeg_g
/home/lxuser/tarball/ffmpeg/libavcodec/libavcodec.a(libx264.o): In function `X264_frame':
/home/lxuser/tarball/ffmpeg/libavcodec/libx264.c:92: undefined reference to `x264_picture_init'
/home/lxuser/tarball/ffmpeg/libavcodec/libx264.c:113: undefined reference to `x264_encoder_delayed_frames'
/home/lxuser/tarball/ffmpeg/libavcodec/libavcodec.a(libx264.o): In function `X264_init':
/home/lxuser/tarball/ffmpeg/libavcodec/libx264.c:300: undefined reference to `x264_encoder_open_104'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1


knudfl 07-27-2010 12:56 AM

Quote:

I like tarballs because you can use them on offline computers.
An application downloaded with git, svn, cvs, bzr, hg
can be made into a tarball too :

tar -cf ffmpeg.tar ffmpeg/

gzip ffmpeg.tar ( or bzip2 ffmpeg.tar )
..

sumeet inani 07-27-2010 01:31 AM

I will try that knudfl.
my question was i installed latest x264 (via git) . All went well.
then ffmpeg (via git) gave error during make.

bathory 07-27-2010 04:45 AM

@OP

FYI, I've just done what you did in your previous post:
I've downloaded x264, ffmpeg and libswscale from git, compile and install x264 using "--enable-shared" and then compiled and install ffmpeg using the same options as you (except libdc1394 and libgsm as I don't have these libraries)
Everything ended up OK, so I guess your build is using wrong x264 libraries and/or header files
Set LD_LIBARY_PATH to just /usr/local/lib and add the same directory as the 1st entry in /etc/ld.so.conf. Then run ldconfig and try to build again ffmpeg (after running of course make distclean)

Regards

sumeet inani 07-27-2010 06:09 AM

This time I
(1)enabled shared option in x264
(2)'export LD_LIBARY_PATH=/usr/local/lib' before ffmpeg configure
(3)removed libdc1394 and libgsm from configure options
Code:

$cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf
$ ls /etc/ld/so.conf.d
i486-linux-gnu.conf  libc.conf
$ cat /etc/ld.so.conf.d/libc.conf
# libc default configuration
/usr/local/lib
$ cat /etc/ld.so.conf.d/i486-linux-gnu.conf
# Multiarch support
/lib/i486-linux-gnu
/usr/lib/i486-linux-gnu

Let us see !

Code:

CC        ffmpeg.o
CC        cmdutils.o
LD        ffmpeg_g
/home/lxuser/tarball/ffmpeg/libavcodec/libavcodec.a(libx264.o): In function `X264_frame':
/home/lxuser/tarball/ffmpeg/libavcodec/libx264.c:92: undefined reference to `x264_picture_init'
/home/lxuser/tarball/ffmpeg/libavcodec/libx264.c:113: undefined reference to `x264_encoder_delayed_frames'
/home/lxuser/tarball/ffmpeg/libavcodec/libavcodec.a(libx264.o): In function `X264_init':
/home/lxuser/tarball/ffmpeg/libavcodec/libx264.c:300: undefined reference to `x264_encoder_open_104'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1

Nothing different


All times are GMT -5. The time now is 11:42 AM.