After an appellate court revived Viacom's claims that YouTube hosted copyright infringing work, U.S. District judge Louis Stanton has again given the defendant a victory.

Viacom has been hit with a devastating legal loss.

For the second time in three years, U.S. District Court Judge Louis Stanton has granted Google summary judgment in a huge copyright lawsuit against its YouTube unit.

The decision comes after the Second Circuit Court of Appeal revived the lawsuit last April. In that opinion, the appeals court agreed with YouTube that internet service providers must be aware of infringements before becoming liable for infringements, but also determined that the federal judge hadn't properly considered whether YouTube may have had actual knowledge of specific infringing clips or whether YouTube might have essentially willfully blinded itself from having that knowledge.

In past few months, the parties have been fighting over whose responsibility it was to demonstrate YouTube's knowledge.

On Thursday, Judge Stanton ruled that YouTube is protected by the safe harbor provisions of the Digital Millennium Copyright Act.

Saying that Viacom was making "ingenious" arguments that amounted to "an anachronistic, pre-Digital Millennium Copyright Act" view of the law, the judge writes, "The burden of showing that YouTube knew or was aware of the specific infringements of the works in suit cannot be shifted to YouTube to disprove."

Here's the full ruling.

The lawsuit was filed in New York federal court in 2007. It was alleged that YouTube, later acquired by Google, had built its business by hosting without authorization tens of thousands of copyright infringing videos such as Comedy Central's The Daily Show and Nickelodeon's SpongeBob SquarePants.

In 2010, Judge Stanton first ruled in YouTube's favor.

At issue is section 512(c) of the DMCA, which affords safe harbor for websites responding expeditiously to takedown demands. Despite Viacom's arguments that YouTube ignored red flags and refused to institute protocol to filter copyright infringing works, the judge said that statutory protections required more on Viacom's end.

Viacom appealed the case to the 2nd Circuit.

In deciding to revive the lawsuit and remand it back to Judge Stanton, the appeals judges noted that that 75 percent to 80 percent of all YouTube streams contained copyrighted material in the period at issue, and that suggested "that the defendants were conscious that significant quantities of material on the YouTube website were infringing."

The judges at the appellate court, though, said that a service provider needs "awareness of specific infringing material" before being held liable.

In coming to today's decision, Judge Stanton notes Viacom's acknowledgement in its summary judgment papers that it lacks "the kind of evidence that would allow a clip-by-clip assessment of actual knowledge."

This is an admission, according to the judge, that "plaintiffs lack proof that YouTube had knowledge or awareness of any specific infringements of clips-in-suit."

Judge Stanton next turns to the question of equivalents -- whether YouTube willfully blinded itself or had the right and ability to control infringing activity.

On the first, the judge writes "the examples proffered by plaintiffs (to which they claim YouTube was willfully blind) give at most information that infringements were occurring with particular works, and occasional indications of promising areas to locate and remove them. The specific locations of infringements are not supplied: at most, an area of search is identified, and YouTube is left to find the infringing clip."

After referring to some legal precedent, the judge points to a failure on Viacom's part to identify specific clips, saying that the DMCA excuses YouTube from doing that search, and that the plaintiff comes up short in producing the kind of knowledge that would show willful blindness.

Judge Stanton also turns to the issue of whether YouTube, even without knowledge of specific infringing activity, may have influenced activity while at the same time gaining a financial benefit, so as to lose its safe harbor from copyright liability.

In analyzing the “right and ability to control” infringing activity, the Second Circuit ruled the safe harbor provisions “requires something more than the ability to remove or block access to materials posted on a service provider’s website."

Viacom said that "something more" was established by YouTube's willingness to allow its services to be used to infringe, that the UGC site exercised judgment on deciding to remove some but not all clips and that YouTube organized and facilitated searches of videos. Viacom also pointed to internal emails from YouTube executives on how to monitor copyrighted works on the system, and how the defendant had at one point disabled community flagging of material on the service.

But Judge Stanton doesn't buy it.

He writes, "YouTube's decisions to restrict its monitoring efforts to certain groups of infringing clips... do not exclude it from the safe harbor, regardless of their motivation. Plaintiffs' remaining evidence of control goes no further than the normal functioning of any service provider, and shows neither participation in, nor coercion of, user infringement activity."

The judge also rejects the plaintiff's theory of YouTube's liability from syndicating content to third parties such as mobile service providers.

In reaction to the ruling, a Viacom spokesperson says, "This ruling ignores the opinions of the higher courts and completely disregards the rights of creative artists. We continue to believe that a jury should weigh the facts of this case and the overwhelming evidence that YouTube willfully infringed on our rights, and we intend to appeal the decision.”

Kent Walker, senior vp and general counsel of Google, also writes about the ruling on YouTube's blog, saying, "Today’s decision recognizes YouTube as a thriving and vibrant forum for all these users, creators and consumers alike. Today is an important day for the Internet."

YouTube co-founder Chad Hurley reacted on Twitter with a snarky message to Viacom CEO Philippe Dauman: "Hey Philippe, wanna grab a beer to celebrate?!"

E-mail: eriq.gardner@thr.com; Twitter: @eriqgardner