CCTV footage that shows a homeless schizophrenic man being beaten to death by two California police officers using their fists, batons and the butt of a stungun has shocked spectators in an Orange County courtroom.

Following a post-mortem examination, doctors testified that Kelly Thomas, 37, died from facial injuries and chest compression caused by Fullerton police department officers Manuel Ramos and Jay Cicinelli at the local bus station.

The screening of the 33-minute video in court was part of a preliminary hearing in which a judge is set to decide if there is sufficient evidence for the two officers involved in the altercation that led to his death to stand trial.

The tape has gone viral on YouTube, sparking outraged comments from viewers, while in court people gasped, screamed and cried as prosecutors showed the footage.

After the two officers responded to a call about someone breaking into cars at the bus depot in July 2011, the situation escalated when Ramos started to question Thomas. "Put your hands on your [expletive] knees... put your feet out in front of you," Ramos tells Thomas in the video.

"Well, which one is it, dude?" Thomas asks.

"Both," Ramos replies.

"I can't do both," Thomas protests.

"Well, you're gonna have to learn real quick," Ramos says.

After a while, Thomas is ordered to "get on the ground".

Kelly Thomas
An evidence photo of beating victim Kelly Thomas in hospital, as it was shown during a preliminary hearing on his death in court in Santa Ana (Reuters)

Officers then take out their batons and start swinging them at Thomas, piling on top of him. "OK, man, I can't breathe," Thomas says in the film. One of the officers fires his Taser at the suspect several times. Thomas can be heard yelling for help and calling his father. "Dad - they're killing me!" he shouts.

Ramos, 38 is charged with second-degree murder and involuntary manslaughter. Cicinelli, 40, is charged with involuntary manslaughter and use of excessive force.

The video was accompanied by audio from digital recorders that are worn by some of the officers.

Thomas' father, Ron, a former sheriff's deputy, said: "These folks really need to go to trial. These folks need to pay for what they've done."