It’s not often moguls admit they made a mistake.

But lately some of the highest-paid executives at the world’s largest media companies have talked a lot about the lessons they learned from a failed industrywide attempt to pass antipiracy legislation six months ago.

In January, the technology industry led by Google, Facebook and Wikipedia revolted against two bills called SOPA and PIPA — short for Stop Online Piracy Act and Protect Intellectual Property Act. The legislation, largely the product of media companies to protect movies, television shows, video games and music against online theft from rogue foreign Web sites, sparked a reaction that quickly shifted from an arcane policy debate to an online consumer rebellion.

Wikipedia went black to protest SOPA and more than seven million people signed online petitions, many of which said the bills would “break the Internet.” Congress, overwhelmed by the popular opposition, quickly backpedaled, leaving the legislation to die.

“They tsunamied the conversation with rhetoric, and we were unprepared to fight back,” Tom Dooley, chief operating officer at Viacom, said of the technology industry. “We’re going to have to find a solution that works better for everyone.”