Police in California have released CCTV footage of the moment a bat-wielding man was tackled to the ground by officers.