Gay rights activists have spoken out against a Brisbane police officer's impromptu rap that has become a YouTube sensation.

A group of rowdy street rappers were on the verge of arrest after one delivered an offensive line referring to police as "makin' bacon" during a confrontation outside a Fortitude Valley nightclub on October 8.

However, Constable David Jay retaliated with a freestyle quip of his own, rhyming "homo" and "watching gay porn in slow-mo".

He even used hand gestures to dramatise his rap. The crowd erupted in excitement and surrounded the officer, patting him on the head and urging him on.