A video depicting a violent, racist attack against a man collecting cans in San Francisco has prompted a police investigation.

In the video, an older Asian man collecting cans is attacked and mocked by at least two African-American men who steal a shopping cart full of aluminum cans. At one point, one of the men shouts “I hate Asians!” and harasses the man.

When the can collector attempts to stop the theft of his cans, one of his harassers chases him and swings a trash picker at him.

According to CBSN Bay Area News, the encounter took place just outside a housing project.

Near the end of the video, the can collector can be seen crying as his attackers make off with his cans.

New Yorkers sleep in Times Square to raise money for homeless charity Show all 8 1 /8 New Yorkers sleep in Times Square to raise money for homeless charity New Yorkers sleep in Times Square to raise money for homeless charity Nearly 1,000 people slept in Times Square on Saturday night. The demonstrators were part of the World Sleep Out, which saw events in 52 cities over the weekend. Anadolu Agency via Getty Images New Yorkers sleep in Times Square to raise money for homeless charity The World Sleep Out raises funds for charity. As demonstrators slept in sleeping bags around the world, the charity group worked to raise its goal of $50m (£38m) in funds to combat homelessness. Anadolu Agency via Getty Images New Yorkers sleep in Times Square to raise money for homeless charity Participants sprawled out on cardboard and yoga mats. “I’m nervous about the rats,” Jeanette Guzman, who came to the sleep out from Queens with her entire family, told The Independent. “But we want to feel what it’s like, and what homeless people go through sleeping on the streets … and also to raise funds.” Getty Images for The World's Big New Yorkers sleep in Times Square to raise money for homeless charity Will Smith met with participants and performed in Times Square. The actor spoke about his film, The Pursuit of Happiness, and performed the hit theme song from his TV series, The Fresh Prince of Bel-Air. Anadolu Agency via Getty Images New Yorkers sleep in Times Square to raise money for homeless charity New York City Public Advocate Jumaane Williams also attended the sleep out. “I’ll tell you what: if you look around New York City, there are loads and loads of vacant luxury apartments that we didn’t need … while there are 60,000 people homeless”, said New York City Public Advocate Jumaane Williams, who was in attendance at the event and spoke to the crowd about housing being a human right. Getty Images for The World's Big New Yorkers sleep in Times Square to raise money for homeless charity Josh Littlejohn said the city's "can do" spirit helped the event come to life. “To my great surprise and real delight, they signed off on us closing down the entire stretch of Times Square”, he said. “It’s kind of one of those things that’s been happening a lot with this campaign, very serendipitous.” Anadolu Agency via Getty Images New Yorkers sleep in Times Square to raise money for homeless charity Participants came from all over to help raise funds. Joshua Mazediak-Amey, who was from the UK and with a group of interns at the United Nations attending the Times Square event, told The Independent: “I believe it’s important that those who work for the UN show the fact that we’re committed to actually getting on the ground and being with people … that we are willing to come and be a part of things when they’re sort of on-the-ground movements like this opportunity tonight.” Getty Images for The World's Big New Yorkers sleep in Times Square to raise money for homeless charity The group told The Independent nearly 1,000 people slept in Times Square on Saturday night. The World Sleep Out aims to raise $50m (£38m) in donations for charities including the Malala Fund, the Institute of Global Homelessness and more. Mr Littlejohn has also established a new charity called the World’s Big Sleep Out Trust. All of the donations raised in the US as part of the trust would be managed by UNICEF USA. Anadolu Agency via Getty Images

The San Francisco police department announced it had launched an investigation into the incident.

“The video does look like there was some type of altercation or robbery, or assault. We have to find out all that stuff in the investigation,” SFPD Captain Troy Dangerfield said.

The video was shared online, spurring GoFundMe pages and calls from local activists for help finding the can collector.

Marlene Tran, a spokesperson for the Visitacion Valley Asian Alliance, said the scene was “heartbreaking.”

“It is hard to understand in a city like San Francisco how this could happen,” she said. “We are already talking to leaders in the Chinese community and leaders across the city about doing something this week at the site. We plan to have conversations about how to educate people, about how to avoid issues like this, but really to build community across the board so that things like this never happen again.”

San Francisco District 10 Supervisor Shamann Walton, the legislative representative for the region of the city where the attack happened, issued a statement after the attack garnered attention in the community.