Only 14 S-21 inmates are thought to have survived.
Duch is the first of five former Khmer Rouge officials to face the UN tribunal charged with war crimes and crimes against humanity related to the regime brutal rule over Cambodia between 1975 and 1979.
|An estimated 1.7 million people died in the Khmer Rouge's "killing fields" [Reuters]
During his testimony Vann Nath, who is now one of Cambodia's top artists, recalled being fed twice a day, with each meal consisting of three teaspoons of gruel, or rice porridge.
"We were so hungry we would eat insects that dropped from the ceiling. We would quickly grab and eat them so we could avoid being seen by the guards," he said.
"We ate our meals next to dead bodies, and we didn't care because we were like animals.
"I couldn't think of anything other than being thirsty and hungry... I thought even eating human flesh would be a good meal," he added.
Vann Nath escaped execution because he was an artist and took the job of painting and sculpting portraits that glorified the Khmer Rouge, and its leader Pol Pot.
'I'd rather die'
Listening to Vann Nath's testimony, Duch appeared emotionless, and sat slumped in his chair while the artist tearfully recounted his ordeal in the prison.
Vann Nath said he was arrested in December 1977 and tied up by a local official before being taken to the jail without any explanation.
He said he was photographed and then shackled with other prisoners, some of whom died during his first month there.
"I told myself I did not care any longer because I could die any time and I'd rather die than live in such conditions," he said.
But a prison official told him that he had to paint a large portrait of a figure he did not recognise – of Pol Pot, the Khmer Rouge leader.
"I knew that if I did not paint very well, I would be in big trouble. I was so nervous," Vann Nath added, calling it a "life and death situation".
|Duch has denied being directly involved in the S-21 torture killings [AFP]
Earlier in the trial Duch, 66, begged for forgiveness from survivors of the Khmer Rouge after accepting responsibility for his role in running the jail.
The former senior Khmer leader has consistently rejected prosecution claims that he had a central role in the movement's iron-fisted rule and says he never personally executed anyone.
The court has no authority to impose the death penalty, but Duch faces a life sentence for war crimes, crimes against humanity, torture and premeditated murder if convicted.
An estimated 1.7 million Cambodians died during the Khmer Rouge's rule over the country between 1975 and 1979.
Pol Pot died in 1998, and many believe the tribunal is the last chance to find justice for victims of the communist movement.
Four other former Khmer Rouge leaders are currently in detention at the court, and are expected to face trial next year.
The group includes Nuon Chea, the Khmer Rouge's former deputy leader; Khieu Samphan, the former Khmer Rouge head of state; Ieng Sary, the former foreign minister; and his wife, Ieng Thirith, who was the regime's social affairs minister.
They have all denied any wrongdoing.