For music that is not in the public domain, you can obtain a license from the copyright holder through a number of different sources. One option is to contact the copyright holder directly and negotiate a license. Another option is to use a music licensing service such as ASCAP, BMI, or SESAC. These services can provide you with a blanket license that covers a wide range of music.
The cost of a music license can vary depending on a number of factors, including the type of music, the length of the license, and the size of your audience. In general, licenses for popular music will be more expensive than licenses for less popular music. Licenses for longer periods of time will be more expensive than licenses for shorter periods of time. And licenses for larger audiences will be more expensive than licenses for smaller audiences.
If you use unlicensed copyrighted music on YouTube, you could be subject to legal action by the copyright holder. This could include being asked to remove the video from YouTube, being sued for damages, or both.
It is important to note that even if you have a license to perform and post copyrighted music on YouTube, you may still need to pay mechanical royalties. Mechanical royalties are paid to the copyright holder each time a piece of music is reproduced, such as when it is streamed or downloaded.
If you are unsure whether you need a license to perform and post copyrighted music on YouTube, it is best to consult with an attorney.