Do I need to get the rights to music used in my film if I'm not charging people to view it?
Internet Filmmakers' FAQ
The short answer is yes. Copyright law prevents distribution and public performance of protected works, regardless of whether money changes hands or not. It's the public performance aspect, not the money which causes problems with copyright.
If you do not hold the necessary rights for music (or any other copyright material) used in your film, then you cannot show it to anyone in a public environment. This includes standard types of exhibition (theatrical, television etc), and also includes public performance such as showing your film in festivals, schools, pubs, prisons, the town square, on airplanes, and of course on the Internet.
More information on music copyright can be found in the Legal Issues section of the Internet Filmmaker's FAQ.