Building MPlayer 1.0-pre6a under YDL-4.0 [LONG]

Joseph E. Sacco, Ph.D. joseph_sacco at comcast.net
Thu Jan 6 19:55:53 MST 2005


I have "successfully" built the latest version of MPlayer

	http://www.mplayerhq.hu/homepage/design7/news.html

under YDL-4.0. The build required fixing some include files, which will
be discussed below.  I "tested" MPlayer using an mp4 file containing the
movie trailer for "Jurassic  Park". Both the sound and the video
"worked" as did the controls for the player.  Beyond running an mp4
file, I have not tested any of its other capabilities. Hopefully others
on the list who have access to files in the various supported formats
will exercise the application.

        Enabled optional drivers:
        -------------------------
        Input: ftp network tv-v4l2 tv-v4l edl tv matroska cdda mpdvdkit2
        vcd dvb smb
        
        Codecs: libdv libavcodec real xanim faad2(internal) libmpeg2
        liba52 mp3lib libtheora libvorbis libmad gif     
        
        Audio output: alsa esd arts oss sdl mpegpes(dvb)
            
        Video output: xvidix cvidix sdl gif89a md5sum pnm jpeg png
        mpegpes(dvb) fbdev caca aa opengl dga xv x11 xover tga     
        
        Audio filters:
        
        Disabled optional drivers:
        --------------------------
        Input: tv-bsdbt848 live.com dvdread
        
        Codecs: qtx opendivx x264 xvid dshow/dmo win32 libdts toolame
        liblzo
        
        Audio output: sgi sun jack polyp dxr2 nas dsound win32 macosx
        
        Video output: winvidix bl zr zr2 dxr3 dxr2 directx vesa svga
        ggi      xmga mga xvmc directfb tdfx_vid tdfxfb 3dfx quartz     
        
        Audio filters: ladspa


Discussion
-------------

INCLUDE FILES:
For reasons unknown to me, YDL-4.0 comes with kernel include files from
linux-2.4.20:

	/usr/include/linux
	/usr/include/asm-ppc
	/usr/include/asm-ppc64
	/usr/include/asm -> /usr/include/asm-ppc on my G4 system

I have renamed these directories, adding a "-2.4.20" suffix, and have
installed kernel include files from linux-2.6.9, which seems like the
right thing to do. If it's not, I would like to know why.

There are issues with the linux-2.6.9 include files, some of which have
been resolved in linux-2.6.10. 

On my system I have patched the following include files:

        /usr/include/sys/uio.h
        /usr/include/linux/mod_devicetable.h
        
        /usr/include/linux/byteorder/big_endian.h
        /usr/include/linux/byteorder/little_endian.h
        /usr/include/linux/crc-ccitt.h
        /usr/include/linux/prio_tree.h

The first two were patched to get MPlayer to compile.  The others were
patched earlier to get MOL to compile. I don't know if you need all of
these patches to build MPlayer, but I will provide all of them just in
case.

The uio.patch corrects an identifier naming conflict that only arises on
PPC's that support AltiVec.

The other patches deal with type definitions for things that are defined
in <linux/types.h>.

With these change the application builds.


BUILDING MPlayer:

* Read at least the README [:-)]
There is lots of documentation that comes with the distribution

* Configure
./configure --prefix=/usr --mandir=/usr/share/man --confdir=/etc/mplayer
--enable-gui 2>&1 | tee c.log

Examine c.log carefully.  You may be able to add some missing
capabilities by downloading and building a library or two. 

Here a good place to find such things:

	http://ftp.freshrpms.net/pub/freshrpms/yellowdog/

[That is where I found libtheora.]

* Build it
 make > make.log 2>&1 &

* Install it
make install > make_install.log 2>&1

Additional Steps:
* download and install the on screen fonts per the README
* download and install one or more skins per the README

LET's PLAY:
mplayer <movie file>

If you fire up mplayer from a terminal window, mplayer will spew out a
bunch of information about what it knows and what it is doing. Some of
the output raises questions.

