There are steps to be taken to ensure that you use a song on YouTube without infringing on copyrights. The same goes for using a video.
Check if the work requires permission.
If it does, find who owns the copyright.
Identify the rights that you need so you can use the song.
Contact the owner(s) and submit a request.
Get approval. This is normally a quote with the license fee.
Get the permission contract in writing and keep it in your files.
Songs written in collaboration have multiple copyright owners and you must make sure to get permission from all of them.