Section 512 outlines the limitations on liability for material online, and in particular 512(a) limits the liability of a service provider when the communication is regarded as transitory. So in order for YouTube to take advantage of that generous exception to liability it would need to satisfy the five elements contained therein.
As it has already been made clear elements (1), (2), and (3) are easily satisfied because the transmission is always initiated by the user, through an automatic process, and YouTube doesn't select the recipients but rather responds to requests. The real problem comes with the language of element (4) that reads "for a longer period than is reasonably necessary for the transmission" because, as Brian correctly pointed out, YouTube seems to do the complete opposite. Precisely this is what makes YouTube more like an archive than a transitory digital network. Finally element (5) is up for debate, but would probably not be enough on its own to attach liability because an argument can be convincingly made that the alleged modifications made by YouTube are not to the material itself but rather to its interface in order to enhance user viewing.
In any case, 512(a) does not cover YouTube and more than that, the appropriate provision to analyze YouTube under is 512(c) - Information residing on systems or networks at direction of users.