PDA

View Full Version : HOW-TO compile mplayer.dll from CVS


DDay
2004-08-24, 03:44
updated

please pm me any modifications you seam fit.



now why compile mplayer.dll you ask.

isnīt it in cvs already?

yes it is.
but sometimes we may forget to update the included mplayer.dll so there actually is a newer one then in cvs...

first of you need to get mingw:

i find that this (http://prdownloads.sf.net/mingw/mingw-4.1.0.exe?download) is a good place. start the install and choose the full. (~45mb in total to download)

then you download minsys, again, this (http://prdownloads.sourceforge.net/mingw/msys-1.0.10.exe?download) is a good place todo so.

start by installing mingw. a root dir is the best place, c:\mingw for instanc

then install minsys and complete the questions you get after install in the command window.

now get this (http://prdownloads.sf.net/mingw/gcc-core-3.4.4-20050522-1.tar.gz?download) file and unzip. (use winzip or winrar to open it)

move the bin , lib and libexec dirs to the mingw install folder and overwrite the old bin and lib folders there.

now you need the mplayer source, and it is as easy to get via cvs as the xbmc source.

i suggest tortoisecvs (http://www.tortoisecvs.org) as your cvs client.

install and reboot when asked..

in c: (for example) make a folder called mplayer (all lowercase)
right click next to it and you will have some new additions. choose checkout and enter the info below.

use this as cvsroot:

:pserver:anonymous@cvs.sourceforge.net:/cvsroot/xbmc

use this as your module:

mplayer

http://dday.tx-shells.net/mplayer.jpg

when you got the source down you fire up minsys.

write in the path to your mplayer folder

example:


cd c:
cd mplayer


now type:

./configurexbmc

or

./configurexbmc --disable-libavformat

elupus:using the --disable-avformat tag disables as it says libavformat. it means that the dll now relies on only demuxers present in mplayer directly. i don't know exactly what demuxers might not exist there, but there might be some.

the use of that tag will lower mem usage with about .8mb, so it could be a lifesaver for those of you who are running hd rezes, but as i said it limits some of the dll's functionallity when it comes to obscure formats.

ps. gcc3.4.4 is the only 3.4.x series working. forget about any older.




a whole lot should start happening.

http://dday.tx-shells.net/minsys.jpg

when it is done write:

make

again, it will start compiling so sit back while it does this. (ignore any errors it may give you)

http://dday.tx-shells.net/minsys1.jpg

when done with the make write this:

makedll

this makes the mplayer.dll as you might have guessed.

http://dday.tx-shells.net/minsys2.jpg

there, all done and you should now have a cvs version of the mplayer.dll

to quit just type exit and hit enter

when you later update and want to make a new compile, start winsys and do the ./configurexbmc (or as i wrote at the top ./configurexbmc --disable-libavformat) then make and finaly makedll

why do ./configurexbmc /.configurexbmc --disable-libavformat again you ask?

well, calls to the mplayer.dll might have changed and thus you make sure you always have a correct dll. :)

Gamester17
2004-08-24, 15:40
good stuff (though moved into the guide-forum), maybe you or someone else can replicate this guide in a new appendix of the online-manual?

DDay
2004-08-24, 23:33
added to manual (http://manual.xboxmediacenter.de/wakka.php?wakka=compilingmplayer&v=x0i)

fatzel
2004-08-27, 23:04
:help:

after makedll i get this:

$ makedll
*** compiling mplayer.dll
creating library file: mplayer_.lib
subreader.o(.text+0x3211):subreader.c: undefined reference to `libiconv'
subreader.o(.text+0x3640):subreader.c: undefined reference to `libiconv_open'
subreader.o(.text+0x393d):subreader.c: undefined reference to `libiconv_close'
subreader.o(.text+0x39b4):subreader.c: undefined reference to `libiconv_close'
subreader.o(.text+0x44d8):subreader.c: undefined reference to `libiconv_close'
subreader.o(.text+0x5668):subreader.c: undefined reference to `libiconv_open'
subreader.o(.text+0x56c7):subreader.c: undefined reference to `libiconv_open'
subreader.o(.text+0x5721):subreader.c: undefined reference to `libiconv_close'
subreader.o(.text+0x57e6):subreader.c: undefined reference to `libiconv'
make: *** [dll] error 1


what's the problem??

ezar2003
2004-08-27, 23:21
do you enable libiconv or libfreetype in configurexbmc?
recomended to download csv now.

fatzel
2004-08-27, 23:37
sorry this is my first try.
i only did what is written in the first threat.

ezar2003
2004-08-27, 23:48
download cvs now, please.
in your configurexbmc must to have this line: --disable-iconv

a) download cvs now.
b) ./configurexbmc
c) make
d) makedll

DDay
2004-08-28, 00:11
fixed/added the --disable-iconv \ in configurexbmc now so a new checkout (or adding it manually) will fix the makedll command :)

fatzel
2004-08-28, 00:16
:bowdown:
thank you.
but it has to be --disable-iconv \
edit: too late.

thank you all.

DDay
2004-08-28, 00:18
fixed/added the --disable-iconv \ in configurexbmc
think i managed to get the \ in there ;)

mastiha
2005-01-15, 09:46
i've followed all the steps up to ./configurexbmc.

it goes through the checking for gcc version process but i finally get the following error:

error: bad gcc version

i've extracted the files from the rar file and moved them to c:\mingw so i'm not sure what i am doing wrong.

thriftynomad
2005-02-12, 22:01
i've got exactly the same problem... bad gcc version. i've tried downloading more than one gcc package and putting it in just about every directory i can think of... can't seem to figure it out.

is there any chance someone could post a link to a compiled mplayer.dll from a recent cvs?

thanks...

geko37
2005-02-20, 14:09
i've got exactly the same problem... bad gcc version. i've tried downloading more than one gcc package and putting it in just about every directory i can think of... can't seem to figure it out.

is there any chance someone could post a link to a compiled mplayer.dll from a recent cvs?

thanks...
then try the new mingw version !

mingw (http://prdownloads.sf.net/mingw)

JustinT9669
2005-02-27, 05:30
:bowdown:

darksideradio
2005-04-12, 19:28
hi. this topic has been dormant, but i have a newbie question.

why would you want to complie your own cvs for mplayer.dll? what benefits do you get? should i do this myself?

philled
2005-04-18, 17:05
hi - i followed the instructions in the 1st post and i've got the latest downloads of minsys, mingw and tortoisecvs and mplayer from cvs. when i run ./configurexbmc i get an error which says:

error: cannot find header either inittypes .h or bitypes.h (see docs/html/en/faq.html).
check "configure.log" if you do not understand why it failed.

i can't find the faq.html. the end of configure.log says:
============
#include <inttypes.h>
int main(void) { return 0; }

gcc -i/c/mplayer/mplayer/xbmcsys -i/c/mplayer/mplayer/xbmcsys/xbmc_vobsub -d_xbox -dxbmc_vobsub -l/c/mplayer/mplayer/xbmcsys/lib -l/c/mplayer/mplayer/xbmcsys/xbmc_vobsub /tmp/mplayer-conf-2173-1124.c -o /tmp/mplayer-conf-17347-1124.o
c:\mingw\bin\..\lib\gcc-lib\mingw32\3.3.3\..\..\..\..\mingw32\bin\ld.exe: cannot open crt2.o: no such file or directory

ldd /tmp/mplayer-conf-17347-1124.o
./configure: ldd: command not found

result is: no
##########################################

============ checking for bitypes.h (inttypes.h predecessor) ============

#include <sys/bitypes.h>
int main(void) { return 0; }

gcc -i/c/mplayer/mplayer/xbmcsys -i/c/mplayer/mplayer/xbmcsys/xbmc_vobsub -d_xbox -dxbmc_vobsub -l/c/mplayer/mplayer/xbmcsys/lib -l/c/mplayer/mplayer/xbmcsys/xbmc_vobsub /tmp/mplayer-conf-2173-1124.c -o /tmp/mplayer-conf-17347-1124.o
c:/docume~1/phill/locals~1/temp/mplayer-conf-2173-1124.c:1:25: sys/bitypes.h: no such file or directory

ldd /tmp/mplayer-conf-17347-1124.o
./configure: ldd: command not found

does anyone know what i need to do to get this to configure and compile?

thanks,
phill

tslayer
2005-04-18, 18:32
try reinstalling msys and mingw. you've made some mistake in installing (just follow the instructions exactly). all you need are the base installs of each.

ts

DDay
2005-06-11, 18:46
updated for the use of gcc 3.4.4

orbitus
2005-06-27, 22:11
i was hoping someone could help me, i am trying to compile this dll and am having some difficulties. i follow the directions but when i put the dll into the mplayer directory on my 1.0 xbox with [admin note-- we do not recommend using slayer]s 2.6 installed i only get a loud screeching on the audio.

any ideas?

orbitus
2005-06-27, 22:12
ahh, could that be it, [admin note-- we do not recommend using slayer]s i mean?

thenetstriker
2005-07-10, 21:08
i have another problem with the compilation of mplayer. after i run ./configurexbmc --disable-libavformat i get the following output:

$ ./configurexbmc --disable-libavformat
[ creating xbox cpuinfo script ] ... done!
[ running configure script for xbmc ]
detected operating system: mingw32
detected host architecture: i386
checking for cc version ... not found
checking for gcc version ... 3.4.4, ok
checking for cpu vendor ... genuineintel (6:8:10)
checking for cpu type ... celeron (coppermine)
checking for gcc & cpu optimization abilities ... your gcc does not even support "i386" for '-march' and '-mtune'.
error
checking for kernel support of mmx ... failed
it seems that your kernel does not correctly support mmx.
to use mmx extensions in mplayer, you have to upgrade/recompile your kernel!
checking for kernel support of mmx2 ... failed
it seems that your kernel does not correctly support mmx2.
to use mmx2 extensions in mplayer, you have to upgrade/recompile your kernel!
checking for kernel support of sse ... failed
it seems that your kernel does not correctly support sse.
to use sse extensions in mplayer, you have to upgrade/recompile your kernel!
checking for mtrr support ... no
unknown parameter: source/mplayer/xbmcsys/fribidi/fribidi-config

can anyone help me?

bob0r
2005-09-20, 18:44
does all this still work?
(and would we not need xbox header files?)

this is what i get:
gcc -i../libvo -i../../libvo *-fno-pic -o4 -march=pentium3 -mtune=pentium3 -pipe -ffast-math -fomit-frame-pointer -d_largefile_source -d_file_offset_bits=64 -i/home/user/mplayer/xbmcsys -i/home/user/mplayer/xbmcsys/xbmc_vobsub -d_xbox -dxbmc_vobsub *-dhave_av_config_h -i.. -i../libavutil -d_file_offset_bits=64 -d_largefile_source -d_gnu_source * *-c -o i386/fdct_mmx.o i386/fdct_mmx.c
i386/fdct_mmx.c:16:20: common.h: no such file or directory
make[1]: *** [i386/fdct_mmx.o] error 1
make[1]: leaving directory `/home/user/mplayer/libavcodec'
make: *** [libavcodec/libavcodec.a] error 2

and when i copy the common.h file from mplayer\libavcodec to mplayer\libavcodec\i386 it continues but:

<a lot of lines>
libavformat/libavformat.a(avidec.o)(.text+0xcb):avidec.c: undefined reference to `av_rescale'
libavformat/libavformat.a(avidec.o)(.text+0x133):avidec.c: undefined reference to `av_rescale'
libavformat/libavformat.a(avidec.o)(.text+0x14fb):avidec.c: undefined reference to `av_rescale'
libavformat/libavformat.a(raw.o)(.text+0x33a):raw.c: undefined reference to `av_rescale_rnd'
libavformat/libavformat.a(raw.o)(.text+0x395):raw.c: undefined reference to `av_rescale'
libavformat/libavformat.a(img.o)(.text+0x519):img.c: undefined reference to `av_rescale'
libavformat/libavformat.a(asf-enc.o)(.text+0x183d):asf-enc.c: undefined reference to `av_rescale'
collect2: ld returned 1 exit status
make: *** [mplayer.exe] error 1

then makedll fails also (fcourse)
libavformat/libavformat.a(avidec.o)(.text+0xcb):avidec.c: undefined reference to `av_rescale'
libavformat/libavformat.a(avidec.o)(.text+0x133):avidec.c: undefined reference to `av_rescale'
libavformat/libavformat.a(avidec.o)(.text+0x14fb):avidec.c: undefined reference to `av_rescale'
libavformat/libavformat.a(raw.o)(.text+0x33a):raw.c: undefined reference to `av_rescale_rnd'
libavformat/libavformat.a(raw.o)(.text+0x395):raw.c: undefined reference to `av_rescale'
libavformat/libavformat.a(img.o)(.text+0x519):img.c: undefined reference to `av_rescale'
libavformat/libavformat.a(asf-enc.o)(.text+0x183d):asf-enc.c: undefined reference to `av_rescale'
collect2: ld returned 1 exit status
make: *** [dll] error 1

chorton
2006-06-04, 04:51
i'm sure this is stupid, but after it compiles successfully, what files do i get? is it somewhere in the mplayer cvs? :bowdown:

NaPeK
2006-06-20, 00:04
$ makedll
*** compiling mplayer.dll
gcc.exe: libvo/libvo.a: no such file or directory
gcc.exe: libao2/libao2.a: no such file or directory
gcc.exe: libmpcodecs/libmpcodecs.a: no such file or directory
gcc.exe: mp3lib/libmp3.a: no such file or directory
gcc.exe: liba52/liba52.a: no such file or directory
gcc.exe: libmpeg2/libmpeg2.a: no such file or directory
gcc.exe: libaf/libaf.a: no such file or directory
gcc.exe: libmpdemux/libmpdemux.a: no such file or directory
gcc.exe: input/libinput.a: no such file or directory
gcc.exe: postproc/libswscale.a: no such file or directory
gcc.exe: osdep/libosdep.a: no such file or directory
gcc.exe: libavcodec/libavcodec.a: no such file or directory
gcc.exe: libfaad2/libfaad2.a: no such file or directory
gcc.exe: libmpdvdkit2/libmpdvdkit.a: no such file or directory
gcc.exe: libavformat/libavformat.a: no such file or directory
make: *** [dll] error 1


any ideas?

elupus
2006-06-20, 01:13
you didn't build it..

configurexbmc
make distclean
make
makedll

NaPeK
2006-06-20, 17:28
same error after makedll

mingw-3.2.0-rc-3.exe
gcc-core-3.4.4-20050522-1.tar.gz
msys-1.0.10.exe

newer versions shows errors right after ./configurexbmc

elupus
2006-06-20, 18:20
if configurexbmc fails something is wrong.. could you tell me what is failing?

NaPeK
2006-06-20, 18:58
ok now what i got

xbmc mplayer cvs with folders libavcodec and libavformat from mplayer-1.0pre7 (i want pre8 if it's possible)

installed mingw-4.1.0.exe (current libs)
gcc-core-3.4.4-20050522-1.tar.gz
msys-1.0.11-2004.04.30-1.exe

commands:
./configurexbmc --disable-libavformat
make distclean
make
makedll

and now error is:

$ makedll
*** compiling mplayer.dll
gcc.exe: libavcodec/libavcodec.a: no such file or directory
gcc.exe: libavutil/libavutil.a: no such file or directory
make: *** [dll] error 1

only 2 lines...

k-pax
2006-09-15, 13:02
I have just followed the guide in the first post and tryed to compile mplayer.dll (for the curiousity I must add).
It went just fine, but the new mplayer.dll is about 1 Mb smaller than the version prebuilt in xbmc.

So my question is if somone can tell me why its smaller ?
Mayby some features aint enabled this way, and its no reason to selfcompile the mplayer..?
???

HarshReality
2006-09-15, 13:47
OK, unlike an xbe file you guys are compiling a dll for media access. if its 1 meg smaller... ok looks suspicious but try it out. You compiled it locally on your machine, run it through the gambit. rename the one on your xbox to mplayer.bak up your compile of it and try playing media. Then if it has issues with say.. mp3 or divx, then the guys can help you a bit better here.

k-pax
2006-09-15, 19:32
Sorry about that question, it stands clearly in the Guide at page 1.
I used of cource ./configurexbmc --disable-libavformat = - 0.8 Mb. :oo:

fvfv
2006-10-02, 21:30
Can you clarify something for me ?

I need to incorporate EDL support into mplayer so that I can skip commercials.

If I download the source from the latest cvs, It might/might not have the edl support on the source.

My question is, by compiling this dll under MINGW, does it produce an mplayer.dll that is binary compatible with the XBOX only or can I use it on a windows application as well ?

Also I might want to tweak the source code of mplayer to fix bugs or whatever. What happens if I download the latest mplayer source from mplayer.hu (1.0-PRE8-3x). Will this method work ?

Or, does anybody know what is the mplayer version that was used to create the 2.0.0 version of XBMC. May be all I need to do is upgrade to this.

Thanks.

gzusrawx
2006-10-05, 17:36
Hi I'm looking for information regarding compiling mplayers cvs (1.0pre8) for xbmc. I understand the xbmc mplayer version is (1.0pre7) and I do understand that there are differences between the two as far as compiling for xbmc. I was wondering if there was anyone who might be able to help me or point me in the right direction for information regarding adapting the mplayer cvs(1.0pre8) for xbmc's mplayer cvs so I might compile mplayer 1.0pre8 for xbmc.

the reason I want to compile 1.0pre8 is because in that version a codec for WVC1 or WMV9 advanced profile has been added.

Any help would be appreciated,

Tim

elupus
2006-10-05, 22:25
that stuff is in libavcodec. so you should only update libavcodec and libavformat. oh and we are pre6 not pre7. it's a pain to update all of mplayer so don't even try.

gzusrawx
2006-10-05, 23:52
should I update codecs.conf as well or is that done in part of the compiling process?

gzusrawx
2006-10-05, 23:54
Yah I tried and ran into some problems with files it was looking for that wheren't there or files that were there that it wasn't looking for.

gzusrawx
2006-10-06, 15:20
yah I attempted to compile mplayer with the new libavcodecs and libavformat but ran into errors during "make". I'm not at the computer I tried it on right now but will post the errors I ran into when I get home.

Gamester17
2006-10-06, 15:45
'rumour' has it that the MPlayer developers will release MPlayer 1.0-FINAL release relatively soon, like within a month a month or so.

Maybe it would be best to wait to update until that has been releases as many new changes been made in their CVS since 1.0pre8

gzusrawx
2006-10-06, 15:49
Yah I heard that too, or read it. I suppose I'll have to wait and use vlc until then. or convert the files