SAN FRANCISCO (Reuters) - Defendants and plaintiffs in two related copyright infringement lawsuits against YouTube have reached a deal to protect the privacy of millions of YouTube watchers during evidence discovery, a spokesman for Google Inc said on Monday.

A screenshot of YouTube.com, taken on July 15, 2008. REUTERS/www.youtube.com

Earlier in July, a New York federal judge ordered Google to turn over YouTube user data to Viacom Inc and other plaintiffs to help them to prepare a confidential study of what they argue are vast piracy violations on the video-sharing site.

Google said it had now agreed to provide plaintiffs’ attorneys for Viacom and a class-action group led by the Football Association of England a version of a massive viewership database that blanks out YouTube username and Internet address data that could be used to identify individual video watchers.

“We have reached agreement with Viacom and the class-action group,” Google spokesman Ricardo Reyes said. “They have agreed to let us anonymize YouTube user data,” he said.

Viacom, owner of movie studio Paramount and MTV Networks, requested the information as part of its $1 billion copyright infringement lawsuit against the popular online video service YouTube and its deep-pocketed parent, Google.

Judge Louis Stanton of the U.S. District Court for the Southern District of New York ordered Google on July 1 to turn over as evidence a database with usernames of YouTube viewers, what videos they watched when, and users’ computer addresses.

Privacy activists from the Electronic Frontier Foundation and other groups argued in response that the order “threatens to expose deeply private information” and violated the Video Privacy Protection Act, a 1988 law passed after Supreme Court nominee Robert Bork’s video rental habits were revealed.

Viacom said at the time that it needed the data to demonstrate video piracy patterns that are the heart of its case against YouTube. But it sought to diffuse privacy fears, saying it had no interest in identifying individual users.

One outstanding disagreement between the two parties is on how to handle the YouTube viewership data of YouTube and Google employees, which Judge Stanton also had ordered YouTube to turn over as part of the July 1 ruling covering YouTube consumers.

Reyes said the issue could concern not just employees of the defendants, but also those of companies tied to the plaintiffs, including Viacom and the Football Association Premiere League.

In a legal stipulation agreed to by attorneys for all major parties in the case, the sides agreed that the new data privacy agreement did not cover employees and that they would work out how to share this data separately in coming weeks.

YouTube faces two separate, but parallel lawsuits, that for purposes of preliminary motions and evidence discovery are being treated as one. Viacom filed the first lawsuit, and a separate class action was later filed by English Premiere League soccer, several other European sports leagues, along with music publishers and videographers. The cases are unlikely to come to trial before 2009 or 2010.