First, I have to point out that IANAL.
Secondly, it's absolutely nothing to do with file formats and everything to do with who owns the Copyright on the material in question.
When you upload a video to YouTube you can either assign it a standard YouTube license, which only grants a license to YouTube (otherwise it would be illegal for YouTube to stream any videos), or a Creative Commons Attribution license (which allows reuse of the material by anyone as long as attribution is given). The specific license assigned to a video is detailed in the video description.
Of course, if someone has uploaded material that someone else has copyright over and they have no license for (for example uploading songs from an album with just a static image as the video), then whatever license they've applied to their upload is invalidated as they are in breach of copyright and them uploading it in the first place is illegal. If you then copy/convert it you are also in breach of the original copyright and breaking the law as well.
HTH