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

kahunalx

macrumors newbie
Original poster
Dec 2, 2022
23
22
Alberta, Canada
Hello everyone!

After a long journey driven by pure nostalgia and a lot of tinkering (with a little help from AI along the way!), I'm thrilled to share a project I've been working on: RetroStream
Remember the good old days of watching DivX/XviD movies, series and anime on your Mac? That's the vibe I wanted to recreate, but with modern-encoded media.
I realize this is very niche, but at any rate, I wanted to share it with the retro community in case anyone else finds it useful.

What is it? RetroStream is a client-server proxy that lets your modern machine do the heavy lifting, transcoding H.264/HEVC video from a Plex Media Server into retro-friendly MPEG2 streams, which your retro machines can then play via MPlayer.

You can find the source code, installation instructions and screenshots on Codeberg: https://codeberg.org/jjmarcos/retrostream-py
I have included some down below.
Please, don't forget to take a look at the readme file as well as the build guides to know a little bit more!

For the impatient, here you can find the binary releases for different Operating Systems: https://codeberg.org/jjmarcos/retrostream-py/releases

It's been quite an adventure making this work across such a wide range of hardware and operating systems!
I've built two versions of the client to cover as much hardware as possible:
- Python 2 Client: Designed for Windows 98, Windows XP, and Mac OS X 10.4 Tiger. It runs on Python 2.5-2.7. It should also work on Windows ME, 2000 and macOS X Leopard (untested).
- Python 3 Client: For modern Windows, Linux and newer macOS.

Some features:
Plex Integration: You can browse your libraries, seasons and episodes directly from the your retro machine.
Transcoding: Uses NVENC (Nvidia) and QSV (Intel) on the server to handle the heavy lifting. If they're not available, it falls back to CPU-based transcoding.
Performance: Tested on everything from an Apple PowerMac G4 to a 2020 iMac as clients. On the server side, a Raspberry Pi 5 works, although desktop/laptop hardware is faster.

I'm already thinking about expanding player support (mpv!), integrating Jellyfin, adding AMD Radeon GPU support, and of course, fixing bugs based on community feedback.
This is a hobbyist project, and I'm not a professional dev, so please use at your own discretion and expect some quirks! I'm eager to hear thoughts, bug reports, and suggestions from this amazing community.

Cheers!
 

Attachments

  • g4-tiger-1.png
    g4-tiger-1.png
    1.4 MB · Views: 1
  • g4-tiger-2.png
    g4-tiger-2.png
    1.9 MB · Views: 1
  • g4-archpower-1.jpg
    g4-archpower-1.jpg
    178 KB · Views: 1
  • g4-archpower-2.jpg
    g4-archpower-2.jpg
    217.5 KB · Views: 1
What a cool project! Makes me wish I had a Linux box to test it. On the client side, it may be worth prioritizing ffplay as player support over mpv. While both exist on Tiger, ffplay seems more performant/less buggy. Ffplay is also included in the PPCMC project for Tiger, which is more accessible than trying to build mpv-legacy oneself.
Great job on the documentation! It may be worth linking to an mplayer download for PowerPC Mac OS and listing where that installs the binary for the client to use. Is there a chance of adding the project to pypi for easy installation?
If the server side doesn't need the wx GUI, I could see if the server is portable to Tiger. Though I suppose that defeats the point of using modern hardware to ease things for older hardware.
 
Thanks for the kind words @Forest Expertise !

Yesterday, I tested ffplay from the PPCMC project on my PowerMac G4 MDD (dual 1.2GHz CPUs), the CPU usage was around 90% playing a MPEG-2 transcoded video file, compared to the roughly 50% of CPU usage that MPlayer needed to play the same thing.
I don't think there is going to be a lot of issues with MPlayer since these files are MPEG-2, we aren't talking about XviD or H.264 playback here. At any rate, I will likely add ffplay to the list at some point, having options to choose from is always good!

Thanks for the suggestion regarding the player software, that slipped my mind, I have been playing around with this in so many platforms that it's difficult to keep track. I will include those MPlayer links soon, hopefully.

What I gather from your comment regarding the server is that it's worth it to test it in more platforms than a Linux machine and a Raspberry Pi. As it stands right now, you should be able to run the server in your modern Intel Mac (not sure about Apple Silicon ones). On the client side, if you leave the encoder/decoder options in auto, the server will eventually fallback to CPU transcoding, which is not ideal, but it should work. I will add of this to the docs, so it will be clear for everyone.

