PowerPC Macs can view HTML5 videos with Tenfourfox:
not sure if it will work well with Youtube, but perhaps disabling Flash in the browser preferences will allow you to try.
There are several factors that affect the viewing of You Tube videos.
1. Your processor speed. A processor speed of 1GHz+ is usually necessary. You have 800MHz.
2. The amount of RAM. Your 512MB is marginal. More RAM would be better.
3. Your video card capabilities. The older design of your card is not compatible with current requirements.
4. Your browser. What browser & version are you using? A more modern browser may help.
As others have said, the hardware capabilities of your G4 machine are simply not powerful enough to play Flash videos. I personally would recommend installing the ClickToFlash extension in Safari before selling. That way YouTube and some other videos will load in HTML5, which should work fine on your G4. All other Flash will not load until you click on it.
ClickToFlash, AdBlock, and GentleStatusBar are usually the three extensions I install before selling a machine, especially an older one. :)
Hope that helps!
Download the latest flash player from Adobe. After installing, repair permissions & restart your computer.
Go to YouTube, open any video and press pause (don't do this while video is playing). Click the ctrl key or “right click” the mouse in the middle of the video window. The settings for flash player will pop up.
Select the video settings then select "enable hardware acceleration." Press close. Now RESTART YOUR COMPUTER not just Safari if that is your browser of choice.