Try divx
I apologize, but I forgot to mention in my first post that I tried divx also. As of my last post, I still wasn't able to play videos.
But I finally managed to pull it off under strict conditions.
Backstory: a long time ago I used to use DVDRip, but I suddenly had to stop using it because there was some kind of error I wasn't able to fix. That was when I switched to Handbrake. I've used Handbrake ever since. In fact, it works great, except for ripping and converting stuff to watch on Mac OS 9.
I had long since forgotten about DVDRip, until I was at the end of my rope and at that point, I figured wth, so I looked in my package manager and did a search for video software (to avoid confusion, I use Linux as my main OS), and there was a reminder of a time long past: DVDRip! So I figured wth, and I installed it.
I tried a lot of combinations, changing a single setting every time. But, finally, after many failed attempts, I found one that played video and sound.
I'm posting the settings I used, in order to declare that if is definitely possible to play ripped video on my Mac OS 9 computers with these settings:
resolution 488 x 368
container avi
video codec ffmpeg
ffmpeg/af6 codec mpeg4
keyframes 150
video framerate 29.970
2-pass encoding no
deinterlace mode smart deinterlacing
video bitrate 150
audio ac3
This was the only combination that worked. I could have made the video quality better, but my target Macs aren't very powerful, so I wanted to make it easier for them to play. But the big hurdle was just getting a video to play at all!
As for converting existing video files:This is my next project, to convert other videos I have so they can play on my old Macs, but I haven't been able to yet. Conversion is my only option for these files, because I can't rip them. Some might have been old recordings that I converted to digital video with my old camcorders hooked up to the VCR. Others are old music videos from YouTube I downloaded.