Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
krsshs-Power-Mac-G5:~ krssh\$ port -v installed libsdl2-x11 libsdl2-cocoa libplacebo mpv ffmpeg ffmpeg5 ffmpeg7
The following ports are currently installed:
ffmpeg @4.4.6_7+G5+gpl2 (active) requested_variants='+G5' platform='darwin 10' archs='ppc' date='2025-12-31T10:59:48+0300'
ffmpeg5 @5.1.8_1+G5+gpl2 (active) requested_variants='+G5' platform='darwin 10' archs='ppc' date='2025-12-31T11:45:46+0300'
ffmpeg7 @7.1.3_1+gpl2+vmaf (active) requested_variants='' platform='darwin 10' archs='ppc' date='2025-12-31T10:48:09+0300'
libplacebo @7.351.0_0+opengl (active) requested_variants='' platform='darwin 10' archs='ppc' date='2025-12-31T10:59:12+0300'
libsdl2-cocoa @2.32.10_1+oldapi+opengl requested_variants='+oldapi' platform='darwin 10' archs='ppc' date='2025-12-31T11:17:27+0300'
libsdl2-cocoa @2.32.10_1+opengl (active) requested_variants='' platform='darwin 10' archs='ppc' date='2025-12-31T10:35:37+0300'
mpv @0.41.0_0+audiocd+bluray+dvd+libarchive+libmpv+network_ytdlp+opengl+osd+python313+rubberband (active) requested_variants='' platform='darwin 10' archs='ppc' date='2025-12-31T11:01:45+0300'

Did you uninstall `libsdl2-x11`? Or why is it not shown?

In principle, you are supposed to have mpv +x11 (and whatever default variants) and ffmpeg7 +x11 when you wanna use X11 backend. It might work without that, but is untested and not guaranteed.
It is slightly tricky to install everything with +x11 (due to libsdl2 handling, which should be rewritten), but this should work:
Code:
sudo port deactivate active
sudo port -v -N install libsdl-x11
sudo port -v -N install ffmpeg +x11
sudo port -v -N install ffmpeg7 +x11
sudo port -v -N install mpv +x11
(Here libsdl-x11 is a port name, while +x11 are non-default variants.)

That way dependencies should resolve. Otherwise running `sudo port -v -N install mpv +x11` directly will first install one version of libsdl2 and then another will be tried (via a different dependency path), and you get a conflict.
 
What does mpv show on command line? Does it use sdl or x11 directly? Does it use gl or not?

[vo/sdl] Using opengl
[vo/sdl] Warning: this legacy VO has bad performance. Consider fixing your graphics drivers, or not forcing the sdl VO.
AO: [coreaudio] 48000Hz stereo 2ch floatp
VO: [sdl] 720x400 yuv420p
[osd/libass] fontselect: failed to find any fallback with glyph 0x0 for font: (sans-serif, 400, 0)

Audio/Video desynchronisation detected! Possible reasons include too slow
hardware, temporary CPU spikes, broken drivers, and broken files. Audio
position will not match to the video (see A-V status field).
Consider trying `--profile=fast` and/or `--hwdec=auto` as they may help.

AV: 00:00:13 / 00:23:21 (1%) A-V: 1.778 Dropped: 302

This is weird, I will check it. Do other videos play normally?
Have you compiled it locally or used my package? Do you have qt4-mac or qt4-mac-devel installed?

Xvid works. Performance is bad.
Precompiled.
Error: Can't install qt4-mac-devel because conflicting ports are active: qt4-mac

mplayer can play small av1 test file with little lags. vlc stucks with this file.

krsshs-Power-Mac-G5:~ krssh\$ mplayer -lavdopts threads=6 /Volumes/disk/untitled\ folder\ w/CityHall_854x480.webm
MPlayer 1.5-4.2.1 (C) 2000-2022 MPlayer Team
Can't init Apple Remote.

Playing /Volumes/disk/untitled folder w/CityHall_854x480.webm.
libavformat version 59.17.102 (internal)
libavformat file format detected.
[libdav1d @ 0xd90260]libdav1d 1.5.2
[libdav1d @ 0xd90260]Frame size limit reduced from 2147483647 to 67108864.
[lavf] stream 0: video (av1), -vid 0
VIDEO: [AV01] 854x480 0bpp 60.000 fps 0.0 kbps ( 0.0 kbyte/s)
[gl] using extended formats. Use -vo gl:nomanyfmts if playback fails.
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 59.21.100 (internal)
[libdav1d @ 0xd90260]libdav1d 1.5.2
[libdav1d @ 0xd90260]Frame size limit reduced from 2147483647 to 67108864.
Selected video codec: [fflibdav1d] vfm: ffmpeg (FFmpeg wrapper for libdav1d)
==========================================================================
 
