PDA

View Full Version : MPlayer with Xvidcore...


ultimatebilly
18th July 2003, 10:30
Here another problem ;)
I have successfully installed mplayer, and I must say that it really is a great player!
Everything works fine, except for one thing:
I have tried to include Xvid into the codecs mplayer uses, because I want to encode using mencoder (for playback libavcodec would be enough, used ffdshow under windows anyway...).
I did install Xvid, configured mplayer with --with-xvidcore=/usr/local/lib, configure found Xvid support (both libxvidcore.so and .a are there...).
After make and make install, I tried to fire up mplayer, but it only produced an error message: can't find libxvidcore.so...
I symlinked the library to every path I could imagine mplayer looking in, but of course that was no solution.
Then I searched the internet for hours, and finally found this (find the message text below):

http://edu.bnhof.de/pipermail/xvid-devel/2003-February/002290.html

I tried to apply the fix to my configure script, even found the lines, changed them, but it didn't work (as I had expected, since the fix is for BSD).
I'm running Debian Woody, by the way...
Tried both MPlayer release and CVS, none worked with Xvid.

If any of you has any idea, or maybe even a solution, I would be extremely glad, because I'm running out of ideas at the moment...

Ultimatebilly

PS.: Don't wonder if you find a post similar to this in the Xvid board, posted there too, but no reply so far...


"Hi!

I'm using one of the *BSD* variants (BSD/OS 4.3.1 to be precise) and
was surprised to get a "libxvidcore.so not found" error when running
'mencoder' (MPlayer's encoder which uses libxvidcore):

moe.18-> mencoder
mencoder: can't load library 'libxvidcore.so'

moe.20-> objdump -p /usr/local/lib/libxvidcore.so

/usr/local/lib/libxvidcore.so: file format elf32-i386

Program Header:
LOAD off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12
filesz 0x00086684 memsz 0x00086684 flags r-x
LOAD off 0x000866c0 vaddr 0x000876c0 paddr 0x000876c0 align 2**12
filesz 0x00003de8 memsz 0x0006dda0 flags rw-
DYNAMIC off 0x0008a410 vaddr 0x0008b410 paddr 0x0008b410 align 2**2
filesz 0x00000098 memsz 0x00000098 flags rw-

Dynamic Section:
NEEDED libc.so.2
NEEDED libm.so
NEEDED libgcc.so.1
INIT 0x9cbc
FINI 0x8013c
HASH 0x94
STRTAB 0x2bc8
SYMTAB 0xc88
STRSZ 0x1e4b
SYMENT 0x10
PLTGOT 0x8acfc
PLTRELSZ 0x478
PLTREL 0x11
JMPREL 0x9844
REL 0x4a14
RELSZ 0x4e30
RELENT 0x8
TEXTREL 0x0

The problem is that the shared library does not have a "soname" for
the dynamic linker to find. When creating a shared library it
seems to be necessary to add use "-soname libxvidcore.so -shared"

This small patch does rely on using 'gcc' to pass thru to the linker
the appropriate flags:

--- configure.in.dist Sun Feb 16 21:17:45 2003
+++ configure.in Wed Feb 19 10:43:15 2003
@@ -247,7 +247,7 @@
case "$target_os" in
*bsd*|linux*|irix*|solaris*)
AC_MSG_RESULT([-shared -lc -lm])
- SPECIFIC_LDFLAGS="-shared -lc -lm"
+ SPECIFIC_LDFLAGS="-Wl,-soname -Wl,libxvidcore.so -shared -lc -lm"
SPECIFIC_CFLAGS="-fPIC"
;;
[[cC]][[yY]][[gG]][[wW]][[iI]][[nN]]|mingw32|mks)

After building the shared library with that change:

/usr/local/lib/libxvidcore.so: file format elf32-i386

Program Header:
LOAD off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12
filesz 0x0008691c memsz 0x0008691c flags r-x
LOAD off 0x00086940 vaddr 0x00087940 paddr 0x00087940 align 2**12
filesz 0x00003df0 memsz 0x0006ddb8 flags rw-
DYNAMIC off 0x0008a690 vaddr 0x0008b690 paddr 0x0008b690 align 2**2
filesz 0x000000a0 memsz 0x000000a0 flags rw-
NOTE off 0x00086904 vaddr 0x00086904 paddr 0x00086904 align 2**2
filesz 0x00000018 memsz 0x00000018 flags r--

Dynamic Section:
NEEDED libc.so.2
NEEDED libm.so
NEEDED libgcc.so.1
SONAME libxvidcore.so
INIT 0x9ee0
FINI 0x803bc
HASH 0xb4
STRTAB 0x2cb0
SYMTAB 0xcd0
STRSZ 0x1ea0
SYMENT 0x10
PLTGOT 0x8af7c
PLTRELSZ 0x488
PLTREL 0x11
JMPREL 0x9a58
REL 0x4b50
RELSZ 0x4f08
RELENT 0x8
TEXTREL 0x0

Cheers,
Steven Schultz"

TactX
18th July 2003, 11:37
As you're running Debian Woody just like I do, I'd suggest you install the xvid-package from Christian Marillat (http://marillat.free.fr/dists/stable/main/binary-i386/). After that compile mplayer again (clean the sources before). I've never had problems like you have.

ultimatebilly
18th July 2003, 11:57
Thank you! I will try that as soon as I'm home, and will report instantly if it worked...

Greetings

ultimatebilly

TactX
18th July 2003, 16:52
I forgot to mention one thing. You could actually use Christian Marillats mplayer package and avoid the compilation.

I don't do that because I've had problems with xv and this package, so I'm creating my own private debs :D
But maybe it works for you ;)

ultimatebilly
18th July 2003, 19:12
It worked!
Thanks a million times!
Now its encooooding time...
Unfortunately I have to go to my other job first, but that's life ;)
I already compiled mplayer myself before reading your suggestion to use the package, and all worked like a charm.

Thanks again!