The council voted nine to one to give final approval to the ordinance.
It also requires film companies to pay a fee for a film permit in order to pay for inspections.
Proponents say the ordinance will help curb the spread of HIV in the industry. Opponents say condoms are not needed and consistent testing for sexually transmitted diseases is enough.