A dishwasher who secretly filmed his flatmates using the bathroom in their Sydney share house has been handed a two year good behaviour bond and 50 hours of community service.

Magistrate Christopher Longley issued a strong warning to 31-year-old Thuan Duong Ma during his sentencing at Burwood Local Court on Thursday, saying he was lucky to escape jail.

"Right now, today, you could go to jail for five years," he said.

"One thing is for sure ... had you had any previous offences recorded you would be going to jail."

The court heard Ma, who still lives in shared accommodation, spent a lot of time in his room since moving to Australia from Vietnam in 2009.

He suffered from depression and had been taking medication but has since improved, his lawyer told the court.

He is working three weekends a month as a dishwasher at a Silverwater restaurant.

Ma was charged in June with filming a person's private parts without consent.

His secret camera was found by a 30-year-old woman while she was preparing to use the bathroom at their Auburn share house.

Court documents say he used it to film the private parts of the woman and a male flatmate.

The camera was hidden in the hook of a coat hanger, stashed underneath a towel on top of a bath and positioned to show only the bottom half of a person, court documents show.

After noticing a USB port on the coat hanger, the woman took a SIM card from the device and plugged it into her phone.

She then downloaded six movies from the camera to her computer.

"The first video the victim opened was her approximately one week prior in the bathroom," court documents show.

The woman removed the camera and took it to Auburn police station, where it was examined.

Ma was later arrested and charged.

The court heard he had great remorse and contrition over the incident and had written a letter of apology to his victim.