It’s always about sex — or is it? Ask David Frankel

“Nobody in this world thinks they’re having enough sex,” said director David Frankel, whose film “Hope Springs” spotlights a beleaguered 60-something couple played by Meryl Streep and Tommy Lee Jones. “Watch any night on television, or any comedian in a nightclub, and every other joke is about people who aren’t getting enough. It’s true of people Meryl and Tommy’s age, and it’s true of teenagers — everybody thinks somebody else is doing it more.”

Frankel (“The Devil Wears Prada,” “Marley & Me”) was expounding on what he perceives as the universal appeal of “Hope Springs,” especially in a youth-saturated culture. The comedy revolves around Kay and Arnold (Streep and Jones), empty nesters who sleep in separate bedrooms, who are struggling to rekindle their romantic and sexual spark. As the film opens, Kay is so dissatisfied with their roommate-like arrangement that she drags her taciturn hubby to an intensive marital therapy retreat led by Dr. Bernard Feld (Steve Carell), who prompts the spouses to open up about their bedroom history. Awkward, fumbling “sexercises” ensue.

As in the midlife romance portrayed by Diane Keaton and Jack Nicholson in Nancy Meyers’ “Something’s Gotta Give,” “Hope Springs” doesn’t shy away from bluntly risqué scenes between its mature actors. “But I wasn’t trying to make an explicit film,” the wry, affable Frankel, 53, said from his home in Miami. “The film is really about the idea that we all just want to be closer to our mates.”

It’s not the first time Frankel has explored the more challenging aspects of marriage: He drew on his personal experience to write and direct “Miami Rhapsody” (1995), which stars Sarah Jessica Parker as an advertising copywriter who turns neurotic when she discovers that every member of her family has had extramarital affairs. At the time, Frankel was also contemplating marriage, in what he has described as his “off again, off again” relationship with his wife-to-be, an advertising executive he eventually married in the late 1990s at the Sephardic synagogue in Venice, Italy; they now have twin 10-year-olds who attend Jewish day school in Miami.

“If you intellectualize the idea of marriage, it can be quite daunting, no matter how much in love you are,” he said. “As Sarah Jessica Parker’s character perceives, if marriage is so great, why does everyone cheat? Why are people looking elsewhere, and why are they so profoundly unhappy? What the character learns, and certainly what I grasped, is that marriage can work if you want it to.”

What “Miami Rhapsody” shares with “Hope Springs,” and perhaps all of Frankel’s films, is the notion of characters who are uncompromising in their search for excellence, whether it be in relationships or careers, he said.

Viewers tend to hate the perfectionist character Streep played in “The Devil Wears Prada,” an ice-queen fashion magazine editor who plunges her hapless assistant (played by Anne Hathaway) into employment hell. “But, for me, Meryl’s actually the heroine of the movie,” Frankel said. “I really wanted to celebrate the success of the powerful working woman; one of the things I hoped to portray was an unapologetic businesswoman who puts excellence above everything. Does she step on people? Does she order people around? Is she not-nice? Sure. But I think that this kind of drive comes with its own price. There are people in contemporary culture and throughout history who put their objectives above others, and the world would be a poorer place if they hadn’t.”

One of Frankel’s role models in terms of personal achievement — minus the prickly personality — is his own father, Max Frankel, who escaped Nazi Germany as a child and went on to become a Pulitzer Prize-winning executive editor and columnist for The New York Times. Political and media luminaries attended the monthly soirees at the Frankels’ home: David Frankel recalls meeting Ted Kennedy, Dan Rather and John Chancellor, and a favorite family photograph depicts the three Frankel children sitting on a pony at the Lyndon B. Johnson ranch in Texas.

In a phone interview from his New York home, Max Frankel recalled how David would head upstairs during family arguments, returning with a humorous, slightly mocking poem he had written that would immediately defuse the tension.

In college, David Frankel initially thought he might follow in his father’s professional footsteps, writing for the Harvard Crimson and penning a profile on the mercurial tennis star John McEnroe his senior year; he had once played tennis with McEnroe and thus was able to put a personal spin on the article. “But I probably wasn’t the best journalist,” said Frankel, who instead decided to try his luck in Hollywood by driving out to Los Angeles after college graduation.

A meeting with the legendary producer Robert Evans (“The Godfather”) provided Frankel, by then an aspiring screenwriter, with some invaluable advice. When he requested a job as a production assistant, Evans replied, “You wanna be a writer, kid? Go home and write,’ ” Frankel recalled. “And I did. In fact, I never went to work on a movie set until I was a producer and director.”

By 1996, Frankel had won an Academy Award for his short film “Dear Diary”; he went on to create a well-received, if short-lived, TV comedy, “Grapevine,” and to direct television series such as “Sex and the City” — including the episode in which the uber-WASP character of Charlotte visits a mikveh as part of her conversion to Judaism. He also won an Emmy Award for directing the “Band of Brothers” episode in which the characters liberate a concentration camp, an endeavor he regarded as “a great responsibility,” in part, because of his own family history.

Frankel laughed as he recalled how two television stations banned “Grapevine,” inspired by his younger brother’s libidinous years as a sportscaster, because of its randy dialogue.

“Hope Springs” may also raise eyebrows for its frank discussions about sex. “But we’re not trying to shock people,” Frankel said. “It’s really a story about the characters’ search for intimacy.”

“Hope Springs” hits theaters on Aug. 8.