Vince said: "It's not illegal to publicly perform a copyrighted song if it's not for money."
That's an absolutely WRONG statement of law. Nothing in the copyright law provides an exception to copyright infringement for a non-profit performance. For example, even if I were to stream copyrighted music and movies across the Internet for free, I am still infringing on copyright. This would be considered an unlawful public performance even though I have no profit.
To answer your question, the relevant issue is whether or not a given performance constitutes a "public performance." A public performance without a proper license is unlawful. ASCAP defines a public performance as follows:
"A public performance is one that occurs either in a public place or any place where people gather (other than a small circle of a family or its social acquaintances.) A public performance is also one that is transmitted to the public; for example, radio or television broadcasts, music-on-hold, cable television, and by the internet. Generally, those who publicly perform music obtain permission from the owner of the music or his representative.
However, there are a few limited exceptions, (called "exemptions") to this rule. Permission is not required for music played or sung as part of a worship service unless that service is transmitted beyond where it takes place (for example, a radio or television broadcast). Performances as part of face to face teaching activity at a non-profit educational institutions are also exempt."
http://www.ascap.com/licensing/licensing…
In short, recording a copyrighted song and posting it on Youtube without permission is copyright infringement. However, in most cases, the worst that happens is that the infringing recording is removed. Copyright enforcement is so poor on Youtube that there's probably a good chance your recording will never be removed.
I'm an attorney.