Viacom filed the suit earlier this week, alleging that YouTube is profiting from almost 160,000 unauthorised clips from its programming, which includes shows such as Jackass, Beavis and Butt-head and SpongeBob SquarePants.
It said YouTube is building a "lucrative business out of exploiting the devotion of fans to others' creative works in order to enrich itself and its corporate parent, Google".
However, Google is citing the US Digital Millennium Copyright Act in its defence, saying it acts quickly to remove unauthorised content as soon as copyright owners notify YouTube that it is online.
Google refused to comment on the implications for the posting of ads, should Viacom's suit be successful, saying it wasn't appropriate to speculate on hypothetical situations. A spokesman for YouTube said: "We are confident that YouTube has respected the legal rights of copyright holders and believe the courts will agree."