Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

alenu

macrumors member
Original poster
Jul 8, 2020
52
91
After many months of waiting for an "official" release, I have updated the PPCMC app myself with Python 3.11 and the latest yt-dlp, which now can be again automatically downloaded from the app´s menu as it was intended before it started to ask for a newer version of Python.

Python 3.11 was obtained via the incredible package manager made by @cellularmitosis , leopard.sh

I have uploaded the necessary files and instructions for a manual update to my Google Drive account in case anyone wants to try it. I have tested this in all my PPC Macs and it works just fine.

Consider this a little workaround until Alex releases a new version of the app.

Cheers.

EDIT: as @Doq pointed out, this will not work without leopard.sh Python installed on your machine.

See https://forums.macrumors.com/threads/leopard-sh-and-tiger-sh.2379622/

EDIT 2: @cellularmitosis wrote a script for grabbing the needed packages in case you don´t want to install leopard.sh -see comments below-

 
Last edited:

Doq

macrumors 6502
Dec 8, 2019
459
704
The Lab DX
Should probably point out that the leopard.sh Python 3.11 is required, else it dies-- this hotfix is not self-contained, but it does work.
 

Attachments

  • Picture 2.png
    Picture 2.png
    99 KB · Views: 126
  • Like
Reactions: cellularmitosis

cellularmitosis

macrumors regular
Mar 6, 2010
144
239
Should probably point out that the leopard.sh Python 3.11 is required, else it dies-- this hotfix is not self-contained, but it does work.
ehhhh yeah unfortunately the python-3.11.2 package requires a lot of dependencies, partly because it required gcc-4.9.4 to build.

If I wipe out /opt and then install python-3.11.2, here's what I end up with:

Code:
$ ls /opt/
ca-certificates-20230110 leopard.sh               openssl-1.1.1t
cloog-0.18.1             libffi-3.4.2             python-3.11.2
expat-2.5.0              libiconv-1.16            readline-8.2
gcc-4.9.4                libiconv-bootstrap-1.16  sqlite3-3.40.1
gdbm-1.23                libunistring-1.0         tcl-8.6.12
gettext-0.21             mpc-1.0.3                tigersh-deps-0.1
gmp-4.3.2                mpfr-3.1.6               tk-8.6.12
isl-0.12.2               ncurses-6.3              xz-5.2.5

However, you don't actually need leopard.sh to install any of this, you could write a targeted script which just grabs those packages.
 
  • Love
Reactions: alenu

cellularmitosis

macrumors regular
Mar 6, 2010
144
239
However, you don't actually need leopard.sh to install any of this, you could write a targeted script which just grabs those packages.
Ok, as a proof of concept, I did this.

A user running a stock install of Leopard should be able to just paste this into a terminal, assuming that /opt exists and they have permission to write to it:

Code:
set -e -x

cd /opt
touch .write-check
rm .write-check

for pkgspec in \
cloog-0.18.1 \
expat-2.5.0 \
gcc-4.9.4 \
gdbm-1.23 \
gettext-0.21 \
gmp-4.3.2 \
isl-0.12.2 \
libffi-3.4.2 \
libiconv-1.16 \
libiconv-bootstrap-1.16 \
libunistring-1.0 \
mpc-1.0.3 \
mpfr-3.1.6 \
ncurses-6.3 \
openssl-1.1.1t \
python-3.11.2 \
readline-8.2 \
sqlite3-3.40.1 \
tcl-8.6.12 \
tk-8.6.12 \
xz-5.2.5 \
; do
    url=http://leopard.sh/binpkgs/$pkgspec.leopard.g4e.tar.gz
    curl --fail $url | nice gunzip | tar x
done

url=http://leopard.sh/dist/ca-certificates-20230110.tar.gz
curl --fail $url | nice gunzip | tar x

/opt/python-3.11.2/bin/python3 -c 'print("Hello, world!")'

I can't remember if /opt exists on a stock Leopard install. If not:

Code:
sudo mkdir -p /opt
sudo chown $USER /opt

EDIT: Hmmm, maaaaybe might also need Xcode installed, not really sure if anything gets linked against libs which only exist after installing Xcode. http://leopard.sh/dist/orig/xcode314_2809_developerdvd.dmg

Anyway, this approach might be useful for someone who wants to leverage the compiled packages from leopard.sh without forcing their users to go through the leopard.sh setup.
 
