A man charged with rioting during a violent Sydney protest over an anti-Islamic film has held up a bloodstained beanie in court.

Mohammed Issai Issaka has pleaded not guilty to rioting and resisting arrest in the September 2012 protest in Sydney's CBD over the US-produced YouTube film Innocence of Muslims.

In a hearing on Wednesday, Senior Constable Raymond Carey from Hurstville told the Downing Centre Local Court that he had feared for his safety as the protest became violent in Hyde Park, with several demonstrators "yelling and screaming".

When protesters eventually began marching towards St James station at the foot of the park, he said riot police formed a line and told them to get back.

"They (protesters) started throwing bottles and they got violent," Sen Const Carey told the court.

He said he saw Issaka wrapped in a green flag and wearing a white beanie during the melee.

As violence erupted between the riot squad and protesters near the station, the officer said he feared he would be attacked.

"He stepped towards me and I thought I was going to be assaulted," Sen Const Carey said.

"I wasn't going to take a chance. I grabbed him by the arm."

Sen Const Carey said riot police were running up behind him when he was pushed to the ground, falling on top of Mr Issaka.

"I believe he hit his head ... I saw blood stains coming from his head."

As three other officers joined Sen Const Carey in arresting him, the court heard Issaka was kicking his arms and legs and screaming, "Just shoot me, just shoot me."

Sen Const Carey said he had not seen Issaka throw any bottles during the protest and conceded that he could have mistaken the pained look on the 43-year-old's face for a look of anger.

During the hearing, which is continuing before Magistrate Jacqueline Milledge, Issaka held up the white beanie, stained with blood, which he was wearing during the protest, which is stained with blood.