Stop Me If You’ve Heard This One…

Sam Hoffman is perhaps best known for his popular video web series, “Old Jews Telling Jokes,” which spotlights, well, old Jews telling jokes — often corny but nevertheless hilarious.

Now his new film, “Humor Me,” features some of those jokes, as told by actor Elliott Gould and his elderly co-stars. Gould portrays Bob, the father of a failed playwright, Nate, who is forced to move in with his father after his wife leaves him for a French billionaire. The Jewish Bob is a consummate jokester, which irks Nate and adds tension as the father and son try to work out their fraught relationship.

Viewers would groan at the jokes were they not told by elderly Jews. (Sample: A doctor tells a man to stop masturbating. “Why?” the patient asks. “So I can examine you,” the physician replies.)

“A lot of these jokes are old,” said the filmmaker, who lives in Manhattan. “Some of them are funny, some are borderline offensive and some are, in a way, stale. But when they’re delivered by someone who is old or older than the joke, somehow it doesn’t feel that way. It’s sort of appropriate.”

“The same joke told by an 80-year-old is much funnier than a joke told by a 30-year-old.” — Sam Hoffman

Hoffman — who is also the executive producer of CBS’ “Madam Secretary” — grew up with plenty of older Jews telling jokes. His father, Barnett, a retired judge, had dozens of cousins “and they were all competitive about being funny,” he said. “And our family would always try to be funny around the dinner table. My wife would be like, ‘You know, it’s more important to chew and swallow than to get the timing right on a joke.’ ”

Hoffman, 51, previously worked as a producer and an assistant director for filmmakers such as Woody Allen and Wes Anderson.

He got the idea for “Old Jews Telling Jokes” when some friends asked him if he had any ideas for internet content back in 2008.

“I suggested it would be great to tape my dad, his cousins and friends telling jokes,” he said. “But it wouldn’t just be about the joke; it would include a portrait of the person who was telling the joke.

“My dad did all the casting,” he added.

The first shoot took place in a storefront in Hoffman’s hometown of Highland Park, N.J.; more tapings followed in New York, Los Angeles and Boca Raton, Fla. The series made a splash on the internet when it premiered in 2009.

Featuring about 500 jokes told by several hundred Jews older than 60, the series garnered millions of hits and was subsequently adapted into a book and a successful off-Broadway show.

Of both “Old Jews” and “Humor Me,” Hoffman said, “The same joke told by an 80-year-old is much funnier than a joke told by a 30-year-old. It’s the idea that these people are of a certain generation where they probably had a parent or a grandparent who spoke fluent Yiddish. They have a sense of inflection that younger people don’t necessarily have.

“There are themes in these jokes that are indicative of certain Jewish cultural phenomena,” he added. “It’s that sense of being the ‘chosen underdog’ — the idea that we’re the chosen people, but with a bit of self-deprecation.”

“Humor Me” began with “one of the character types I got from the ‘Old Jews Telling Jokes’ experience,” Hoffman recalled. “It was the character of a man of a certain age who tells jokes to both communicate and also to avoid communication. It’s like, ‘I’m not going to tell you how I really feel, but I’ll tell you a parable about it in the form of a joke.’ ”

Hoffman also liked the idea of having the jokes serve as a kind of Greek chorus — a counternarrative to the story of the movie.

As many of the real joke tellers are dying off, Hoffman said he regards himself as something of a folklorist. “What I’ve collected is a specific ethnological portrait of a generation,” he said.