Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Mini how-to: Mplayer and Debian Sarge

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
Rodolfo Medina
Posts: 35
Joined: 2006-05-06 10:39

Mini how-to: Mplayer and Debian Sarge

#1 Post by Rodolfo Medina »

Hallo.

I'm reporting the procedure I followed to install successfully
(it seems) mplayer.

Bye,
Rodolfo


-----------------------------------------------------------------------------------------------------
Operating system: Debian GNU/Linux 3.1 ("Sarge") r2, kernel 2.4.

After the Debian base installation, I had chosen the manual
packages selection and installed the following packages:

make gcc less x-window-system gnome-session gnome-panel nautilus gnome-applets gnome-control-center gnome-system-tools gnome-core epiphany-browser libc6-dev kernel-source-2.4.27 cvs autotools-dev build-essential dpatch dpkg-dev g++ g++-3.3 libice-dev libjpeg62-dev liblockfile-dev libncurses5-dev libpng12-dev libpng3-dev libsm-dev libstdc++5-3.3-dev libtiff4-dev libtiffxx0 libungif4-dev libungif4g libx11-dev libxaw7-dev libxext-dev libxi-dev libxmu-dev libxmuu-dev libxp-dev libxpm-dev libxrandr-dev libxrender-dev libxt-dev libxtrap-dev libxtst-dev libxv-dev patch pm-dev render-dev texinfo x-dev xaw3dg xaw3dg-dev xlibs-dev xlibs-static-dev zlib1g-dev cupsys cupsys-bsd cupsys-client libcupsimage2 cupsys-driver-gimpprint cupsys-driver-gimpprint-data gs-esp

. I did:

# apt-get install libgtk1.2 libgtk1.2-dev (only if you want to use gmplayer)
# apt-get install cdparanoia libcdparanoia0-dev (only if you want to play audio CD's)

. From mplayer web site:

http://www.mplayerhq.hu/

I downloaded the following packages:
MPlayer-1.0pre8.tar.bz2, essential-20060611.tar.bz2,
Blue-1.5.tar.bz2, font-arial-iso-8859-1.tar.bz2 (the latter two
only if you want gmplayer) and put them in ~/tmp. Then,

$ cd ~/tmp
$ tar xjvf essential-20060611.tar.bz2

. The directory /usr/local/lib/codecs didn't exist. I created it, then
from ~/tmp:

# mv -v essential-20060611 /usr/local/lib/codecs

