Police in Western Australia have charged a 25-year-old activist who livestreamed footage claiming to be inside a piggery and alleging it showed animal cruelty.

The man has been charged with two counts of trespass after a search warrant was executed this morning.

The man, a member of the lobby group Direct Action Everywhere, was referred to police by the state's Ministry for Agriculture after alleging the footage, streamed on Facebook Live, was from inside a piggery in WA's south.

The activist who claimed to be at the piggery has been charged with trespass. ( Source: Facebook Live/Direct Action Everywhere )

He claimed the footage showed overcrowding and other acts of improper practice.

Commander Allan Adams said one charge related to the livestreamed incident allegedly on a Pinjarra farm, with the other count of trespass alleged to have occurred on a Mundijong farm in early February.

"There is a line in the sand when people engage in protest activity," Commander Adams said.

"There is an onus on those being subject to the protest … to also behave in a way that doesn't draw attention to them.

"Over the last four weeks, activists have been more targeting of the primary industry."

A second activist, a 24-year-old woman, has also been charged with trespass after allegedly taking part in the livestream from inside the piggery.

The pair will face Mandurah Magistrates Court next month.

Police said investigations were ongoing, and they were continuing to work with both farmers and activist groups to make sure both sides acted "according to the law".