A Pennsylvania lawmaker wants to make it a crime for animal rights activists to share undercover footage of farms with anyone but law enforcement.

State Sen. Mike Brubaker, R-Lancaster, is drafting a measure that would allow people to take photos and videos of farms without the consent of the owner and hold the records indefinitely.

The crime would be sharing those visuals with anyone but state and local police, or humane society enforcement officers.

The ACLU of Pennsylvania says such a bill would violate the First Amendment.

While he wants farm animal cruelty to be investigated, Brubaker said he doesn't want it to be tried in a court of public opinion with photos and videos taken on the sly and posted online.

"Overnight, that farm could lose 50 percent of their gross annual income," he said. "Who wants to buy a dozen eggs from a farmer that's being accused of not treating the hens in the henhouse in a humane way?"

Brubaker, who introduced a similar proposal last year, said this time around he's trying to strike a balance between identifying cases of animal abuse and protecting farm owners in a world increasingly unaware of the standards of modern agriculture.