Compiling VLC 0.9 with ffmpeg

*nix specific usage questions
chimp
New Cone
New Cone
Posts: 1
Joined: 26 Apr 2008 18:18

Compiling VLC 0.9 with ffmpeg

Postby chimp » 26 Apr 2008 20:27

Hey,

I've been trying for about a week now to properly compile vlc using the ffmpeg svn. The reason I need to do so is that I need a few things enabled (lame, swscale). However the problem I always get is that it gives me an error telling me to recompile with -fPIC

Hence I have tried to with many different methods, here is the most obvious one i suppose for configuring ffmpeg:

./configure --enable-gpl --enable-pthreads --enable-postproc --enable-libmp3lame --enable-libx264 --enable-libfaac --extra-cflags=-fPIC

And here is a typical configuration for vlc I've tried (bear in mind ive tried many many different configs ie. adding -fPIC to vlcs cflags to get this to work but all were unsuccessfull).

./configure --prefix=/usr/local --with-ffmpeg-tree=./extras/ffmpeg --with-ffmpeg-faac --with-ffmpeg-mp3lame --enable-x11 --enable-xvideo --disable-gtk --enable-sdl --enable-mad --enable-libdvbpsi --enable-a52 --enable-libmpeg2 --enable-dvdnav --enable-faad --enable-vorbis --enable-ogg --enable-theora --enable-faac --enable-mkv --enable-freetype --enable-fribidi --enable-speex --enable-flac --enable-caca --enable-skins --enable-skins2 --enable-alsa --disable-kde --enable-qt --enable-ncurses --enable-release --enable-x264 --enable-dvb --enable-libdvbpsi

But even with this I still get an error looking like this:

