Stokes, the England cricketer who is standing trial for affray alongside Ryan Ali and Ryan Hale, was also described as feeling "vulnerable and frightened" as the incident unfolded and claimed that, having seen at least one bottle used in the brawl, feared his opponents had "demonstrated a willingness to use weapons in attacking people".
Jurors have been shown footage of Stokes brawling with Ali and Hale, who are friends, in the early hours of September 25 a year ago after walking away from the Bristol nightclub Mbargo.
The jury was also shown body-worn footage of the arrest.
CCTV footage shows Stokes and Hales then caught up with Ali, Hale, Barry and O'Connor.
The prosecution has described Barry and O'Connor as two "flamboyant, extrovert and openly gay" regulars at Mbargo. "Mr Barry grabs Mr Ali around the groin area".
"Ben Stokes was mimicking William O'Connor as his back was turned and Mr Stokes flicks something at him".
Hale is then shown collapsing to the floor but picking himself up after 20 seconds and disappearing before returning with, Adams said, "what appears to be a metal pole".
Two gay men thanked England cricketer Ben Stokes for protecting them from two homophobic revellers, the England cricketer told police.More news: Brad Pitt says he has given Jolie Pitt millions since split
More news: Arsenal chief Burgess: No pushback from players over Emery's new training methods
More news: Israeli military attack in Gaza kills 2 Palestinians
Predictably and understandably not much of that talk will be about Stokes's cricket, but we should do some of that here now because there is no doubt that he will be missed by England this morning and in the coming days. Stokes said "matters had become too serious to ignore and that I had to intervene".
He added: "It was homophobic in nature". I took exception and said "leave it out" and "you shouldn't be taking the piss because they're gay".
PC Stacey Alway, who arrested Stokes, told the court: "From the moment I approached him (Stokes) he calmed down and was compliant".
"In response one of the guys said 'Shut the f*** up and f**** off or I'll bottle you.' At the time he was holding a bottle in his right hand".
The doorman said Hales asked what had happened and, after being told, said to his team-mate: "Stokesy - don't do that".
"I am clear that I felt under threat of immediate attack from both these men and I did what I did only in order to defend myself".
The trial continues Thursday (NZT Friday).