I'm actually working on that at the moment by improving the code to get it running more efficiently and use Radeon GPUs whenever is possible, so it will not tax the CPU as much.
FWIW, I did a couple of rough ffmpeg tests in this regard:
My 2020 iMac (Intel i7 10700k / Radeon 5500 XT) running Tahoe transcoded the 960x720 @ 24fps, 1.6mbps, 8-bit H.264 file referenced in the README in almost exactly 1 minute 👍
While my desktop PC (AMD Ryzen 9 5900X / Radeon 7900 XTX) running Linux did it in less than 15 seconds 😲

Stay tuned!
 
What a cool project! Makes me wish I had a Linux box to test it

Why would it need specifically Linux? All dependencies are cross-platform, from what it looks.

On the client side, it may be worth prioritizing ffplay as player support over mpv. While both exist on Tiger, ffplay seems more performant/less buggy. Ffplay is also included in the PPCMC project for Tiger, which is more accessible than trying to build mpv-legacy oneself.

Well, the aim is to assist slower hardware, and this is nothing exclusive about Tiger. 10.5–10.6 may not run on G5 Quad either. (No objections to 10.4 being prioritized, I just don’t see anything Tiger-specific per se in discussed scenario.)

P. S. I am not convinced that ffplay is more performant than mpv (I assume otherwise, though I did not test it much); if we count abysmal support policy of throwing away working code to break it for a subset of systems, then mpv is more buggy, indeed.

It may be worth linking to an mplayer download for PowerPC Mac OS

There is probably none, if you mean a standalone app (not built via ports) – or perhaps some really archaic version.

If the server side doesn't need the wx GUI, I could see if the server is portable to Tiger.

wx 2.8 is supposed to work on 10.4. No idea about the status of 3.x – 3.2 is likely never tried, 3.0 might work.

Though I suppose that defeats the point of using modern hardware to ease things for older hardware.

Well, if you run the server on G5 Quad and use some lower-end SBC as the client, it will make sense, perhaps (assuming away electricity costs).
 
Yesterday, I tested ffplay from the PPCMC project on my PowerMac G4 MDD (dual 1.2GHz CPUs), the CPU usage was around 90% playing a MPEG-2 transcoded video file, compared to the roughly 50% of CPU usage that MPlayer needed to play the same thing.

Did you try with 4k 60 FPS? Wonder if transcoding makes it usable on a G4 – as compared to HEVC or AV1, which likely aren’t (Quad kinda can play these, but with visible pain LOL).
 
Why would it need specifically Linux? All dependencies are cross-platform, from what it looks.



Well, the aim is to assist slower hardware, and this is nothing exclusive about Tiger. 10.5–10.6 may not run on G5 Quad either. (No objections to 10.4 being prioritized, I just don’t see anything Tiger-specific per se in discussed scenario.)

P. S. I am not convinced that ffplay is more performant than mpv (I assume otherwise, though I did not test it much); if we count abysmal support policy of throwing away working code to break it for a subset of systems, then mpv is more buggy, indeed.



There is probably none, if you mean a standalone app (not built via ports) – or perhaps some really archaic version.



wx 2.8 is supposed to work on 10.4. No idea about the status of 3.x – 3.2 is likely never tried, 3.0 might work.



Well, if you run the server on G5 Quad and use some lower-end SBC as the client, it will make sense, perhaps (assuming away electricity costs).
The server lists wx 4.x as a dependency in the linked documentation, which I know we don't have on Tiger, and to my knowledge doesn't exist on PPC OS X. However, if the server can be run without a gui, there is no reason why it couldn't run even on Tiger.
In theory, everything fast enough to run Leopard is an 867 Mhz G4, which can handle h.264 pretty well in Coreplayer or Mplayer with some optimization, and therefore has less need for transcoding. Of course, people have gotten Leopard on slower hardware than that, so those unofficially supported slow machines may benefit a lot. You are quite correct that Leopard and Snow Leopard machines benefit from this project as well, just not as much as some slow G3s and G4s on Tiger.
Regarding ffplay vs mpv - it's hard to know if mpv is freezing up and dropping frames because of a bug or performance issues. You may be right it is bugginess - but the effect is the same. MPV is likely less useful than ffplay on PPC OS X as a general "it just works" player. Adding MPV support is still good, but ffplay is more useful.
I believe someone on this forum built a standalone Mplayer binary of Mplayer 1.3, which is pretty modern, that can be installed without ports. I may link it once I find it again.
You are quite right that a Quad may host this project well. It might do even better if it were running PPC Linux and able to utilize a better video card than is supported under OS X.
 
Did you try with 4k 60 FPS? Wonder if transcoding makes it usable on a G4 – as compared to HEVC or AV1, which likely aren’t (Quad kinda can play these, but with visible pain LOL).

The source resolution/codec becomes irrelevant because the modern host machine does all the heavy lifting. Your PPC Mac just receives a clean, native MPEG-2 stream. That's the whole point of the tool! 😏