Last edited:
install QMPlay2 - there is gui there, h264 doesn't play - no image, time counter at 00 then stops.

Can’t reproduce. Do you try offline video or streaming? Streaming from YT may have issues for unrelated reasons, offline it works normally for me.
QMPlay2 is a single process, but there is an equal load per-core.

qmplay2_2.png
 
Xvid works. Performance is bad.

Re QMPplay2.
Could you give some details? What machine, what are video specs? If you can share (upload somewhere) a sample of video to try, it will be nice.
4k at 60 FPS will likely lag, though it can be partly improved via settings (disable sync to audio).
But if you get visibly worse performance in QMPlay2 when compared to mpv and mplayer, something is probably wrong.

Precompiled.
Error: Can't install qt4-mac-devel because conflicting ports are active: qt4-mac

sudo port -f deactivate qt4-mac
sudo port -v -N install qt4-mac-devel

P. S. I have verified that QMPlay2 works fine regardless of whether qt4-mac or qt4-mac-devel is used. No issues with offline h264 playback on my end.
 
Last edited:
Can’t reproduce. Do you try offline video or streaming? Streaming from YT may have issues for unrelated reasons, offline it works normally for me.
QMPlay2 is a single process, but there is an equal load per-core.
A disk file. I think it's a performance issue. h265, av1 also stucks at 0.

OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Radeon 9600 OpenGL Engine
OpenGL version string: 2.0 ATI-1.5.48
OpenGL shading language version string: 1.20

Model Name: Power Mac G5
Model Identifier: PowerMac7,3
Processor Name: PowerPC G5 (3.0)
Processor Speed: 2.5 GHz
Number Of CPUs: 2
L2 Cache (per CPU): 512 KB
Memory: 2.5 GB
Bus Speed: 1.25 GHz

ATI Radeon 9650:

Chipset Model: ATY,RV351
Type: Display
Bus: AGP
Slot: SLOT-1
VRAM (Total): 256 MB
Vendor: ATI (0x1002)
Device ID: 0x4150
Revision ID: 0x0000
ROM Revision: 113-A58503-114

Resolution: 1920 x 1080 @ 60 Hz
Depth: 32-Bit Color
Core Image: Hardware Accelerated
Main Display: Yes
Mirror: Off
Online: Yes
Quartz Extreme: Supported
Rotation: Supported
Adapter Type: Unknown

I've tried recording a fragment via vlc from seishun buta in h264. Fragment plays. Slow, frameskipping. Whole file - not. Starts, then stops after a while at 0.

Add. Short samples from https://www.elecard.com/videos in h264 and 265 also works with frameskippping.
 
Last edited:
A disk file. I think it's a performance issue. h265, av1 also stucks at 0.

Could you give a context: CPU, RAM, example of video specs (or even better upload a video which does not play).
AV1 is expected to be problematic, though it should play, unless it is 4k. Can you try a low-res h264, will that play?

You can try this also: open Settings > Playback settings, uncheck Video to audio sync. This should improve performance (helped me with 4k on 2.3, was not needed on the Quad).

P. S. If you used 720x400 yuv420p and 854x480 av1, I would expect these to play just fine in any player. What G5 is this?
 
Thank you, maybe my question was a bit incorrect, what I meant was: looking at the SDL2 repository for 2.32.10

https://github.com/libsdl-org/SDL/archive/refs/tags/release-2.32.10.zip

inside there is an Xcode project for building the needed Framework but of course it is tuned for modern Xcode app and without any support for PPC Macs but would it be possible to apply the same patches done so far for the libraries also to this Xcode project and have a functional SDL2 framework at least for SnowLeo PPC?
I've never tried building it as a Framework, and chances are the included XCode project files are out of sync with recent work (especially the alternate port versions), so YMMV using them at all. There's not a lot of advantages to making it a Framework, other than making it more "Mac like". You'd still need people to have/install a copy of it, and since having it as a Framework is unusual, not many will have it.

Modifying the existing XCode files to work with legacy versions and/or PPC would be quite difficult if there's not already support.

You don't need to worry about requiring macports for SDL if you include a copy of the lib with the app. This is extremely commonly done with games. Alternately, if you link with an SDL, the system can find it wherever it happens to be on people's systems (as long as they have the right version), for example, some may have it in /usr/local/lib and it would find it there.
 
