Page 1 of 1
Trying to compile VLC 0.8.6e with ffmpeg
Posted: 21 Mar 2008 21:28
by Pericles
My system is Ubuntu Feisty Fawn and I'm trying to compile the latest VLC build.
First I compiled latest revision of FFmpeg. It only gave me some trouble with the option --enable-libfaac, since I could not get installed libfaac-dev on my system (incompatibility with installed libafaac0).
Anyway, I don't think this makes any difference, the thing is I tried to compile with:
./configure --enable-v4l --enable-pvr
This exited with the following error:
configure: error: Missing header filconfigure: error: Missing header file ffmpeg/avcodec.h.
Ok, I then added the option:
--with-ffmpeg-tree=/var/tmp/ffmpeg
then eventually got this error:
checking for libavcodec.a in /var/tmp/ffmpeg... no
configure: error: cannot find /var/tmp/ffmpeg/libavcodec/libavcodec.a, make sure you compiled libavcodec in /var/tmp/ffmpeg
Ok, then, I realized indeed this library was not at this place, but in /usr/local/lib/, so I copied it from there and repeated the same config command, i.e.:
./configure --enable-v4l --enable-pvr --with-ffmpeg-tree=/var/tmp/ffmpeg
In the end, it exited with a new error:
checking for libavcodec.a in /var/tmp/ffmpeg... no
configure: error: cannot find libpostproc.a in /var/tmp/ffmpeg/libavcodec/libpostproc/. Make sure you configured ffmpeg with --enable-pp
Still it says it cannot check libavcodec.a, and now complains about libpostproc.a as well.
And not, I could not configure ffmpeg with --enable-pp because this flag does not exist anymore!
So what's wrong here? Somehow this configure file has errors? Or maybe latest versions of ffmpeg and vlc are not matching? Or is this simply some option I am missing for the configure?
Re: Trying to compile VLC 0.8.6e with ffmpeg
Posted: 21 Mar 2008 23:10
by belZe
Code: Select all
bjoern@server3:~/src/ffmpeg$ ./configure --help | grep postproc
--enable-postproc enable GPLed postprocessing support [default=no]
There you go
Note that the ffmpeg in /var/tmp/ffmpeg (you specified in --with-ffmpeg-tree) must be built. Thats why the libavcodec.a isn't there. Prevent copying libs/headers from other/different built versions to your vanilla sources.
Re: Trying to compile VLC 0.8.6e with ffmpeg
Posted: 22 Mar 2008 13:35
by Pericles
Thanks for your answer, belZe.
Unfortunately, there is no --enable-postproc option in this configure script. Maybe it was the case in previous versions.
Also, I must say ffmpeg was built, but libraries like libavcodec.a or libavformat.a have been installed on /usr/local/lib.
I think there is some mess with the way VLC expects to look for ffmpeg libraries, there is something that does not match...
Re: Trying to compile VLC 0.8.6e with ffmpeg
Posted: 26 Mar 2008 22:51
by hp_vlc
Hi Pericles,
I can see exactly as what you saw when I compile VLC 0.8.6e with ffmpeg under Debian.
Re: Trying to compile VLC 0.8.6e with ffmpeg
Posted: 27 Mar 2008 09:46
by yohann.martineau
did you try the following options:
1) configure ffmpeg with --prefix=/var/tmp/ffmpeg, then make and make install,
Then using --with-ffmpeg-tree=/var/tmp/ffmpeg for vlc
OR
2) configure ffmpeg with default destination directories as a user present in staff group (if you're using debian)
or just make install as root for ffmeg
and then using default locations for vlc
before doing so, you have to check that old libraries are not conflicting with your up-to-date libraries
Re: Trying to compile VLC 0.8.6e with ffmpeg
Posted: 27 Mar 2008 21:04
by hp_vlc
Thanks, yohann, for your help.
It doesn't help with specifying --prefix=/home/hp/vlc/ffmpeg. It still complains that ffmpeg/avcodec.h cannot be found.
I found the file avcodec.h from ffmpeg/libavcodec subdirectory and copy it under ffpmeg/
Then the ./configure under vlc-0.8.6e/ becomes
"checking for libavcodec.a in /home/hp/vlc/ffmpeg... no
configure: error: cannot find libpostproc.a in
/home/hp/vlc/ffmpeg/libavcodec/libpostproc/. Make sure you configured
ffmpeg with --enable-pp
"
Since "--enable-pp" is not acceptable to VLC version 0.8.6e as Pericles said, I tried --enable-postproc. It is acceptable but the message says that post processing need to enable gpl.
See below for the final command I used:
debian:/home/hp/vlc/ffmpeg# ./configure --prefix=/home/hp/vlc/ffmpeg
--enable-gpl --enable-postproc
After "make" and "make install", come to the vlc-0.8.6e/ directory
debian:/home/hp/vlc/vlc-0.8.6e# ./configure --prefix=/usr
--enable-wxwindows --enable-debug --enable-ffmpeg --disable-libmpeg2
--disable-wxwidgets --disable-skins2
--with-ffmpeg-tree=/home/hp/vlc/ffmpeg
# ./compile
I can get the executalbe vlc now.
One more question to ask, where to find a mpeg4 file from websites? It seems easier to find a utility such as a converter, etc. than just a simple *.mpeg4 file. Thanks.
Re: Trying to compile VLC 0.8.6e with ffmpeg
Posted: 28 Mar 2008 10:37
by yohann.martineau
i think you should be happy with that:
http://samples.mplayerhq.hu/MPEG-4/
Re: Trying to compile VLC 0.8.6e with ffmpeg
Posted: 31 Mar 2008 23:54
by kobe08
with similar steps to the ones described by
hp_vlc i got:
Code: Select all
(...)
*** Warning: Linking the shared library libffmpeg_plugin.la against the
*** static library /home/vlc/ffmpeg/libavformat/libavformat.a is not portable!
*** Warning: Linking the shared library libffmpeg_plugin.la against the
*** static library /home/vlc/ffmpeg/libavcodec/libavcodec.a is not portable!
*** Warning: Linking the shared library libffmpeg_plugin.la against the
*** static library /home/vlc/ffmpeg/libavutil/libavutil.a is not portable!
*** Warning: Linking the shared library libffmpeg_plugin.la against the
*** static library /home/vlc/ffmpeg/libpostproc/libpostproc.a is not portable!
gcc -std=gnu99 -shared .libs/libffmpeg_plugin_la-ffmpeg.o .libs/libffmpeg_plugin_la-video.o .libs/libffmpeg_plugin_la-audio.o .libs/libffmpeg_plugin_la-video_filter.o .libs/libffmpeg_plugin_la-deinterlace.o .libs/libffmpeg_plugin_la-chroma.o .libs/libffmpeg_plugin_la-encoder.o .libs/libffmpeg_plugin_la-postprocess.o .libs/libffmpeg_plugin_la-demux.o .libs/libffmpeg_plugin_la-mux.o .libs/libffmpeg_plugin_la-scale.o -Wl,--rpath -Wl,/home/vlc/src/.libs ../../../src/.libs/libvlc.so -lpthread /home/vlc/ffmpeg/libavformat/libavformat.a /home/vlc/ffmpeg/libavcodec/libavcodec.a /home/vlc/ffmpeg/libavutil/libavutil.a -lz -ldl -L/home/vlc/ffmpeg/libpostproc /home/vlc/ffmpeg/libpostproc/libpostproc.a -lm -mtune=pentium2 -Wl,-z -Wl,defs -Wl,-soname -Wl,libffmpeg_plugin.so -o .libs/libffmpeg_plugin.so
.libs/libffmpeg_plugin_la-scale.o: In function `CloseScaler__0_9_0j':
scale.c:(.text+0x39): undefined reference to `sws_freeFilter'
.libs/libffmpeg_plugin_la-scale.o: In function `OpenScaler__0_9_0j':
scale.c:(.text+0x806): undefined reference to `sws_getDefaultFilter'
scale.c:(.text+0xb16): undefined reference to `sws_freeFilter'
collect2: ld returned 1 exit status
make[6]: *** [libffmpeg_plugin.la] Error 1
make[6]: Leaving directory `/home/vlc/modules/codec/ffmpeg'
make[5]: *** [all-modules] Error 1
make[5]: Leaving directory `/home/vlc/modules/codec/ffmpeg'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/vlc/modules/codec'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/vlc/modules/codec'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/vlc/modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/vlc'
make: *** [all] Error 2
root@kmobile:/home/vlc#
to configure ffmpeg i used:
./configure --enable-gpl --enable-postproc
to configure vlc i used:
./configure -prefix=/usr --enable-wxwindows --enable-debug --enable-ffmpeg --enable-gpl --enable-pp --enable-libvorbis --enable-libogg --enable-liba52 --enable-libdts --enable-dc1394 --enable-libgsm --disable-debug --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-xvid --enable-shared --with-ffmpeg-tree=/home/vlc/ffmpeg
with or without -prefix=/usr the result is the same... i just tried because i've seen it in a post above.
Does anyone knows what might be wrong??
Re: Trying to compile VLC 0.8.6e with ffmpeg
Posted: 01 Apr 2008 11:27
by yohann.martineau
i'm using debian etch, but maybe this can help, here is how i compiled vlc:
viewtopic.php?f=4&t=32290#p143839
Re: Trying to compile VLC 0.8.6e with ffmpeg
Posted: 01 Apr 2008 16:53
by kobe08
it's done! i don't know yet what i was doing different but it compiled and installed and runs.
this is what i get:
Code: Select all
root@kmobile:/home/vlc# ./vlc
***************************************************
*** glibc version with broken libintl detected. ***
*** Messages localization will be disabled. ***
***************************************************
VLC media player 0.9.0-git Grishenko
[00000001] main libvlc debug: VLC media player - version 0.9.0-git Grishenko - (c) 1996-2008 the VideoLAN team
[00000001] main libvlc debug: libvlc was configured with ./configure '--enable-ffmpeg' '--with-ffmpeg-libpostproc' '--with-ffmpeg-mp3lame' '--with-ffmpeg-zlib' '--with-ffmpeg-faac' '--enable-mostly-builtin' '--enable-dvb' '--disable-wxwidgets' '--disable-skins2' '--enable-debug' '--enable-wxwindows'
[00000001] main libvlc debug: translation test: code is "C"
[00000001] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
Remote control interface initialized. Type `help' for help.
how may i run this in graphical mode?
Re: Trying to compile VLC 0.8.6e with ffmpeg
Posted: 07 Apr 2008 09:13
by Pericles
Thanks for the hints, guys.
I have made some progress, by configuring FFmpeg like this:
./configure --enable-gpl --enable-shared --enable-pthreads --enable-postproc --enable-libmp3lame --enable-zlib --enable-libvorbis --enable-liba52 --enable-libgsm --disable-debug --enable-libfaad --enable-libxvid --enable-libx264
Then VLC like this:
./configure --enable-v4l --enable-pvr --enable-ffmpeg --with-ffmpeg-tree=/var/tmp/ffmpeg
However, the compilation eventually fails, showing this error:
gcc -Wsign-compare -Wall -pipe -o vlc vlc-vlc.o src/libvlc.a ./modules/misc/memcpy/libmemcpymmx.a ./modules/video_chroma/libi420_rgb_mmx.a ./modules/video_chroma/libi422_yuy2_mmx.a ./modules/video_chroma/libi420_ymga_mmx.a ./modules/video_chroma/libi420_yuy2_mmx.a ./modules/misc/memcpy/libmemcpymmxext.a ./modules/misc/memcpy/libmemcpy3dn.a ./modules/codec/ffmpeg/libffmpeg.a ./modules/stream_out/libstream_out_switcher.a -L/usr/local/lib -lrt -lpthread -ldl -L/var/tmp/ffmpeg/libavformat /var/tmp/ffmpeg/libavformat/libavformat.a -L/var/tmp/ffmpeg/libavcodec /var/tmp/ffmpeg/libavcodec/libavcodec.a -L/var/tmp/ffmpeg/libavutil /var/tmp/ffmpeg/libavutil/libavutil.a -lz -L/var/tmp/ffmpeg/libpostproc /var/tmp/ffmpeg/libpostproc/libpostproc.a -lm
/var/tmp/ffmpeg/libavcodec/libavcodec.a(liba52.o): In function `a52_decode_init':
liba52.c:(.text+0x19): undefined reference to `a52_init'
liba52.c:(.text+0x20): undefined reference to `a52_samples'
liba52.c:(.text+0x27): undefined reference to `a52_syncinfo'
liba52.c:(.text+0x2e): undefined reference to `a52_frame'
liba52.c:(.text+0x35): undefined reference to `a52_block'
liba52.c:(.text+0x3c): undefined reference to `a52_free'
/var/tmp/ffmpeg/libavcodec/libavcodec.a(libfaad.o): In function `faac_decode_init':
libfaad.c:(.text+0x34): undefined reference to `faacDecOpen'
libfaad.c:(.text+0x3b): undefined reference to `faacDecClose'
libfaad.c:(.text+0x42): undefined reference to `faacDecGetCurrentConfiguration'
libfaad.c:(.text+0x49): undefined reference to `faacDecSetConfiguration'
libfaad.c:(.text+0x50): undefined reference to `faacDecInit'
libfaad.c:(.text+0x57): undefined reference to `faacDecInit2'
libfaad.c:(.text+0x5e): undefined reference to `faacDecDecode'
libfaad.c:(.text+0x65): undefined reference to `faacDecGetErrorMessage'
libfaad.c:(.text+0x6a): undefined reference to `faacDecOpen'
/var/tmp/ffmpeg/libavcodec/libavcodec.a(libgsm.o): In function `libgsm_decode_frame':
libgsm.c:(.text+0x73): undefined reference to `gsm_decode'
libgsm.c:(.text+0x96): undefined reference to `gsm_decode'
libgsm.c:(.text+0xc0): undefined reference to `gsm_decode'
/var/tmp/ffmpeg/libavcodec/libavcodec.a(libgsm.o): In function `libgsm_close':
libgsm.c:(.text+0xf2): undefined reference to `gsm_destroy'
/var/tmp/ffmpeg/libavcodec/libavcodec.a(libgsm.o): In function `libgsm_encode_frame':
libgsm.c:(.text+0x177): undefined reference to `gsm_encode'
libgsm.c:(.text+0x192): undefined reference to `gsm_encode'
libgsm.c:(.text+0x1b1): undefined reference to `gsm_encode'
/var/tmp/ffmpeg/libavcodec/libavcodec.a(libgsm.o): In function `libgsm_init':
libgsm.c:(.text+0x1f1): undefined reference to `gsm_create'
libgsm.c:(.text+0x22d): undefined reference to `gsm_option'
/var/tmp/ffmpeg/libavcodec/libavcodec.a(libmp3lame.o): In function `MP3lame_encode_close':
libmp3lame.c:(.text+0x21): undefined reference to `lame_close'
/var/tmp/ffmpeg/libavcodec/libavcodec.a(libmp3lame.o): In function `MP3lame_encode_frame':
libmp3lame.c:(.text+0x8f): undefined reference to `lame_encode_buffer_interleaved'
libmp3lame.c:(.text+0x103): undefined reference to `lame_encode_buffer'
libmp3lame.c:(.text+0x27c): undefined reference to `lame_encode_flush'
/var/tmp/ffmpeg/libavcodec/libavcodec.a(libmp3lame.o): In function `MP3lame_encode_init':
libmp3lame.c:(.text+0x2cb): undefined reference to `lame_init'
libmp3lame.c:(.text+0x2e2): undefined reference to `lame_set_in_samplerate'
libmp3lame.c:(.text+0x2f3): undefined reference to `lame_set_out_samplerate'
libmp3lame.c:(.text+0x304): undefined reference to `lame_set_num_channels'
libmp3lame.c:(.text+0x316): undefined reference to `lame_set_quality'
libmp3lame.c:(.text+0x328): undefined reference to `lame_set_mode'
libmp3lame.c:(.text+0x34a): undefined reference to `lame_set_brate'
libmp3lame.c:(.text+0x362): undefined reference to `lame_set_bWriteVbrTag'
libmp3lame.c:(.text+0x381): undefined reference to `lame_set_disable_reservoir'
libmp3lame.c:(.text+0x38b): undefined reference to `lame_init_params'
libmp3lame.c:(.text+0x39d): undefined reference to `lame_get_framesize'
libmp3lame.c:(.text+0x3cb): undefined reference to `lame_set_brate'
libmp3lame.c:(.text+0x3dd): undefined reference to `lame_set_VBR'
libmp3lame.c:(.text+0x40f): undefined reference to `lame_set_VBR_q'
libmp3lame.c:(.text+0x41e): undefined reference to `lame_close'
/var/tmp/ffmpeg/libavcodec/libavcodec.a(libvorbis.o): In function `oggvorbis_encode_close':
libvorbis.c:(.text+0x28): undefined reference to `vorbis_analysis_wrote'
libvorbis.c:(.text+0x36): undefined reference to `vorbis_block_clear'
libvorbis.c:(.text+0x3e): undefined reference to `vorbis_dsp_clear'
libvorbis.c:(.text+0x46): undefined reference to `vorbis_info_clear'
/var/tmp/ffmpeg/libavcodec/libavcodec.a(libvorbis.o): In function `oggvorbis_encode_frame':
libvorbis.c:(.text+0xba): undefined reference to `vorbis_analysis_buffer'
libvorbis.c:(.text+0x10c): undefined reference to `vorbis_analysis_wrote'
libvorbis.c:(.text+0x128): undefined reference to `vorbis_analysis_blockout'
libvorbis.c:(.text+0x141): undefined reference to `vorbis_analysis'
libvorbis.c:(.text+0x149): undefined reference to `vorbis_bitrate_addblock'
libvorbis.c:(.text+0x155): undefined reference to `vorbis_bitrate_flushpacket'
/var/tmp/ffmpeg/libavcodec/libavcodec.a(libvorbis.o): In function `oggvorbis_encode_init':
libvorbis.c:(.text+0x303): undefined reference to `vorbis_info_init'
libvorbis.c:(.text+0x32f): undefined reference to `vorbis_encode_setup_vbr'
libvorbis.c:(.text+0x3a0): undefined reference to `vorbis_encode_setup_managed'
libvorbis.c:(.text+0x3dd): undefined reference to `vorbis_encode_ctl'
libvorbis.c:(.text+0x3ed): undefined reference to `vorbis_encode_setup_init'
libvorbis.c:(.text+0x404): undefined reference to `vorbis_analysis_init'
libvorbis.c:(.text+0x41c): undefined reference to `vorbis_block_init'
libvorbis.c:(.text+0x424): undefined reference to `vorbis_comment_init'
libvorbis.c:(.text+0x43c): undefined reference to `vorbis_comment_add_tag'
libvorbis.c:(.text+0x460): undefined reference to `vorbis_analysis_headerout'
libvorbis.c:(.text+0x536): undefined reference to `vorbis_comment_clear'
/var/tmp/ffmpeg/libavcodec/libavcodec.a(libx264.o): In function `X264_close':
libx264.c:(.text+0x1b): undefined reference to `x264_encoder_close'
/var/tmp/ffmpeg/libavcodec/libavcodec.a(libx264.o): In function `X264_init':
libx264.c:(.text+0x45): undefined reference to `x264_param_default'
libx264.c:(.text+0x3db): undefined reference to `x264_encoder_open'
libx264.c:(.text+0x501): undefined reference to `x264_encoder_headers'
libx264.c:(.text+0x5ac): undefined reference to `x264_nal_encode'
/var/tmp/ffmpeg/libavcodec/libavcodec.a(libx264.o): In function `X264_frame':
libx264.c:(.text+0x6f2): undefined reference to `x264_encoder_encode'
libx264.c:(.text+0x74e): undefined reference to `x264_nal_encode'
/var/tmp/ffmpeg/libavcodec/libavcodec.a(libxvidff.o): In function `ff_xvid_encode_close':
libxvidff.c:(.text+0x46d): undefined reference to `xvid_encore'
/var/tmp/ffmpeg/libavcodec/libavcodec.a(libxvidff.o): In function `ff_xvid_encode_init':
libxvidff.c:(.text+0x604): undefined reference to `xvid_global'
libxvidff.c:(.text+0x6d6): undefined reference to `xvid_plugin_lumimasking'
libxvidff.c:(.text+0x86a): undefined reference to `xvid_encore'
libxvidff.c:(.text+0x95b): undefined reference to `xvid_plugin_2pass2'
libxvidff.c:(.text+0xaa0): undefined reference to `xvid_plugin_single'
/var/tmp/ffmpeg/libavcodec/libavcodec.a(libxvidff.o): In function `ff_xvid_encode_frame':
libxvidff.c:(.text+0xd3c): undefined reference to `xvid_encore'
/var/tmp/ffmpeg/libavcodec/libavcodec.a(libxvid_rc.o): In function `ff_xvid_rate_control_uninit':
libxvid_rc.c:(.text+0x29): undefined reference to `xvid_plugin_2pass2'
/var/tmp/ffmpeg/libavcodec/libavcodec.a(libxvid_rc.o): In function `ff_xvid_rate_estimate_qscale':
libxvid_rc.c:(.text+0x149): undefined reference to `xvid_plugin_2pass2'
libxvid_rc.c:(.text+0x24c): undefined reference to `xvid_plugin_2pass2'
/var/tmp/ffmpeg/libavcodec/libavcodec.a(libxvid_rc.o): In function `ff_xvid_rate_control_init':
libxvid_rc.c:(.text+0x4c9): undefined reference to `xvid_plugin_2pass2'
collect2: ld returned 1 exit status
make[2]: *** [vlc] Error 1
make[2]: se sale del directorio `/var/tmp/vlc-0.8.6e'
make[1]: *** [all-recursive] Error 1
make[1]: se sale del directorio `/var/tmp/vlc-0.8.6e'
make: *** [all] Error 2
What do all those "undefined reference" errors mean?
Is it possible that some development packages are missing? (though I have installed them with: 'sudo apt-get build-dep vlc').
Re: Trying to compile VLC 0.8.6e with ffmpeg
Posted: 07 Apr 2008 19:58
by Jean-Baptiste Kempf
Don't compile ffmpeg with that many options... This is useless... Read my blog for example for VLC compilation.
Re: Trying to compile VLC 0.8.6e with ffmpeg
Posted: 09 Apr 2008 16:55
by Pericles
Ok, I think I got it!
I mostly followed instructions by Yohann Martineau.
First of all, I installed the following libraries:
* faac, version 1.26
* faad2, version 2.6.1
(Libraries mp3lame and x264 had already been installed by me).
Then I configured FFmpeg in this way (not using --enable-libfaad here):
./configure --enable-gpl --enable-pthreads --enable-postproc --enable-zlib --enable-libmp3lame --enable-libx264 --enable-libfaac
I compiled then installed it.
Then, I configured VLC with those options:
./configure --enable-ffmpeg --with-ffmpeg-tree=/var/tmp/ffmpeg --with-ffmpeg-mp3lame --with-ffmpeg-zlib --with-ffmpeg-faac --enable-mostly-builtin --enable-dvb --enable-x264 --with-x264-tree=/var/tmp/x264 --disable-wxwidgets --disable-skins2 --enable-debug --enable-faad --with-faad-tree=/var/tmp/faad2 --enable-v4l --enable-pvr
Here yes, I used the option --enable-faad plus indicating its tree path.
I also used --enable-v4l --enable-pvr, needed for using my video capture card.
I eventually compiled and installed with success.
Thanks to everybody.