It really is satisfying to watch, though. Taking a modern, high bitrate 4K source and seeing it run smooth as butter on a Power Mac (or even on a freaking Windows 98 PC), feels like magic every time. 🪄

The server lists wx 4.x as a dependency in the linked documentation, which I know we don't have on Tiger, and to my knowledge doesn't exist on PPC OS X. However, if the server can be run without a gui, there is no reason why it couldn't run even on Tiger [...]

Just to clarify: the server is actually a console-only tool, so it has zero dependency on wxPython, that's just for the client GUI. It sounds like you might be looking at the Python 3 client requirements?
That said, as I mentioned earlier, I’ll be updating the documentation to clarify that the server isn't strictly limited to Linux, PC or Raspberry Pi; it acts as a standard Python tool.

While you could technically run the server on a PPC Mac, the intended setup is to run the server on a modern machine (PC or Mac). That way, the modern CPU/GPU handles the heavy lifting of transcoding high-res footage and your Power Mac just acts as the client, enjoying the seamless MPEG-2 stream 😉
 
  • Like
Reactions: Project Alice
Just to clarify: the server is actually a console-only tool, so it has zero dependency on wxPython, that's just for the client GUI. It sounds like you might be looking at the Python 3 client requirements?
That said, as I mentioned earlier, I’ll be updating the documentation to clarify that the server isn't strictly limited to Linux, PC or Raspberry Pi; it acts as a standard Python tool.

While you could technically run the server on a PPC Mac, the intended setup is to run the server on a modern machine (PC or Mac). That way, the modern CPU/GPU handles the heavy lifting of transcoding high-res footage and your Power Mac just acts as the client, enjoying the seamless MPEG-2 stream 😉
Whoops, quite right, I got thrown off by the formatting. It may be worth breaking that section up as follows to reduce confusion:
Client Side (Newer Devices):
Feature​
Python 3 Client​
Target OS
Win 7+, GNU/Linux, macOS​
File
rs-client_py3.py​
Python
Python 3.8+​
GUI Lib
wxPython 4.x​
Extra Libs
Standard Library​
Player
MPlayer​
Client Side (Older Devices)
Feature​
Python 2 Client​
Target OS
Win 98, Win XP, macOS X​
File
rs-client_py2.py​
Python
Python 2.5 - 2.7​
GUI Lib
wxPython 2.8 (Unicode)​
Extra Libs
simplejson​
Player
MPlayer​

I may try building this after all, since the wxPython GUI is not needed for the server


And as promised, Mplayer programs to link to!

The first one is quite a bit newer, and so may be the one you want to integrate into the instructions for your very cool project.
 
  • Like
Reactions: Project Alice
The server lists wx 4.x as a dependency in the linked documentation, which I know we don't have on Tiger, and to my knowledge doesn't exist on PPC OS X.

There is no wx 4.x, the latest release of wx is 3.3.x, and I haven’t seen so far anything that actually requires it. Also, 3.3 builds on macOS PowerPC, and at least two weeks ago the master branch was building too. I recall, master branch was installing as v. 3.3.2.
The only caveat with wx is that you need to use GTK backend on powerpc and not Cocoa, but that is what Linux uses as well.
 
The source resolution/codec becomes irrelevant because the modern host machine does all the heavy lifting. Your PPC Mac just receives a clean, native MPEG-2 stream. That's the whole point of the tool! 😏

I meant whether 4k 60 FPS is playable normally when converted to MPEG-2. It is obvious that less compressed video takes fewer resources to decode, I just have no idea how large is the impact.
 
Feature​
Python 3 Client​
Target OS
Win 7+, GNU/Linux, macOS​
File
rs-client_py3.py​
Python
Python 3.8+​
GUI Lib
wxPython 4.x​
Extra Libs
Standard Library​
Player
MPlayer​

Ok, you referred to wxPython, which oddly used 4.0 versioning for wx 3.2 branch: https://ports.macports.org/port/py-wxpython-4.0
I did not try to build it since never had a port of interest depending on wxPython, but it should either just work or be fixable with little efforts. We just need to make sure it uses wxgtk-3.2.

P. S. Don’t try it yet, this should be changed in the portfile, and we need to see if the current version of py-sip is functional, I never used it.
Update. I think the best way to handle it is to build with `use_syswx`, so that unnecessarily rebuild is avoided (and we do not need to bother with porting patches).
 
Last edited:
I can't wait to try setting this up. I've always wished something like this existed. I have a Plex Server, and recently set up a Debian box with Jellyfin and radarr\sonarr. I don't know how well it'll transcode stuff though. Its got an i7-4765T so, maybe. My Plex server is Mac Pro 5,1 but its TrueNAS, and it transcodes everything fine. But this seems like it may be a pain to set up in a FreeBSD jail.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.