The attention to detail in these scenes provides a feast for geeks of all kinds, as the camera lovingly ogles microphones, amplifiers and consoles that were state of the art in the mid-1960s. Watching Brian, with his boyish face and eager puppy-dog manner, adjusting the knobs and directing the session players, is like watching a kid in a toy store. He is freer and more confident than ever before, layering and sculpting improbable instruments and bewitching harmonies into songs that are at once exquisitely simple and astonishingly sophisticated.

The making of “Pet Sounds” is the centerpiece of “Love & Mercy.” It also represents a plateau of calm and control in the midst of a life full of chaos and pain. Instead of telling the story in full, the film shifts back and forth — fluidly and seamlessly — from the ’60s to the ’80s, when Brian, now played by John Cusack, first meets Melinda Ledbetter (Elizabeth Banks), in a Cadillac showroom in Los Angeles. Their courtship is complicated by the presence of Eugene Landy (Paul Giamatti), a psychologist who serves as Brian’s guru, dietitian and legal guardian.

Working together — but also in isolation from each other, like musicians in separate recording booths — Mr. Cusack and Mr. Dano create a remarkable composite performance, a set of before-and-after pictures that is also a perfectly unified, hauntingly complex portrait. Mr. Dano, gentle and inscrutable as a panda bear, conveys the pathos of a young man’s unraveling. The Beach Boys were a family business, including Brian’s brothers Carl (Brett Davern) and Dennis (Kenny Wormald) and their cousin Mike Love (Jake Abel). Their rise, chronicled in a lively montage of early hits, was overseen by Murry Wilson (Bill Camp), an abusive patriarch who hung around to undermine and humiliate his sons, Brian in particular, even after being fired as the group’s manager.