It is useful to know that Richard Levine, the writer and director of “Every Day,” was one of the brains behind that guiltiest of depraved TV pleasures: “Nip/Tuck.” In the movie his presumed surrogate, Ned (Liev Schreiber), is a writer for a popular New York-based medical drama whose creative team sits around at meetings making wisecracks like “sex with one’s dog is the new sex with one’s cat” while dreaming up outrageous plot turns involving cannibalism, bestiality and castration.

The show runner, Garrett (Eddie Izzard), is a high-strung gay man who pressures the relatively square, squeamish Ned to come up with shocking plot twists. But Ned, who has been married for 19 years and has two sons, the oldest of whom, 15-year-old Jonah (Ezra Miller), recently came out as gay, is a traditional dad who looks at life from the viewpoint of a protective parent. He has grown disgusted with the show.

“Every Day” is a fairly accurate portrait of moderately upscale urban life as it is lived today. It’s not easy. You might say that the times they have a-changed much faster than Ned has been able to adjust to them. Cautiously accepting of Jonah’s sexuality, he frets that college students might prey on his son if the boy is allowed to attend a gay and lesbian dance. As it turns out, Ned has reason to be concerned.

If Ned’s wife, Jeannie (Helen Hunt), worries less about Jonah, she has her own challenges. The family has reluctantly and dutifully taken in her recently widowed father, Ernie (Brian Dennehy), who has multiple ailments and uses a wheelchair. Given to tantrums and drunken benders, Ernie is a raging depressive who knows that his days are numbered and refuses to have surgery to prolong a life that has lost most of its zest.

Very well written and acted, “Every Day” feels like a glorified television drama softened with comic and surreal trimmings, with a mildly upbeat ending appended. As self-consciously up to date as the hit comedy show “Modern Family,” it is considerably more heavy-hearted. Its fantasy sequences humanize the otherwise unbearable Ernie, a devotee of Count Basie and Duke Ellington who retreats into a dream world in which his happier younger self plays the drums with a swing band.

Unlike so many family movies, “Every Day” portrays the parents as mature adults, making the best of their trying circumstances; they don’t behave like spoiled brats. Stretched to the breaking point by a demanding father she was never fond of, Ms. Hunt’s Jeannie barely manages to keep her temper in check. Over 40, she is acutely aware of her aging body and of her loyal husband’s possibly roaming eye. In the face of all this anxiety, her self-restraint is almost heroic. It is a role that makes good use of Ms. Hunt’s edge of tension and suppressed hysteria.

Mr. Schreiber’s Ned tries valiantly to resist the sexual provocations of Robin (Carla Gugino), a cynical, fun-loving co-worker assigned to work with him on a script. Their after-hours meeting prevents him from attending a concert in which his younger son, Ethan (Skyler Fortgang), plays violin.

Although Ned’s high-salaried job keeps the family solvent, his worsening writer’s block and his disgust with his work are not hopeful signs, and the looming cost of putting Ernie in an expensive nursing home threatens the family’s financial security. Mr. Schreiber’s performance as a goodhearted professional writer coping with the uncertainties and temptations of contemporary life is entirely persuasive. Here is a modern urban man at midlife, panting on a treadmill at the heart of the media jungle, as the pace quickens and his enthusiasm ebbs.