Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mplayer - advice for building on G4?
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message

Joined: 25 Oct 2002
Posts: 151
Location: Charlotte, NC (USA)

PostPosted: Sat Jan 14, 2006 9:38 pm    Post subject: mplayer - advice for building on G4? Reply with quote


First off, this is not an "mplayer won't run!" post—I am successfully using it every day, though it sometimes fights with ARTS (and ARTS loses). I've built the latest 1.0.20060102 ebuild and it runs. However, I'm looking for advice on how to make it work better, since I consider my situation less than optimal. ;)

  • I run a hardened system with gcc-3.4.4, yet I have to build mplayer with a vanilla gcc-3.3.3 or else it is very unstable. (It was much less stable before I found and destroyed codecs.conf.)
  • Trying out the relatively new x264 codec, I find that audio works but the video is unwatchably garbled.
The first item is the most annoying. I would like to get GCC 3.3.3 off of my system, but I have found that even if I build using a gcc-3.4.4-vanilla profile mplayer crashes almost every time I try to play something. The mplayer ebuilds do seem to filter out many CFLAGS, and they add some of their own relating to SSP, PIE, etc. However, I still have to use 3.3.3 to get a stable mplayer. This is the script I use:
#gcc-config 6   # load vanilla config
gcc-config 1    # Let's try gcc 3.3 just for kicks
source /etc/profile
CFLAGS="-fnoPIC" USE="-hardened" emerge -v mplayer
gcc-config 2    # back to normal (hardened) profile
source /etc/profile
rm /usr/share/mplayer/codecs.conf       # Mplayer site says this file should not exist!

Does anyone with similar hardware have a stable mplayer? How did you get it to be that way?

Regarding the second item, I understand that x264 is still in development and not considered anywhere near complete by its makers. :) Still, H.264 (the standard) is out there, and Apple as well as some anime fansub groups are already releasing videos that use it. In another mplayer thread, folks seem to be using Apple's HD movie trailers as some kind of control group, so I tested it with a couple of those (Superman, X3); I get black squares and discolored blotches all over the video, and error messages on the console, though the sound plays fine. I have a Matroska video (40MB, torrent may be found here) which behaves the same way.

I have successfully built x264-svn, and rebuilt ffmpeg (using patched ebuild from this bug), before recompiling mplayer.

Can we PPC folks expect anything better at the moment? Does someone out there have it working?

Thanks for any info! :)

In case it helps, my system in brief: Dual G4 at 450 MHz, 256 MB RAM, kernel 2.6.10-r6. Long info follows.

nenene mplayer # lshw -short
H/W path          Device             Class          Description
                                     system         PowerMac G4 AGP Graphics
