"....if you are filming with the consent of all parties involved and have an intent to distribute you go from the illegal transaction of prostitution (in most states) to the legal transaction of producing pornography (in most states)"
Oh, geez, not this again...
Paying money for "sexual gratification" is illegal, and called prostitution, and it doesn't matter if there is a camera filming it or not. If a jury believes you are paying for sexual gratification, you're guilty.
And if a jury believes that the porn you produced is "obscene", you're in a world of hurt, because now it's a federal charge. And if you distribute it (ie, give it to someone), you're in even more hurt.
And if you later distribute the video (ie, put it on a website, etc.), and don't follow federal requirements for labelling (called the US Code 2257 requirements), etc., you're in another world of hurt. Just ask the guy in California who got convicted earlier this year and is looking at at least 10 years for federal obscenity and 2257 labelling convictions:
articles.latimes.com
gregpiccionelli.com
And if you film without the required local permits and insurance, you might be guilty of a bunch of other stuff. And if you didn't get the right consent forms and use the video later on, you could get in more trouble.
The reason why guys in California, where porn production is considered "legal", get away with it is because there was a ruling long ago where they couldn't prove some actors were doing it for "sexual gratification", and also it was an attempt to get the producers in pimping/pandering charges, which didn't stick.
But that doesn't mean that any state can't re-evaluate that and come up with a case against you if someone complains. Yeah, you might get off, but it's certainly not a slam dunk. And in the process of figuring it all out it would cost you lots of money and pain. It depends on what a jury says, and NOBODY can predict that.
Just read that second link above, where a lawyer warns the porn industry about that recent case, and what a dangerous thing it is.
Bottom line, adding the porn production aspect to a prostitution case might actually end up being worse. Prostitution is a misdemeanor, but when you produce porn now you've entered the big leagues of federal obscenity laws. Yeah, it might save you, but there's no way to be sure. It sure as hell isn't a 'get out of jail free' card.
But I'm not a lawyer, so do your own research. You'll find out there's a lot of porn guys real nervous and looking over their shoulders because the laws aren't clear. And all it takes is someone complaining, or a new administration, or a DA willing to bring up charges.