/usr/bin/ld: /home/chimp/vlc/extras/ffmpeg/libavcodec/libavcodec.a(dsputil_mmx.o): relocation R_X86_64_PC32 against `ff_pw_20' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value

Adding the fPIC to the vlc compile also gives similar errors. I have searched the net and found multiple people with similar problems, but have not as of yet found a solution, any help would be greatly appreciated.

Compiling computer is intel core 2 quad, 8 gig of ram, ubuntu 8.04 server edition.

jluce
New Cone
New Cone
Posts: 4
Joined: 07 Mar 2009 00:13

Re: Compiling VLC 0.9 with ffmpeg

Postby jluce » 07 Mar 2009 00:17

Almost a year later... I have exactly the same issue, and it is compiled with -fPIC

Did anyone ever find out the problem?

sta2008
New Cone
New Cone
Posts: 9
Joined: 08 Mar 2009 05:18

Re: Compiling VLC 0.9 with ffmpeg

Postby sta2008 » 08 Mar 2009 05:23

Had a similar problem. Adding --host-cflags="-fPIC" to the ./configure line fixed it. Hope it helps :)

1st edit: Oh yeah, I'm running quad core 64-bit red hat with 8G of ram. I think --host-cflags="-fPIC" is necessary for 64-bit x86.

2nd edit: My bad, on ffmpeg it's --host-cflags="-fPIC" and vlc it's --with-pic.
I'm still wrestling with PIC (position-independent code) issues on this system. I think because some of the ffmpeg codecs were built without it and vlc/ffmpeg were. I just read this technical article saying -fPIC is bad because it adds overhead ( http://www.bailopan.net/blog/?p=50#comments )

jaech
New Cone
New Cone
Posts: 1
Joined: 14 Mar 2009 03:28

Re: Compiling VLC 0.9 with ffmpeg

Postby jaech » 14 Mar 2009 04:16

System : Debian(Lenny) Linux 2.6.26-1-amd64

1. x264-snapshot-20081222-2245
./configure --enable-shared --enable-visualize
New version of x264 has a problem with ffmpeg

2. faac-1.28
./configure

3. lame-398-2
./configure

4. Xvid 1.2.1
build/generic/configure

mv /usr/local/lib/lib* /usr/lib

5. ffmpeg-0.5
./configure --enable-libmp3lame --enable-shared --enable-libx264 --enable-libxvid --enable-gpl --enable-libfaac --enable-libfaad --enable-libvorbis --enable-libspeex --enable-libopenjpeg --enable-libschroedinger --enable-libtheora --enable-postproc --enable-swscale

mv /usr/local/lib* /usr/lib

6. vlc-0.9.8a
./configure --enable-x11 --enable-xvideo --disable-gtk --enable-avcodec --enable-avformat --enable-swscale --enable-mad --enable-libdvbpsi --enable-libmpeg2 --enable-dvdnav --enable-dvd --enable-avutil --enable-avdevice --enable-faad --enable-vorbis --enable-ogg --enable-theora --enable-faac --enable-fribidi --enable-speex --enable-flac --enable-mp3lame --enable-skins --enable-xvid --enable-skins2 --enable-alsa --disable-kde --enable-ncurses --enable-release --enable-postproc --enable-sdl

Enjoy it.

Extrmsk
New Cone
New Cone
Posts: 4
Joined: 23 Mar 2009 16:01

Re: Compiling VLC 0.9 with ffmpeg

Postby Extrmsk » 23 Mar 2009 16:29

Hi everyone.
I have the some problem and can't resolve it, need help... After 4 days linux-**Stay polite ** is no result :twisted:

Linux Debian lenny

Code: Select all

extr@vlc-coder:~$ uname -a Linux vlc-coder 2.6.26-1-686 #1 SMP Sat Jan 10 18:29:31 UTC 2009 i686 GNU/Linux
1. x264-snapshot-20081222-2245
./configure --enable-shared

2. lame-398-2
./confugure

3. ffmpeg-0.5
./configure --enable-libmp3lame --enable-libx264 --enable-gpl --enable-libvorbis --enable-postproc --enable-swscale

4. vlc-0.9.8a
./configure --prefix=/usr/local/vlc0.9.8a/ \
--enable-run-as-root --enable-release --enable-v4l --disable-a52 --disable-glx \
--enable-swscale --enable-avcodec --enable-avformat --enable-libdvbpsi --disable-x11\
--enable-libmpeg2 --enable-avutil --enable-vorbis --enable-ogg --enable-mp3lame --enable-ncurses --enable-postproc

Test to stream mp3 with encoding to lower bitrate (315 to 128):

Code: Select all

VLC="/usr/local/vlc0.9.8a/bin/vlc" SOURCE="/home/extr/music.mp3" $VLC -vvv -I dummy $SOURCE --sout "#transcode{acodec=mp3,ab=128}:duplicate{dst=std{access=http,mux=ts,dst=192.168.100.236:3000}}"
Error:

Code: Select all

[00000315] main interface debug: thread started [00000316] main interface debug: looking for interface module: 1 candidate [00000316] inhibit interface error: Failed to connect to the D-Bus session daemon: dbus-launch failed to autolaunch D-Bus session: Autolaunch error: X11 initialization failed. [00000316] main interface warning: no interface module matching "inhibit,none" could be loaded [00000316] main interface debug: TIMER module_Need() : 2,863 ms - Total 2,863 ms / 1 intvls (Avg 2,863 ms) [00000316] main interface error: no suitable interface module [00000001] main libvlc error: interface "inhibit,none" initialization failed
Also after:

Code: Select all

[00000320] main input debug: looking for a subtitle file in /home/extr/ [00000320] main input debug: starting in async mode [00000333] main demux debug: looking for meta reader module: 0 candidates [00000333] main demux error: no meta reader module matched "any"
And finish:

Code: Select all

[00000337] main encoder debug: looking for encoder module: 6 candidates [00000337] main encoder debug: TIMER module_Need() : 0,109 ms - Total 0,109 ms / 1 intvls (Avg 0,109 ms) [00000322] stream_out_transcode stream out error: cannot find audio encoder (module:any fourcc:mp3 ) [00000336] main decoder debug: removing module "mpeg_audio" [00000322] stream_out_transcode stream out error: cannot create audio chain [00000335] main packetizer error: cannot create packetizer output (mpga)
I think that main problem is:

Code: Select all

stream_out_transcode stream out error: cannot find audio encoder (module:any fourcc:mp3 )
For more information:

Code: Select all

extr@vlc-coder:~$ ffmpeg -v FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --enable-libmp3lame --enable-libx264 --enable-gpl --enable-libvorbis --enable-postproc --enable-swscale --enable-libfaad libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 0 / 52.20. 0 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 libswscale 0. 7. 1 / 0. 7. 1 libpostproc 51. 2. 0 / 51. 2. 0 built on Mar 23 2009 11:26:02, gcc: 4.3.2 ffmpeg: missing argument for option '-v'

Code: Select all

extr@vlc-coder:~$ /usr/local/vlc0.9.8a/bin/vlc -vvv -list | grep ffmpeg VLC media player 0.9.8a Grishenko [00000001] main libvlc debug: VLC media player - version 0.9.8a Grishenko - (c) 1996-2008 the VideoLAN team [00000001] main libvlc debug: libvlc was configured with ./configure '--prefix=/usr/local/vlc0.9.8a/' '--enable-run-as-root' '--enable-release' '--enable-v4l' '--disable-a52' '--disable-glx' '--enable-swscale' '--enable-avcodec' '--enable-avformat' '--enable-libdvbpsi' '--disable-x11--enable-libmpeg2' '--enable-avutil' '--enable-vorbis' '--enable-ogg' '--enable-mp3lame' '--enable-ncurses' '--enable-postproc' [00000001] main libvlc debug: translation test: code is "ru" [00000001] main libvlc debug: checking builtin modules [00000001] main libvlc debug: checking plugin modules [00000001] main libvlc debug: loading plugins cache file /home/extr/.cache/vlc/plugins-04041e.dat [00000001] main libvlc debug: recursively browsing `/usr/local/vlc0.9.8a_new3//lib/vlc' [00000001] main libvlc warning: cannot load module `/usr/local/vlc0.9.8a_new3//lib/vlc/video_filter/libswscale_plugin.so' (/usr/local/vlc0.9.8a_new3//lib/vlc/video_filter/libswscale_plugin.so: undefined symbol: av_freep) [00000001] main libvlc warning: cannot load module `/usr/local/vlc0.9.8a_new3//lib/vlc/demux/libavformat_plugin.so' (/usr/local/vlc0.9.8a_new3//lib/vlc/demux/libavformat_plugin.so: undefined symbol: avcodec_register_all) [00000001] main libvlc warning: cannot load module `/usr/local/vlc0.9.8a_new3//lib/vlc/codec/libavcodec_plugin.so' (/usr/local/vlc0.9.8a_new3//lib/vlc/codec/libavcodec_plugin.so: undefined symbol: uncompress) [00000001] main libvlc debug: module bank initialized, found 231 modules [00000001] main libvlc debug: writing plugins cache /home/extr/.cache/vlc/plugins-04041e.dat
What's wrong?
Will be great thanks for any help!

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Compiling VLC 0.9 with ffmpeg