Last edited:
  • Love
Reactions: alenu

alenu

macrumors member
Original poster
Jul 8, 2020
52
91
Should probably point out that the leopard.sh Python 3.11 is required, else it dies-- this hotfix is not self-contained, but it does work.
That´s right. I didn´t notice because leopard.sh was already installed on my machines. It seems that the Python 3.11 executable points to some libraries at /opt. The original Python 3.6 exec in PPCMC points to /Applications/PPMC instead. So you need leopard.sh for this hack to work.
 
  • Like
Reactions: Doq

alenu

macrumors member
Original poster
Jul 8, 2020
52
91
Ok, as a proof of concept, I did this.

A user running a stock install of Leopard should be able to just paste this into a terminal, assuming that /opt exists and they have permission to write to it:

Code:
set -e -x

cd /opt
touch .write-check
rm .write-check

for pkgspec in \
cloog-0.18.1 \
expat-2.5.0 \
gcc-4.9.4 \
gdbm-1.23 \
gettext-0.21 \
gmp-4.3.2 \
isl-0.12.2 \
libffi-3.4.2 \
libiconv-1.16 \
libiconv-bootstrap-1.16 \
libunistring-1.0 \
mpc-1.0.3 \
mpfr-3.1.6 \
ncurses-6.3 \
openssl-1.1.1t \
python-3.11.2 \
readline-8.2 \
sqlite3-3.40.1 \
tcl-8.6.12 \
tk-8.6.12 \
xz-5.2.5 \
; do
    url=http://leopard.sh/binpkgs/$pkgspec.leopard.g4e.tar.gz
    curl --fail $url | nice gunzip | tar x
done

url=http://leopard.sh/dist/ca-certificates-20230110.tar.gz
curl --fail $url | nice gunzip | tar x

/opt/python-3.11.2/bin/python3 -c 'print("Hello, world!")'

I can't remember if /opt exists on a stock Leopard install. If not:

Code:
sudo mkdir -p /opt
sudo chown $USER /opt

EDIT: Hmmm, maaaaybe might also need Xcode installed, not really sure if anything gets linked against libs which only exist after installing Xcode. http://leopard.sh/dist/orig/xcode314_2809_developerdvd.dmg

Anyway, this approach might be useful for someone who wants to leverage the compiled packages from leopard.sh without forcing their users to go through the leopard.sh setup.
I can confirm this works :). Thanks! Also, /opt doesn´t exist on stock Leopard, so it must be created first.
 
  • Like
Reactions: cellularmitosis

juanstdio

macrumors member
Jun 3, 2021
50
97
Argentina
Today I spent a few hours trying to get in work in Tiger, but unfortunately I was not able to make it work it the way I liked.. PPCMC is a great solution to combine multiple types of media

However 95% of the times I use my G4 with a 480p video music of 10hs or something like that (office hours :) ) and I want to keep it simple.. so I grabed the latest binary version of yt-dlp and renamed yt-dlp-bin, and placed it into /bin folder of PPCMC.app , two scripts (360 and 480, in another folder) which I open them from the dock.

To search videos I use Safari with "home" set as http://iteroni.com/search
My routine is just search a video, copy the link of the video and click 360 or 480 in the dock, the rest is done via the script..
Here is the PPMC with the yt-dlp binary, plus these two scripts😁

https://1drv.ms/u/s!Asv2hO547RwEgoJd0pijumVmus24qA?e=LG5YLc
 

socom_22

macrumors member
Dec 28, 2022
59
42
Just wanted to confirm that the Python update combined with latest youtube-dl has been working really really well. Excellent work @alenu and thanks to @cellularmitosis for that quick and easy script to install Python 3.11!

I wonder if anyone with extensive knowledge on how youtube-dl works might be able to help me out. These days, many high resolution YT videos (usually 2K, 4K, etc) are no longer encoded in H.264 but instead use the new VP9 (or VP09?) codec. Of course this codec is NOT supported by any player on OSX PPC (as far as I am aware).

I've never been interested in hi-res YT but given that I use a G5 Quad, I do download videos using the 1080p option in PPCMC. This always produced a nice 1080p30 H.264 MP4 video that plays back flawlessly on a Quad. At least until recently.

