This predates the Beatles version.
"The band—who just released their fourth album and was just featured on the cover of LIFE magazine—had their crew set up sound equipment on the roof of the 9-story hotel on West 45th Street in Midtown. The whole thing was filmed by Jean-Luc Godard and D.A. Pennebaker, for the unfinished film One A.M., or One American Movie. (It later ended up in 1 P.M., or One Parallel Movie) The book Got A Revolution! recalled the day: "On the rooftop, crew, friends, and the curious gathered to listen, and dance. On the street below, New Yorkers—usually fazed by nothing—stopped in their tracks to gaze skyward. At the song's conclusion, the band ran over to the edge of the roof, climbing the chain-link fence to peer down at those peering up at them."