Postby Jean-Baptiste Kempf » 24 Mar 2009 01:13

You are missing a few linking things like -lz for avcodec... Add those in vlc-config file.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Extrmsk
New Cone
New Cone
Posts: 4
Joined: 23 Mar 2009 16:01

Re: Compiling VLC 0.9 with ffmpeg

Postby Extrmsk » 24 Mar 2009 11:15

You are missing a few linking things like -lz for avcodec... Add those in vlc-config file.
Can't understand what strings must add to the vlc-config file.?

I try this (add "-lz" to libs):

Code: Select all

;; avcodec) cflags="${cflags} -I/usr/local/include" libs="${libs} -L/usr/local/lib -lavcodec -lavutil -lm -lz" ;;
make
make install

Still the same errors.

Maybe missyng some librarys?

Code: Select all

vlc-coder:~/vlc-0.9.8a_new3# ls /usr/lib | grep avcodec libavcodec.a libavcodec.so libavcodec.so.51 libavcodec.so.51.50.0 libavcodec.so.52 libavcodec.so.52.20.0

Code: Select all

vlc-coder:~/vlc-0.9.8a_new3# ls /usr/local/lib | grep avcodec libavcodec.a

Code: Select all

vlc-coder:~/vlc-0.9.8a_new3# ldconfig -v | grep avcodec libavcodec.so.52 -> libavcodec.so.52.20.0 libavcodec.so.51 -> libavcodec.so.51.50.0

Extrmsk
New Cone
New Cone
Posts: 4
Joined: 23 Mar 2009 16:01

Re: Compiling VLC 0.9 with ffmpeg

Postby Extrmsk » 24 Mar 2009 16:08

