Stop me if you've heard this one before.
The joke at the center of ''The Aristocrats" really isn't much of a joke. In fact, comedians and co-instigators Paul Provenza (who directed) and Penn Jillette (who executive produced) think so little of the punch line that they give it away in the title. If the joke were any better, though, this rude, crude, socially unacceptable, and gut-crampingly funny documentary on the art of humor might not be as good as it is. And it is very, very good.
What Provenza and Jillette have done is brilliant in its simplicity: They've rounded up more than 100 comics and other professionals whose job it is to make people laugh, and let them each tell or comment on the same joke, one that is rarely told in public but has functioned as a sort of secret backstage handshake for comedians over the decades.
Years ago, most stand-up comics had a ''clean" act for TV and family shows while ''working blue" -- trotting out the dirty jokes -- at late-night gigs and private parties. ''The Aristocrats" (the joke, not the movie) was the bluest of the blue: an anecdote with the potential for such extremes of off-color envelope-pushing that it was primarily reserved for bull sessions once the paying customers had gone home. Even after Lenny Bruce, Richard Pryor, and George Carlin toppled the walls of propriety in the '60s and '70s, the joke stayed samizdat, underground.
Fittingly, Carlin is the first to be heard from, and he's as cogent and cantankerous as ever. The comics following him, filmed in one uncomplicated medium-close-up after another, include old school yukmeisters like Don Rickles and Phyllis Diller, '60s conceptualists like Martin Mull and the Smothers Brothers, '80s revivalists like Steven Wright and Emo Philips, new blood like Chris Rock and Jon Stewart. There's a mime version of the joke, a ''South Park" version, a wickedly funny impressionist version with Kevin Pollak delivering the joke as Christopher Walken might tell it. There's a Penn and Teller magic version.
And all of them are joyfully and blisteringly raunchy, wallowing in foul language, nasty behavior, and descriptions of every variation of scatology and unseemly sexuality the human mind can encompass. Does a lot of this shock? Absolutely. Does it lose its potency and grow monotonous over the long stretch? Occasionally; this is, after all, a joke meant to be told once.
But it also depends on the comedian and his or her creativity, and that's the point. Between the setup and the punch line is a vast open space for improvisatory play, for soaring verbal cadenzas of filth that speak the unspeakable and then go further, into surrealism and beyond. ''The Aristocrats" -- the joke, not the movie -- is jazz.
Some of the players freestyle better than others. With comedians whose humor rises from persona more than material -- Philips, Andy Dick -- the joke just lies there, unmoving. The surpassingly lovely potty mouth Sarah Silverman, on the other hand, internalizes the joke and reenacts it as a recovered childhood memory; it's a daring, dark, and funny bit, and you'll never think of Joe Franklin again without cringing.
One of the main contenders for the crown here turns out to be Bob Saget, the deceptively bland star of TV's ''Full House" and ''America's Funniest Home Videos." But the true hero of ''The Aristocrats" is the great, squinty-eyed crank Gilbert Gottfried, who salvages a Friar's Club roast of Hugh Hefner with a version of the joke that builds and builds with manic high-wire artistry. The other comedians speak of his performance with the awe reserved for legends, and the video of the event, when we finally see it, fuses the shtick of the borscht belt masters with the hyper-aware irony of today.
There are a few major names who don't show up for the party, Seinfeld, Cosby, and Steve Martin among them. They may or may not feel that they've left such crassness safely in their past. If so, the gag's on them. ''The Aristocrats" -- the movie, not the joke -- is a working demonstration of the pleasures of the profane.
Ty Burr can be reached at email@example.com.