@lauland Could you take a look why mpv via SDL2 Cocoa has no slider for the video? The video (and audio) plays perfectly fine, but the app is "frozen" with ball spinning, so playback cannot be controlled normally. This is not a new problem, I just think it will be nice to fix it.
Via X11 it works as expected.
Could you let me know if this is on Leopard or Snow Leopard PPC (or both)? I can install the mpv port for whichever and take a look. (I've got your macports for Leopard, but not Snow Leopard A5 yet, so that one would take a bit).
 
  • Like
Reactions: barracuda156
Could you let me know if this is on Leopard or Snow Leopard PPC (or both)? I can install the mpv port for whichever and take a look. (I've got your macports for Leopard, but not Snow Leopard A5 yet, so that one would take a bit).

As I recall, the issue is observable on Leopard as well.
 
Re QMPplay2.

P. S. I have verified that QMPlay2 works fine regardless of whether qt4-mac or qt4-mac-devel is used. No issues with offline h264 playback on my end.

I have built updated dependencies now, and QMPlay2-devel works fine on Leopard.

leopard.png


P. S. Looks like some of my RAM died :(
 
You don't need to worry about requiring macports for SDL if you include a copy of the lib with the app. This is extremely commonly done with games. Alternately, if you link with an SDL, the system can find it wherever it happens to be on people's systems (as long as they have the right version), for example, some may have it in /usr/local/lib and it would find it there.

Thank you very much, so if I understand well I can pick up the sdl2 library from the MacPorts binaries directory of my PowerMac, put in the /usr/local/lib of another with the same OS and the Mame executable would run as long I declare the same location before the compile? Nice! The latest version of MAME capable of running in OSX 10.6 is the 0.226, I have tried to compile the source from the MacPorts distribution but without luck, I will re-try from the archive in the official MAME source repository. For OSX 10.5 PPC instead the latest version I was able to compile is the 0.168, after that it was no more possible, but I hope on OSX 10.6 PPC to reach at least the 0.226: having and updated MAME running on my G4 would be almost a miracle! :-D
 
Thank you very much, so if I understand well I can pick up the sdl2 library from the MacPorts binaries directory of my PowerMac, put in the /usr/local/lib of another with the same OS and the Mame executable would run as long I declare the same location before the compile?

In general that is not the case, but specifically libsdl2 (if built with Cocoa and not X11) only links to system libraries, so you do not need to carry other ports with it. If you want to change its install path, use install_name_tool.

Nice! The latest version of MAME capable of running in OSX 10.6 is the 0.226, I have tried to compile the source from the MacPorts distribution but without luck, I will re-try from the archive in the official MAME source repository. For OSX 10.5 PPC instead the latest version I was able to compile is the 0.168, after that it was no more possible, but I hope on OSX 10.6 PPC to reach at least the 0.226: having and updated MAME running on my G4 would be almost a miracle! :-D

If it uses only SDL2 and no Cocoa directly, that should be easy.
 
@SnakeCoils The thing is monstrously huge, I interrupted the build and will resume tomorrow. I should probably build in its latest version (unless there is a lot of ObjC sitting somewhere). It may also be possible to switch to X11 and bypass Cocoa horrors altogether.

Do you recall what was the problem when you compiled? What specifically fails?
 
Yes, the compile time for MAME on our beloved PowerMacs can be measured in days instead of minutes.
I am also trying to build on my side, so far I have encountered this error in some of the Atari drivers:

In file included from ../../../../../src/emu/emu.h:32:
../../../../../src/mame/drivers/akkaarrh.cpp:81:38: in 'constexpr' expansion of 'operator""_MHz_XTAL(1.20959999999999999999999999999999e+1l)'
../../../../../src/emu/xtal.h:85:83: error: '(1.20959999999999999999999999999999e+1l * 1.0e+6l)' is not a constant expression
85 | constexpr XTAL operator ""_MHz_XTAL(long double clock) { return XTAL(double(clock * 1e6)); }
| ~~~~~~^~~~~

This affect the following drivers in src/mame/drivers :

akkaarrh.cpp
firetrk.cpp
flyball.cpp
quantum.cpp
quizshow.cpp
sbrkout.cpp
tempest.cpp

This is related to the clock frequency of the main CPU of the emulated game, to resume the compile I have patched on the fly the sources changing this string:

static constexpr XTAL MASTER_CLOCK = 12.096_MHz_XTAL;

in this one:

static constexpr XTAL MASTER_CLOCK = 12096_kHz_XTAL;

The clock is exactly the same, the difference is one is expressed in MHz and the other in KHz, maybe there are other drivers affected by this issue but for now the modification was enough to allow the compile to go on. Looks like the compiler does not like the way this decimal value is handled, maybe it can be fixed in src/emu/emu.h or src/emu/xtal.h for all the drivers but this exceed my understanding of the code :-(

The next error is BGFX related, apparently there is a variable "TARGET_OS_OSX" that is not set properly and lead the build of the MAME Gui to fail in some of its component and halting the compile. In the meantime I am relaunching the MAME install after every little patch to see when it fails the next time.
 
Last edited:
Could you let me know if this is on Leopard or Snow Leopard PPC (or both)? I can install the mpv port for whichever and take a look. (I've got your macports for Leopard, but not Snow Leopard A5 yet, so that one would take a bit).

Confirmed the same problem on Leopard.
 
Crispy-doom port exhibits a similar behavior. Game runs fine but appears frozen on the spinner and doesn't accept any input.
 
  • Like
Reactions: barracuda156
I'm just putting my two cents here: could it be related to the minimum OpenGL version supported by the graphics card? I remember some time ago then, for example, the ppc build of RetroArch (another multi-emulator like MAME) was working fine on the 7800GS (openGL 2.1) while on anything below it displays nothing but a black screen. Also I remember I was having the spinning rainbow ball issue when I tried to run FS-UAE for OSX ppc compiled with an experimental SDL2 version 2.0.5 from the now gone "kencu" GitHub page (LeopardPorts), the only version that worked reliably for me was the 2.0.3
 
Last edited:
I'm just putting my two cents here: could it be related to the minimum OpenGL version supported by the graphics card?

From commit history it follows that mpv upstream has likely broken a lot, but how does it work via SDL2?
But in any case, libmpv is broken and should be just fixed.

also I remember I was having the spinning rainbow ball issue when I tried to run FS-UAE for OSX ppc compiled with an experimental SDL2 version 2.0.5 from the now gone "kencu" GitHub page (LeopardPorts), the only version that worked reliably for me was the 2.0.3

Well, Apple garbage languages tend to fail in obscure ways and are pain to fix. I also had no luck with running a later SDL2 last time I tried. Fixing the build is not too hard, but the app is dead. (Like many others with ObjC…)

P. S. In principle there is no real necessity to have arbitrarily later SDL2 version than we have, it will be enough to fix the current one properly.
 
  • Like
Reactions: SnakeCoils
OpenGL: Hmm...an app can call the OpenGL libs directly and pass a Cocoa (or Carbon) context, completely outside of SDL, or, use SDL's support for OpenGL with an SDL "surface". (In that case SDL doesn't do much other than passing things to OpenGL after setup). mpv (or maybe just libmpv) might do both, or at least support both.

If it uses SDL's support, then there are checks in SDL for various GL extensions and other requirements, that an app directly calling OpenGL wouldn't have to pass. Or if it suported both there would be multiple paths through the code. The failure points could be in a lot of different places.

@barracuda156 , you mentioned things that rely on libmpv not working with GL, ie not mpv itself...do you have some good examples for me to look at?
 
@barracuda156 , you mentioned things that rely on libmpv not working with GL, ie not mpv itself...do you have some good examples for me to look at?

This works on Catalina but fails on mpv GL context on SL:

Notice, it uses an updated glfw. It will not build against the current one in PPCPorts.
(It will actually be nice to fix, it is a lite and neat video player.)

Another one is `wiliwili` in PPCPorts, but there is an unrelated issue with streaming (caused by the service itself), and the issue show up when trying to stream, so that won’t do at the moment.
 
About the phonon and qt4-mac-sqlite3-plugin here are the errors from installation in PPCPorts (OSX 10.5):

sudo port install phonon
--> Computing dependencies for phonon
---> Fetching archive for phonon
---> Attempting to fetch phonon-4.10.3_0+compversion440.darwin_9.ppc.tbz2 from http://macos-powerpc.org/packages/phonon
---> Attempting to fetch phonon-4.10.3_0+compversion440.darwin_9.ppc.tbz2 from http://macos-powerpc.org/packages_ppc64/phonon
---> Staging phonon into destroot
Error: Failed to destroot phonon: ln: /opt/local/var/macports/build/phonon-df9a10e9/work/destroot/opt/local/lib/libphonon.4.dylib: File exists
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_macos-powerpc.org_macos-powerpc_PPCPorts_ports_audio_phonon/phonon/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port phonon failed

sudo port install qt4-mac-sqlite3-plugin
Error: Unable to open port qt4-mac-sqlite3-plugin: can't read "qt4_dependency": no such variable

In the meantime I have deactivated qt4-mac and now my MDD is busy in compiling qt4-mac-devel to see if the error persist, in a couple of days it should be done :)
 
About the phonon and qt4-mac-sqlite3-plugin here are the errors from installation in PPCPorts (OSX 10.5):

Edited: Ignore this, it is a destroot error, not installation. I will just try locally.

P. S. It is advisable to run everything with `-v`, otherwise output is not much helpful.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.