REAL TIME CLOCK issue:
        % mplayer MPEGSolution_jurassic.mp4
        MPlayer 1.0pre6-3.3.3 (C) 2000-2004 MPlayer Team
        AltiVec found
        CPU: PowerPC
         
        Linux RTC init error in ioctl (rtc_irqp_set 1024): Invalid
        argument
        Try adding "echo 1024 > /proc/sys/dev/rtc/max-user-freq" to your
        system startup scripts.
                                ...

There is no rtc branch in the /proc file system tree on my system.  I
looked at the kernel configuration and did no see anything that would
make one appear. [Is this an Intel thing???]

I thought about manipulating max-user-freq by adding an entry to
sysctl.conf. However, in order for that to work, max-user-freq must one
of the available parameters.  Running "/sbin/sysctl -a " shows it is
not; there are no rtc entries.

I looked at the kernel source,

	./drivers/char/rtc.c

and noticed that

	static unsigned long rtc_max_user_freq = 64; 

I set this to 1024, rebuilt andinstalled the kernel, rebooted, and reran
MPlayer --- same ioctl problem.

So...,  I do not know how to resolve the RTC issue.


LIRC:
I do not have linux infrared remote control capabilities, and MPlayer
noticed:

        Setting up LIRC support...
        mplayer: could not connect to socket
        mplayer: No such file or directory
        Failed to open LIRC support.
        You will not be able to use your remote control.

If you do have IR capabilities, you can build LIRC into the kernel and
control MPlayer remotely [excellent!!!]. 

See
		http://www.lirc.org


TOOLS:
The distribution comes with a bunch of tools in the TOOLS directory.
Some of these do not build. Others cannot be built on a PPC.  

The one tool the documentation suggests that you build is "netstream",
which allows you to access most Mplayer stream types from a remote host.
I had not [yet] succeeded in getting netstream to link. The linker spews
out a ton of "undefined reference" messages, so something is missing.

CODECS:
MPlayer comes with quite an assortment of CODECS that run on a PPC.
There are others that are Intel specific that are not available for PPC.

The MPlayer web page provides some pointers to additional codecs. One
set that might be of interest are the  codecs for RealPlayer.  The
MPlayer web site offers the codecs for RealPlayer8 for linux PPC.  The
codecs for RealPlayer10 can be copied from the RealPlayer10 for linux
PPC from the Helix Community.

	https://helixcommunity.org/


-Joseph

-- 
joseph_sacco[at]comcast[dot]net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: big_endian.patch
Type: text/x-patch
Size: 2111 bytes
Desc: not available
Url : http://lists.terrasoftsolutions.com/pipermail/yellowdog-general/attachments/20050106/624d91ae/big_endian.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crc_ccitt.patch
Type: text/x-patch
Size: 731 bytes
Desc: not available
Url : http://lists.terrasoftsolutions.com/pipermail/yellowdog-general/attachments/20050106/624d91ae/crc_ccitt.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: litle_endian.patch
Type: text/x-patch
Size: 1886 bytes
Desc: not available
Url : http://lists.terrasoftsolutions.com/pipermail/yellowdog-general/attachments/20050106/624d91ae/litle_endian.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mod_device.patch
Type: text/x-patch
Size: 398 bytes
Desc: not available
Url : http://lists.terrasoftsolutions.com/pipermail/yellowdog-general/attachments/20050106/624d91ae/mod_device.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: prio_tree.patch
Type: text/x-patch
Size: 400 bytes
Desc: not available
Url : http://lists.terrasoftsolutions.com/pipermail/yellowdog-general/attachments/20050106/624d91ae/prio_tree.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uio.patch
Type: text/x-patch
Size: 2175 bytes
Desc: not available
Url : http://lists.terrasoftsolutions.com/pipermail/yellowdog-general/attachments/20050106/624d91ae/uio.bin


More information about the yellowdog-general mailing list