One home movie shows a telegenic group of men on a getaway at a shoreline cabin in the Bay Area town of Vallejo, in 1947. The friends sunbathe, laugh together, mug for the camera with more than a touch of theatricality. A man picks some orange flowers and tucks them behind his ear; another wears a grass skirt and dances the hula.

Another movie, from 1946, shows a house party where guests in suits and ties smoke cigarettes and drink from dainty glasses. Men dance in pairs, hands clasped, a head against a cheek. One giddily air-claps to music the viewer cannot hear.

Both of these films, and numerous others like them, are part of the private home-movie collection of Harold O’Neal, an amateur filmmaker who spent much of his adult life in San Francisco. Born in Stockton, California, in 1910, he was a reserved, somewhat shy man who worked as a rehabilitation officer for the Veterans Administration and later in personnel for the Army Corps of Engineers. Like many gay men and women of the time, he kept his sexuality closely guarded. But over the years O’Neal made dozens of home movies—of house parties, drag performances, skinny-dips, travels with his partner—many of which captured the rhythms and intimacies of gay social life long before it was allowed to flourish in the open.

O’Neal’s home-movie collection spent decades in obscurity, as home movies often do. Then, in the mid-nineteen-nineties, a San Francisco filmmaker, Peter Stein, put an ad on local television soliciting historic footage for a documentary he was making about the Castro, and O’Neal responded. Only a few minutes of his footage, showing parties, San Francisco street scenes, and O’Neal standing atop Coit Tower, ended up in the film, but Stein realized that O’Neal’s recordings were valuable artifacts of San Francisco gay history. Stein alerted Susan Stryker, who was the executive director of the city’s GLBT Historical Society, and on the drive home from a vacation Stryker stopped in Washington, where O’Neal had relocated, to ask him to donate his films. O’Neal was ambivalent. As Stryker was packing up to leave, O’Neal’s life partner, George Torgerson, walked out to the car and handed her paper shopping bags filled with reels. “He wants to let go, but he can’t let go, so I’m letting go for him,” Torgerson said.

With O’Neal’s permission, the movies now live in the GLBT Historical Society archives amid a remarkably varied set of holdings, from a sewing machine used to create the first rainbow flags to the sequinned outfits worn by the disco star Sylvester. Clips from several of the films also appear in “Reel in the Closet,” a new documentary about gay home movies by the Bay Area independent filmmaker Stu Maddux. Maddux read about the Society’s work and spent a year digging through the archives. “To see those same types of mannerisms and the same types of laughter, and laughter at the same things, just made me feel like I wasn’t alone in time,” Maddux told me. “Like my generation and the generations around me are not alone in time.” His film includes footage from a tape discovered in an unmarked can at a San Jose flea market, showing the San Francisco lesbian bar Mona’s Candle Light around 1950. A drag king called Jimmy Reynard introduces a chanteuse; female patrons with immaculate, gamine haircuts listen at tables; there is the twinkle of jewelry. In another clip, from 1978, the documentarian Dan Smith recorded people on the streets of the Castro describing their reactions to the murder of Harvey Milk. There are long-haired men, cops, a leather aficionado. “Nobody filmed us,” Smith says in “Reel in the Closet.” “So we really thought that in order to be recorded it was necessary for us to do it ourselves.”

One challenge for home-movie preservationists is that most footage, having been shot for a private audience of family and friends, isn’t particularly accessible to the general viewer. But what the movies lack in narrative cogency they make up for in a sense of immersion—of giving viewers the feeling of dropping directly into the private worlds of strangers. In the case of gay home movies, the viewing experience is complicated, and enriched, by the knowledge of what’s to come, for good and for bad—the liberation of Stonewall, the devastation of the AIDS crisis, the undoing of the Defense of Marriage Act, which couples like O’Neal and Torgerson, who both died in the mid-aughts, never got to see.

In March, I visited John Raines, a volunteer with the GLBT Historical Society, at his quiet apartment in a suburban part of Oakland to watch him digitize a few of the home movies that the organization had acquired. A pacific man of fifty-five, he was working on tapes from the collection of Allan Bérubé, the author of a well-regarded history of gays in the military, who died in 2007. Raines picked up a tape bearing a yellow Post-it with the word “Garrisson” written in small, tidy letters. He slipped it into a vintage VCR.

The movie, shot by Bérubé, shows a mustachioed and exceedingly handsome young man wearing an orange cap and short shorts. “Welcome to my movie!” he exclaims, then leads Bérubé on a tour of his apartment. He playfully taunts a roommate he describes as Rubenesque; he shows off his bedroom, which features a James Dean cutout and a Mickey Mouse telephone. After changing outfits (“I can’t take my pants off in front of the camera!”), he sets out for Castro Street, where he sees a man in a tight tank top run past and quips, “This is the start of the gay Olympic marathon.” At one point, Bérubé’s camera lingers on a poster affixed to a construction fence in the center of the neighborhood—“One AIDS death every 12 minutes.” After the film ended, Raines told me that whenever he watches footage of the Castro from this period, he wonders how many of the people shown would be alive five years later. That afternoon, checking the archives of the Bay Area Reporter, a local gay paper, I found an obituary for Garrisson von Habsburg, who died in 1993, at the age of twenty-nine. It was placed by a “longtime friend” named Larry O’Daniel.