There appear to be more and more videos now which yield the following error when attempting to download with the 1080p preset in PPCMC:

1693364950861.png


The reason for this is because on some videos, there is no 1080p30 quality option available as you can see:

1693369410624.png


Can someone please walk me through how to go about modifying the PPCMC script to add a 1080p60 download option? I am not certain on this, but I believe the 1080p60 videos are still using H.264 as the codec, so ideally I would like the resulting file to be H.264 codec saved within an MP4 container if possible. The G5 Quad can surprisingly handle 1080p60 video using some of the more efficient video players such as VLC 2.0.10 and CorePlayer.

Thanks!
 
Last edited:

Dronecatcher

macrumors 603
Jun 17, 2014
5,209
7,795
Lincolnshire, UK
@socom_22
The 60fps format is 312 - I don't know which script you're using but this is how it would look on one of my old ones:
export SSL_CERT_FILE=/Applications/PPCMC.app/certs/cacert.pem export REQUESTS_CA_BUNDLE=/Applications/PPCMC.app/certs/cacert.pem; /Applications/PPCMC.app/bin/python3.6 /Applications/PPCMC.app/bin/youtube-dl -o "~/Movies/Youtube/download" --rm-cache-dir --prefer-ffmpeg --ffmpeg-location=/Applications/PPCMC.app/bin/ffmpeg -f 312+140 "$(pbpaste)" /Applications/PPCMC.app/bin/ffplay -vf scale=in_color_matrix=yuva420p,format=rgb32 -loglevel quiet -skip_frame 8 -skip_loop_filter 48 ~/Movies/Youtube/download.mp4 rm ~/Movies/Youtube/download.mp4 killall Terminal

You will have to change it to accomodate how you've patched Python and check whether ffmpeg can actually mux the 312 video and 140 audio together, I haven't tested it yet.
 
  • Like
Reactions: socom_22

Dronecatcher

macrumors 603
Jun 17, 2014
5,209
7,795
Lincolnshire, UK
Ok, I've tested this and it's working on my Powerbook - 1080P@60FPS with audio.
My version assumes that Python is in /opt/ and downloads/muxes the video as download.mp4 to ~/Movies/Youtube/
 

Attachments

  • DWN1080.zip
    11.1 KB · Views: 45

socom_22

macrumors member
Dec 28, 2022
59
42
Thanks @Dronecatcher! The 312+140 format code you posted was the key to figuring this out as I was not too familiar with how to configure youtube-dl.

So I wanted to try and add this functionality while maintaining as much of the original script as possible in its stock configuration. What I did was modify 'main.scpt' which is the AppleScript file that runs the PPCMC GUI. First I revised the GUI to have two distinct 1080p options based on desired framerate:

1693449171585.png

Next, I copied the existing code used for the other quality settings and adapted it with your 60FPS youtube-dl format string. I really wasn't sure whether the resulting video downloaded from YouTube's servers would be encoded in H.264 format, but yes it certainly is!! This is so excellent!

I even modified the terminal outputs accordingly for the cleanest look:

1693449380896.png

1693449460845.png


If anyone wants this, I am posting my modified 'main.scpt' file. It should work as a drag-and-drop solution if you installed Python 3.11 using the method posted above by @cellularmitosis.
 

Attachments

  • main.scpt.zip
    69.2 KB · Views: 69

the mars volta

macrumors newbie
Mar 7, 2008
5
0
Today I spent a few hours trying to get in work in Tiger, but unfortunately I was not able to make it work it the way I liked.. PPCMC is a great solution to combine multiple types of media

However 95% of the times I use my G4 with a 480p video music of 10hs or something like that (office hours :) ) and I want to keep it simple.. so I grabed the latest binary version of yt-dlp and renamed yt-dlp-bin, and placed it into /bin folder of PPCMC.app , two scripts (360 and 480, in another folder) which I open them from the dock.

To search videos I use Safari with "home" set as http://iteroni.com/search
My routine is just search a video, copy the link of the video and click 360 or 480 in the dock, the rest is done via the script..
Here is the PPMC with the yt-dlp binary, plus these two scripts😁

https://1drv.ms/u/s!Asv2hO547RwEgoJd0pijumVmus24qA?e=LG5YLc
Hi, everytime I run the scripts I get HTTP Error 403: Forbidden, but with PPMC it works fine.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.