Well, I reinstalling all system and recompiling vlc. It's work fine! :D
But mux=ts is not working.

Code: Select all

[00000367] main mux error: no sout mux module matched "ts"
Will be think more..

Extrmsk
New Cone
New Cone
Posts: 4
Joined: 23 Mar 2009 16:01

Re: Compiling VLC 0.9 with ffmpeg

Postby Extrmsk » 30 Mar 2009 09:27

libdvbpci was missing.
All work fine, thanks =)

speak2beeb
Blank Cone
Blank Cone
Posts: 12
Joined: 07 May 2008 00:56

Re: Compiling VLC 0.9 with ffmpeg

Postby speak2beeb » 29 Apr 2009 20:24

Hi, I'm trying to run the ./configure executable for vlc, but I'm not certain how to run this.

I've basically created a new Gentoo server w/ newest portage and such. Did "emerge vlc", and didn't receive any errors while doing this, but VLC just won't work!

Anyway, so my question is how can I run configure in Gentoo, since I installed vlc using emerge.

Please help!

Note, at the beginning of verbose, I get:

Code: Select all

main libvlc debug: libvlc was configured with ./configure '--prefix=/usr' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--disable-a52' '--disable-aa' '--disable-faad' '--disable-alsa' '--disable-altivec' '--disable-arts' '--disable-asademux' '--disable-atmo' '--disable-bonjour' '--disable-fribidi' '--disable-vcd' '--disable-cddax' '--disable-libcddb' '--disable-libcdio' '--disable-csri' '--disable-dbus' '--disable-dbus-control' '--disable-dirac' '--disable-directfb' '--disable-dc1394' '--disable-debug' '--disable-dca' '--disable-dv' '--disable-dvb' '--disable-dvdread' '--disable-dvdnav' '--disable-esd' '--disable-fb' '--enable-avcodec' '--enable-avformat' '--enable-swscale' '--disable-imgresample' '--enable-postproc' '--disable-flac' '--disable-fluidsynth' '--disable-fontconfig' '--disable-ggi' '--disable-gnomevfs' '--disable-gnutls' '--disable-hal' '--disable-httpd' '--disable-id3tag' '--disable-jack' '--disable-kate' '--disable-libass' '--disable-caca' '--enable-libgcrypt' '--disable-notify' '--disable-libproxy' '--disable-libtar' '--disable-libsysfs' '--disable-libv4l2' '--disable-lirc' '--disable-live555' '--disable-lua' '--disable-mkv' '--disable-mmx' '--disable-mod' '--disable-mad' '--disable-libmpeg2' '--disable-mpc' '--enable-ncurses' '--disable-mozilla' '--with-mozilla-pkg=' '--disable-ogg' '--disable-glx' '--disable-opengl' '--disable-galaktos' '--disable-optimize-memory' '--disable-oss' '--disable-pda' '--disable-png' '--disable-portaudio' '--disable-pulse' '--disable-pvr' '--enable-qt4' '--disable-realrtsp' '--disable-run-as-root' '--disable-smb' '--disable-schroedinger' '--disable-sdl' '--disable-sdl-image' '--disable-shout' '--disable-speex' '--disable-sse' '--disable-sout' '--disable-svg' '--disable-svgalib' '--disable-taglib' '--disable-theora' '--disable-freetype' '--disable-twolame' '--disable-upnp' '--disable-v4l' '--disable-v4l2' '--disable-vcdinfo' '--disable-vcdx' '--disable-vorbis' '--disable-loader' '--disable-x11' '--disable-screen' '--disable-x264' '--disable-xinerama' '--disable-libxml2' '--disable-xosd' '--disable-xvideo' '--disable-xvmc' '--disable-zvbi' '--disable-snapshot' '--disable-growl' '--disable-optimizations' '--enable-fast-install' '--disable-vlm' '--disable-skins2' '--disable-remoteosd' '--build=i686-pc-linux-gnu' 'build_alias=i686-pc-linux-gnu' 'host_alias=i686-pc-linux-gnu' 'CFLAGS=-O2 -march=i686 -pipe' 'LDFLAGS=-Wl,-O1' 'CPPFLAGS=' 'CXXFLAGS=-O2 -march=i686 -pipe'


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 19 guests