/0                                   bus            Motherboard
/0/fff00000                          memory         Apple PowerMac3,3 3.4f1 BootROM built on 08/08/00 at 22:02:19
/0/0              /proc/device-tree  memory         OpenFirmware 3
/0/1                                 memory         System memory
/0/1/0                               memory         SDRAM PC100-222S
/0/1/1                               memory         SDRAM PC100-222S
/0/1/2                               memory         Memory bank
/0/1/3                               memory         Memory bank
/0/2                                 processor      7400, altivec supported
/0/2/0                               memory         L1 Cache
/0/2/1                               memory         L2 Cache (unified)
/0/3                                 processor      7400, altivec supported
/0/3/0                               memory         L1 Cache
/0/3/1                               memory         L2 Cache (unified)
/0/100                               bridge         UniNorth AGP
/0/100/10         /dev/fb0           display        Rage 128 PF/PRO AGP 4x TMDS
/0/101                               bridge         UniNorth PCI
/0/101/d                             bridge         DECchip 21154
/0/101/d/2                           storage        AHA-7850
/0/101/d/3                           bridge         Mini-PCI bridge
/0/101/d/3/c                         storage        ABP940-U / ABP960-U
/0/101/d/3/d                         communication  OX16PCI954 (Quad 16950 UART) function 0
/0/101/d/3/d.1                       bridge         OX16PCI954 (Quad 16950 UART) function 1 (Disabled)
/0/101/d/7                           generic        KeyLargo Mac I/O
/0/101/d/8                           bus            KeyLargo USB
/0/101/d/8/1      usb1               bus            Apple Computer Inc. KeyLargo USB
/0/101/d/8/1/1                       bus            Hub in Apple Extended USB Keyboard
/0/101/d/8/1/1/1                     input          Apple Extended USB Keyboard
/0/101/d/8/1/1/2                     input          USB Trackball
/0/101/d/9                           bus            KeyLargo USB
/0/101/d/9/1      usb2               bus            Apple Computer Inc. KeyLargo USB (#2)
/0/101/d/a                           bus            TSB12LV26 IEEE-1394 Controller (Link)
/0/102                               bridge         UniNorth Internal PCI
/0/102/f          eth0               network        UniNorth GMAC (Sun GEM)

nenene mplayer # emerge --info
Portage 2.0.53 (default-linux/ppc/2004.2, gcc-3.4.4, glibc-, 2.6.10-gentoo-r6 ppc)
System uname: 2.6.10-gentoo-r6 ppc 7400, altivec supported
Gentoo Base System version 1.6.13
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20-r1
virtual/os-headers:  2.6.11-r2
CFLAGS="-O3 -mcpu=G4 -pipe -fsigned-char -maltivec -mabi=altivec -mpowerpc-gfxopt"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -mcpu=G4 -pipe -fsigned-char -maltivec -mabi=altivec -mpowerpc-gfxopt"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict userpriv"
USE="ppc X acl aim alsa altivec arts audiofile berkdb bitmap-fonts bzip2 bzlib cdr crypt cups curl directfb dvd dvdr emboss ethereal exif expat fam fbcon ffmpeg flac font-server foomaticdb gdbm gif gimp glibc-omitfp glut gmp gpm gstreamer gtk gtk2 hardened icq idn imagemagick imlib jabber java jikes joystick jpeg jpeg2k kde kdexdeltas lcms libwww lzo lzw-tiff mad maildir matroska mng motif mozsvg mp3 mpeg mplayer musepack musicbrainz ncurses nsplugin ogg oggvorbis opengl oss pam parse-clocks pcre pdflib perl pic pie png ppds profile python qt quicktime rage128 readline rtc sasl scanner sdl smp speex spell sqlite ssl svg sysfs tcpd tetex tiff truetype truetype-fonts type1-fonts ucs2 udev unicode usb vcd vorbis wmf x264 xine xml2 xosd xv xvid yahoo zlib userland_GNU kernel_linux elibc_glibc"
Back to top
View user's profile Send private message

Joined: 25 Oct 2002
Posts: 151
Location: Charlotte, NC (USA)

PostPosted: Sun Feb 12, 2006 5:39 am    Post subject: All righty, then... Reply with quote

Since absolutely nobody has replied to this, I am pleased to report that my build of mplayer-1.0.20060102 works much better than any of the 1.0_pre7-* ebuilds did. Specifically, it plays videos with high-quality video, without stuttering sound, and without spewing forth tons of "misaligned" errors.

Even though I have set USE="custom-cflags", mplayer's configure script (not the ebuild) seems to filter out the "-fno-PIC -fno-stack-protector -fno-pie" I had set, but that doesn't seem to matter.

Next, I'll try to emerge mplayer without any custom settings, and see what happens!

==> EDIT <== 2006.02.12 01:25

Well, simply running "emerge mplayer" produced a binary that wouldn't run, so I've gone back to my "rebuild-mplayer" script. It's nothing fancy, but it does build something that works. Compared to many things that have been posted in these forums, it's very primitive, but it gives me a working mplayer!
gcc-config powerpc-unknown-linux-gnu-3.4.4-vanilla
source /etc/profile
CFLAGS="-fno-PIC -fno-stack-protector -fno-pie" USE="-hardened" emerge -bv mplayer
echo "Mplayer .tbz2 should have been created in" $( portageq envvar PKGDIR )
gcc-config powerpc-unknown-linux-gnu-3.4.4      # back to normal (hardened) profile
source /etc/profile
rm /usr/share/mplayer/codecs.conf       # Mplayer site says this file should not exist!

Just "FYI": If codecs.conf exists, it can override many basic settings, and cause much heartache and confusion.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum