Police are scouring CCTV footage from the car park of a McDonald's restaurant in Sydney's west to identify dozens of young men involved in a vicious attack on a male, who was filmed being kicked and punched repeatedly as he lay motionless on the ground.

A witness, Hayden Green, said he had driven to McDonald's at Glenmore Park on Sunday night to buy a sundae when he saw the brutal attack while leaving the drive-through.

Some of the group were armed with cricket bats and golf clubs, said Mr Green, who pulled out his mobile phone and recorded the distressing confrontation about 8pm.

"They were stomping on his head, kicking him in the face, the bats, they were just hitting him everywhere," Mr Green told Channel Nine.