I'm thinking of perjuring myself to protect an animal abuser
What are you trying to protect them from?
They have been charged with animal abuse
Knowingly commiting purjury just to protect someone that has committed a crime is immoral and unjust. You should honor your oath to tell the truth and let justice determine what happens to the animal abuser.
I think it's unfair that he's on trial.
It's not up to you what is fair. The courts will go over the evidence and provide a ruling.