$ tar xjvf MPlayer-1.0pre8.tar.bz2
$ cd MPlayer-1.0pre8
$ ./configure --enable-gui (only if you want gmplayer, otherwise simply `./configure')
$ make (about 15 minutes)
# make install

. Install font-arial-iso-8859-1.tar.bz2 and Blue-1.5.tar.bz2 only
if you want to use gmplayer:

$ cd ~/tmp
$ tar xjvf font-arial-iso-8859-1.tar.bz2
$ cd font-arial-iso-8859-1
# mv -v font-arial-18-iso-8859-1/* /usr/local/share/mplayer/font

$ cd ~/tmp
$ tar xjvf Blue-1.5.tar.bz2
$ cd Blue
# mkdir /usr/local/share/mplayer/Skin
# mkdir /usr/local/share/mplayer/Skin/default
# mv -v * /usr/local/share/mplayer/Skin/default

. I removed Blue, Blue-1.5.tar.bz2, essential-20060611.tar.bz2,
font-arial-iso-8859-1, font-arial-iso-8859-1.tar.bz2,
MPlayer-1.0pre8 and MPlayer-1.0pre8.tar.bz2 from ~/tmp.
I started mplayer with:

$ mplayer -vf eq -dvd-device <device> dvd://3

, where `3' (just an example) is the chapter number that I want to watch,
and <device> is the device name that corresponds to my dvd driver.
It may be: /dev/hdb, /dev/hdc, /dev/hdd, or
/cdrom, /media/cdrom1, /media/cdrom2, /media/cdrom3,
or maybe /dev/scd0, /dev/scd1, /dev/scd2. You have to try.
In my case it was `/dev/hdc'.
Once you've found out the proper device name for <device>, you can do:

# ln -s <device> /dev/dvd

and then start mplayer simply with:

$ mplayer -vf eq dvd://3

and gmplayer with:

$ gmplayer -vf eq

. Stop with `q', control volume with 0 and 9 and brightness with 3 and 4.

You can play `/.../mysong.wav' simply with:

$ mplayer /.../mysong.wav

and stop with C-c. If you want to play audio CD's, you have to install
the packages cdparanoia and libcdparanoia0-dev before installing mplayer
(see above). I wanted to play audio CD's with a different device from
the one used for DVD's. In my case it was `/dev/hdb'.
Then I did:

$ ls -l /dev/hdc
brw-rw---- 1 root cdrom 22, 0 2005-02-26 07:38 /dev/hdc
$ ls -l /dev/hdb
brw-rw---- 1 root disk 3, 64 2005-02-26 07:38 /dev/hdb
# chgrp cdrom /dev/hdb
# ls -l /dev/hdb
brw-rw---- 1 root cdrom 3, 64 2005-02-26 07:38 /dev/hdb

. Then I could play audio CD's with:

$ mplayer -cdrom-device /dev/hdb cdda://

, or simply with:

$ mplayer cdda://

once changed the symlink:

lrwxrwxrwx 1 root root 4 2006-07-15 15:49 /dev/cdrom -> hdc

into /dev/cdrom -> hdb, and stop with C-c.
After cdrecord installation, my DVD device changed from /dev/hdc into
/dev/scd1. So, to play DVD's I had to do:

$ mplayer -dvd-device /dev/scd1 dvd://3

. I did:

# rm /dev/dvd
# ln -s /dev/scd1 /dev/dvd
$ ls -l /dev/dvd
lrwxrwxrwx 1 root root 4 2006-07-15 15:49 /dev/dvd -> scd1

and could play DVD's with:

$ mplayer dvd://3

. After cdrecord installation, my CD device also changed from /dev/hdb to
/dev/scd0, and besides if I wanted to play audio CD's as normal
user I had to add permissions to /dev/sg*. I did:

$ cd /dev
$ ls -l sg*
crw------- 1 root root 21, 0 2005-02-26 07:38 sg0
crw------- 1 root root 21, 1 2005-02-26 07:38 sg1
crw------- 1 root root 21, 10 2005-02-26 07:38 sg10
crw------- 1 root root 21, 11 2005-02-26 07:38 sg11
crw------- 1 root root 21, 12 2005-02-26 07:38 sg12
crw------- 1 root root 21, 13 2005-02-26 07:38 sg13
crw------- 1 root root 21, 14 2005-02-26 07:38 sg14
crw------- 1 root root 21, 15 2005-02-26 07:38 sg15
crw------- 1 root root 21, 16 2005-02-26 07:38 sg16
crw------- 1 root root 21, 2 2005-02-26 07:38 sg2
crw------- 1 root root 21, 3 2005-02-26 07:38 sg3
crw------- 1 root root 21, 4 2005-02-26 07:38 sg4
crw------- 1 root root 21, 5 2005-02-26 07:38 sg5
crw------- 1 root root 21, 6 2005-02-26 07:38 sg6
crw------- 1 root root 21, 7 2005-02-26 07:38 sg7
crw------- 1 root root 21, 8 2005-02-26 07:38 sg8
crw------- 1 root root 21, 9 2005-02-26 07:38 sg9
# chmod 777 sg*
# ls -l sg*
crwxrwxrwx 1 root root 21, 0 2005-02-26 07:38 /dev/sg0
crwxrwxrwx 1 root root 21, 1 2005-02-26 07:38 /dev/sg1
crwxrwxrwx 1 root root 21, 10 2005-02-26 07:38 /dev/sg10
crwxrwxrwx 1 root root 21, 11 2005-02-26 07:38 /dev/sg11
crwxrwxrwx 1 root root 21, 12 2005-02-26 07:38 /dev/sg12
crwxrwxrwx 1 root root 21, 13 2005-02-26 07:38 /dev/sg13
crwxrwxrwx 1 root root 21, 14 2005-02-26 07:38 /dev/sg14
crwxrwxrwx 1 root root 21, 15 2005-02-26 07:38 /dev/sg15
crwxrwxrwx 1 root root 21, 16 2005-02-26 07:38 /dev/sg16
crwxrwxrwx 1 root root 21, 2 2005-02-26 07:38 /dev/sg2
crwxrwxrwx 1 root root 21, 3 2005-02-26 07:38 /dev/sg3
crwxrwxrwx 1 root root 21, 4 2005-02-26 07:38 /dev/sg4
crwxrwxrwx 1 root root 21, 5 2005-02-26 07:38 /dev/sg5
crwxrwxrwx 1 root root 21, 6 2005-02-26 07:38 /dev/sg6
crwxrwxrwx 1 root root 21, 7 2005-02-26 07:38 /dev/sg7
crwxrwxrwx 1 root root 21, 8 2005-02-26 07:38 /dev/sg8
crwxrwxrwx 1 root root 21, 9 2005-02-26 07:38 /dev/sg9

. After that, I could play audio CD's with:

$ mplayer -cdrom-device /dev/scd0 cdda://

. I did:

# rm /dev/cdrom
# ln -s /dev/scd0 /dev/cdrom
$ ls -l /dev/cdrom
lrwxrwxrwx 1 root root 4 2006-07-15 15:49 /dev/cdrom -> scd0

and could play audio CD's simply with:

$ mplayer cdda://
Last edited by Rodolfo Medina on 2006-07-15 21:39, edited 2 times in total.

Grifter
Posts: 1554
Joined: 2006-05-04 07:53
Location: Svea Rike

#2 Post by Grifter »

if you want a deb instead of a source install, remove what you have so far, make uninstall, and then in the mplayer dir, fakeroot debian/rules binary, and it will create a deb file of mplayer in the parent dir

to give configure options to this you'd do

DEB_BUILD_OPTIONS='--enable-this --disable-that' fakeroot debian/rules binary

you need the package fakeroot for this, and possibly debhelper, and liblogfile-rotate-perl and libconfhelper-perl or some such, the two last packages are needed to dpkg -i the deb file
Eagles may soar, but weasels don't get sucked into jet engines...

improper
Posts: 55
Joined: 2006-07-15 08:02

#3 Post by improper »

Thanks for the descriptions.
The "make" part results in an error for me about "multiple definition of `__i686.get_pc_thunk.bx'".
Any idea what could be causing the problem?


---last part of make output---
gcc-3.3 -I../libvo -I../../libvo -I/usr/X11R6/include -fno-PIC -O4 -march=pentium2 -mcpu=pentium2 -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I/usr/include/freetype2 -I/usr/X11R6/include -I./libavutil -I./libavcodec -o mplayer mplayer.o m_property.o mp_msg.o asxparser.o codec-cfg.o cpudetect.o edl.o find_sub.o m_config.o m_option.o m_struct.o parser-cfg.o playtree.o playtreeparser.o spudec.o sub_cc.o subreader.o vobsub.o unrarlib.o mixer.o parser-mpcmd.o subopt-helper.o libvo/libvo.a libao2/libao2.a input/libinput.a vidix/libvidix.a Gui/libgui.a libmpcodecs/libmpcodecs.a loader/libloader.a loader/dshow/libDS_Filter.a loader/dmo/libDMO_Filter.a libaf/libaf.a libmpdemux/libmpdemux.a postproc/libswscale.a osdep/libosdep.a -Llibmpdvdkit2 -lmpdvdkit libavcodec/libavcodec.a libavformat/libavformat.a libavutil/libavutil.a libpostproc/libpostproc.a -lpng -lz -lz -ljpeg -lfreetype -lz -lnsl -lfontconfig libfaad2/libfaad2.a mp3lib/libMP3.a liba52/liba52.a libmpeg2/libmpeg2.a tremor/libvorbisidec.a -Wl,--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lglib-2.0 -lGL -ldl -lXv -L/usr/X11R6/lib -lXext -lX11 -lnsl -lpthread -lnsl -laudio -lXt -L/usr/X11R6/lib -lXext -lX11 -lnsl -lpthread -Wl,-z,noexecstack -lpthread -ldl -rdynamic -lm
/usr/lib/libc_nonshared.a(elf-init.oS)(.gnu.linkonce.t.__i686.get_pc_thunk.bx+0x0): In function `__i686.get_pc_thunk.bx':
: multiple definition of `__i686.get_pc_thunk.bx'
/usr/X11R6/lib/libGL.a(glxcmds.o)(.gnu.linkonce.t.__i686.get_pc_thunk.bx+0x0): first defined here
Gui/libgui.a(interface.o)(.text+0x604): In function `guiInit':
: undefined reference to `vo_setwindow'
collect2: ld returned 1 exit status
make: *** [mplayer] Error 1

Rodolfo Medina
Posts: 35
Joined: 2006-05-06 10:39

#4 Post by Rodolfo Medina »

Sorry, all I know about the subject is in the description.
I reported the packages installed in my system: have you checked that the problem
might not be in the lack of one of those?

Good luck, and please post here the solution when you'll find it.
Rodolfo

improper
Posts: 55
Joined: 2006-07-15 08:02

#5 Post by improper »

Rodolfo Medina wrote:have you checked that the problem
might not be in the lack of one of those?
if i do an apt-get install {all your packages summed up] then i get:
The following extra packages will be installed:
lbxproxy proxymngr twm xdm xfs xfwp xnest xpdf-common xpdf-utils xprint
xprint-common xprt-xprintorg xterm xvfb
Suggested packages:
foomatic-bin foomatic-filters-ppds xpdf-korean xpdf-japanese
xpdf-chinese-traditional xpdf-chinese-simplified cups-pdf hplip gtklp
cupsys-pt xpp gimpprint-doc gimpprint-locales gcc-3.3-doc autoconf automake
libtool gcc-doc tk8.4-dev tk-dev kernel-package libstdc++5-3.3-doc
stl-manual xpdf-reader xfonts-cyrillic
Recommended packages:
smbclient patchutils psfontmgr
The following packages will be REMOVED:
lpr
The following NEW packages will be installed:
autotools-dev build-essential cupsys cupsys-bsd cupsys-client
cupsys-driver-gimpprint cupsys-driver-gimpprint-data dpatch g++ g++-3.3 gcc
gs-esp kernel-source-2.4.27 lbxproxy libcupsimage2 liblockfile-dev
libncurses5-dev libpng3-dev libstdc++5-3.3-dev libtiff4-dev libtiffxx0
libungif4-dev libxaw7-dev proxymngr twm x-window-system xaw3dg xaw3dg-dev
xdm xfs xfwp xnest xpdf-common xpdf-utils xprint xprint-common
xprt-xprintorg xterm xvfb
0 upgraded, 39 newly installed, 1 to remove and 10 not upgraded.

I'd rather not install anything that i do not need.
If there is something that you think is essential, i'l give it a try.
Running 2.6 kernel myself by the way and i already tried gcc 3.4 too.
Rodolfo Medina wrote:Good luck, and please post here the solution when you'll find it.
Rodolfo
Thanks, if i do find a solution, i'll come back here to post it, but i am afraid that i'm ready to give up.
The error: "multiple definition of `__i686.get_pc_thunk.bx'" seems to be common to google though, but i can't track te problem down.
It seems like one of the compiled items that those projects include also have the same problem.
To me, it seems like some object already builds or links with __i686.get_pc_thunk and MPlayer too which makes the linker later have a problem joining everything into a single object without double code.

Rodolfo Medina
Posts: 35
Joined: 2006-05-06 10:39

#6 Post by Rodolfo Medina »

Maybe the problem is due to the kernel?
The procedure I reported is for the 2.4.

But, before giving it up, I suggest you to apply the `mplayer.user' mailing list:
I got some important help there.
If you use nntp, its hierarchy is:

gmane.comp.video.mplayer.user

, at:

http://news.gmane.org/gmane.comp.video.mplayer.user

; otherwise look in internet for the actual mailing list posting address.
Bye,
Rodolfo

Grifter
Posts: 1554
Joined: 2006-05-04 07:53
Location: Svea Rike

#7 Post by Grifter »

try updating libc6 and libc6-dev
Eagles may soar, but weasels don't get sucked into jet engines...

improper
Posts: 55
Joined: 2006-07-15 08:02

#8 Post by improper »

Grifter wrote:try updating libc6 and libc6-dev
Thanks for the tip.
I checked, but i don't think there are newer versions than the 2.3.6-16 that i am using now.

Grifter
Posts: 1554
Joined: 2006-05-04 07:53
Location: Svea Rike

#9 Post by Grifter »

ok, try getting gcc and g++ 4 in that case and compile with that
Eagles may soar, but weasels don't get sucked into jet engines...

improper
Posts: 55
Joined: 2006-07-15 08:02

#10 Post by improper »

Grifter wrote:ok, try getting gcc and g++ 4 in that case and compile with that
I installed them and triedagain, but no success.
The ./configure --enable-gui told me that in an unsopported error.
But i used "Synaptic Package Manager" to uninstall all stuff again that i installed with it during my whole MPlayer pain the last week and also disabled everything other than stable repositories again to revert back to where i startted as much as possible.
gcc 3.3 was installed by default, but i since the 3.4 which i also installed seems to be in the stable repository too, i decided to keep that and remove 3.3 again.
Last build with tears in my eyes, to make sure i won't be tempted to mess with this soon... snif :-(
But hey!!!! Many more compiler warnings than before, but no fatal error at the endresult..
Do i dare to type make install, then mplayer or even gmplayer???
Well, i boldly did and...

!!!happy...happy..Joy...Joy!!!

Nice looking GUI appears (the Blue version which i amongst with some fonts later also installed, because i already forgot that is also required ;-)
I do get the following message on my Celeron though:

---
MPlayer 1.0pre8-3.4.6 (C) 2000-2006 MPlayer Team
CPU: Intel Celeron A Mendocino/Pentium II Dixon (Family: 6, Model: 6, Stepping: 5)
CPUflags: MMX: 1 MMX2: 0 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0
Compiled for x86 CPU with extensions: MMX

Linux RTC init error in ioctl (rtc_irqp_set 1024): Permission denied
Try adding "echo 1024 > /proc/sys/dev/rtc/max-user-freq" to your system startup scripts.
---

Will look into that later, going to check out if all the trailers of the local cinema that i couldn't see now work :-)))
I see some debian .deb specific notes in the readme and also in Grifter's post above.
I'm totally new at Linux, so it may take a while before i figure that out and get the "mozilla-mplayer" plugin package that "Synaptic Package Manager" shows me to install.
Currently it tells me it can't because MPlayer is required and can not be installed (it really already is installed, but need to make it aware of that somehow).

Thanks Grifter and Rodolfo !!!

Grifter
Posts: 1554
Joined: 2006-05-04 07:53
Location: Svea Rike

#11 Post by Grifter »

if you install a package, then it will be in your database of packages, and other packages will know about it

if you install from source, other programs will not know about it because it's not visible to them, not in the database

if you install mplayer as per instructions given earlier in this thread, to create a deb file, installing the deb file will make it be a part of the debian package management, and thus will solve other program dependencies
Eagles may soar, but weasels don't get sucked into jet engines...

Grifter
Posts: 1554
Joined: 2006-05-04 07:53
Location: Svea Rike

#12 Post by Grifter »

my favourite three deb build options (also as per instructions earlier, the variable before fakeroot) are: --disable-runtime-cpudetection --disable-rtc --disable-gui

the first one speeds up the startup time, the second and you don't have to worry about the realtime clock, the third should be obvious, otherwise in the error you posted about rtc, the fix is simple, it even told you how to solve it
Eagles may soar, but weasels don't get sucked into jet engines...

improper
Posts: 55
Joined: 2006-07-15 08:02

#13 Post by improper »

Grifter wrote:if you install a package, then it will be in your database of packages, and other packages will know about it

if you install from source, other programs will not know about it because it's not visible to them, not in the database

if you install mplayer as per instructions given earlier in this thread, to create a deb file, installing the deb file will make it be a part of the debian package management, and thus will solve other program dependencies
I figured it would be something like that.
I have copied, pasted and executed that fakeroot line from the original readme and got errors.
At first about unknown command which was solved after looking for it with the Synaptic app and installing it.
The things i got after that i forgot, but will try again.
Hopefully i will eventually get such a deb file and then i only need to figure out what to do with it.

ajdlinux
Posts: 2452
Joined: 2006-04-23 09:37
Location: Port Macquarie, NSW, Australia

#14 Post by ajdlinux »

For those who are unaware - go to Debian Multimedia to get an unofficial .deb package.

improper
Posts: 55
Joined: 2006-07-15 08:02

#15 Post by improper »

Grifter wrote:my favourite three deb build options (also as per instructions earlier, the variable before fakeroot) are: --disable-runtime-cpudetection --disable-rtc --disable-gui

the first one speeds up the startup time, the second and you don't have to worry about the realtime clock, the third should be obvious, otherwise in the error you posted about rtc,
What --disable-gui does seems obvious to me indeed, but i must wrong about that because it sounds like something i need.
Grifter wrote:the fix is simple, it even told you how to solve it
I quess that you are referring to this:
----
Linux RTC init error in ioctl (rtc_irqp_set 1024): Permission denied
Try adding "echo 1024 > /proc/sys/dev/rtc/max-user-freq" to your system startup scripts.
----
For linux having any experience with this, it might be obvious, but all
To be honest, all what this says to me is:
1. that there is something wrong that i don't understand
2. my system is supposed to have atleast two "system startup scripts"
3. i should TRY to add a line in all these supposed "system startup scripts" that i have, to see if that helps.

Grifter
Posts: 1554
Joined: 2006-05-04 07:53
Location: Svea Rike

#16 Post by Grifter »

well you don't have to add it to the system scripts, but you can at least try out the command line right now

type the whole thing,

echo 1024 > /proc/sys/dev/rtc/max-user-freq

and then try to mplayer, see what happens (:

personally I just disable rtc in the config, along with runtime cpudetection and gui, --disable-gui does not build a gui, the only gui i need for mplayer is an xterm, but I did also say that those three configure options were _my_ personal faves (:
Eagles may soar, but weasels don't get sucked into jet engines...

Post Reply