Devotees of the musicals of Stephen Sondheim have learned to approach screen adaptations of his work with trepidation, simply because the track record has been so mixed. “A Funny Thing Happened on the Way to the Forum” was—apart from the helter-skelter editing—a pretty straightforward transition, but that early work is hardly characteristic. Harold Prince’s “A Little Night Music,” on the other hand, was an unmitigated disaster, and even Tim Burton’s 2007 “Sweeney Todd” drew some criticism, though by and large it was pretty faithful to the source.

Rob Marshall’s take on “Into the Woods,” Sondheim’s dark 1987 fairy-tale musical, represents the culmination of a long effort to bring the piece to the multiplex, and the composer’s aficionados have fretted over the fact that it’s finally been made under the Disney imprimatur. Has it been defanged as a result? The simple answer is yes, but only to a modest degree; and enough survives, especially in what remains of Sondheim’s brilliant lyrics (which is quite a lot), to make it at least the equal of Burton’s “Todd.” A good indication that the film is no bastardization of its source is that the script was written by James Lapine, author of the original stage book, who can be expected to have been a mite protective of the material, and generally is, even if some changes were required (the most notable being the ultimate fate of one important character). Still, while some of the darker elements have been toned down, Marshall’s film is still recognizably the Sondheim-Lapine piece.

“Into the Woods” is, of course, a mashed-up version of fairy-tales that Disney has used frequently elsewhere, but one in which the “ever after” doesn’t prove nearly as “happily” as in the Mouse House’s animated efforts. The medley of interlocking tales comes about as the result of on a curse by a witch (Meryl Streep) that has left the couple living next door—the town baker (James Corden) and his wife (Emily Blunt)—childless. Their loneliness is punishment for the theft by the baker’s father (Simon Ruddell Beale) of the witch’s magic beans from her garden. But the witch promises to lift the curse if the baker will deliver within three days four items she needs for a time-sensitive incantation: a milk-white cow, a scarlet cape, corn-yellow hair and a golden slipper. It doesn’t take much sleuthing to realize that their quest to secure them will involve Jack (Daniel Huttlestone), for whose beloved cow they trade the purloined beans; Red Riding Hood (Lilla Crawford), whom the baker rescues from the stomach of the lascivious Wolf (Johnny Depp); Rapunzel (MacKenzie Mauzy), imprisoned in her tower by the witch; and Cinderella (Anna Kendrick), brutally treated by her wicked stepmother (Christine Baranski). Other characters along for the ride are Jack’s mother (Tracey Ullman); Red Riding Hood’s grandma (Annette Crosby), and Cinderella’s stepsisters (Tammy Blanchard and Lucy Punch)—as well as Cinderella’s prince (Chris Pine) and his younger brother (Billy Magnussen), who falls for Rapunzel.

Lapine and Sondheim crafted a predictably intricate, deliciously droll scenario for Act One of the musical, in which all the characters’ stories dovetail with one another as the baker and his wife get, lose and then retrieve the necessary ingredients for the witch’s brew, and all seems to work out happily for everyone. But then the repercussions begin, and they bring with them destruction, betrayal, deaths (though not quite as many as on stage), and the melancholy realization that everything carries a price tag. While the dark elements of Act Two have been somewhat mitigated here, there’s certainly enough left to convey the idea that though wishes may come true, their fulfillment can bring unexpected, and unwanted, consequences. And that—along with the general character of the piece—is enough to suggest that while “Into the Woods” is fine for older children, very young ones probably won’t be much taken by it. Still, adults will no doubt be most receptive to the undercurrents that the authors have drawn from the tales they’ve reworked.

Of course they’ll also be won over by Sondheim’s lovely music and amazing lyrics, presented here by an exceptionally able cast of singer-actors (and, it should be noted, in the original orchestrations). Streep has a field day hamming it up as the witch, but one may well be amazed, after the travails of “Momma Mia,” at how well she belts out the songs, being particularly careful with the articulation so important to them. After the strain he exhibited in “Todd,” Depp might also seem a worrisome choice, but here he manages his single number with aplomb, and offers a seductively sinister manner that’s perfect. Kendrick’s vocal prowess, along with her charm, will come as no surprise, but the similar combination brought by Blunt might raise an eyebrow, and Corden cuts an immensely likable figure as the baker, delivering the musical numbers with absolute authority as well. Even youngsters Crawford and Huttlestone don’t disappoint, even if their characters are a bit milder than they were onstage.

And then there are Pine and Magnussen, who send up the charming princes in a style that recalls “The Princess Bride.” Their duet “Agony” is doubtlessly the single greatest crowd-pleaser the score has to offer, and as staged, acted and sung here it would be an absolute show-stopper if the projector allowed for such a thing. Pine also manages to deftly pull off the prince’s second act encounter with the baker’s wife (again, made milder than on stage), though Magnussen is shortchanged by the alterations his prince and Rapunzel undergo.

One can imagine a more magical visual setting for the sometimes jovial, sometimes Grimm convolutions of the piece, but it’s probably a good thing that Marshall opted for a smaller-scaled screen translation, in which effects and spectacle play second fiddle to the score and the performers. Still, there’s nothing wrong with Dennis Gassner’s production design, the art direction supervised by Chris Lowe, Anna Pinnock’s sets or Colleen Atwood’s costumes; and Peter Swords King’s make-up and hair design is extravagantly eye-catching, especially in Streep’s case. All is bathed in the glow of Dion Beebe’s luminous cinematography, and special thanks are due to the sound team headed by John Casali, who allow the words to register without losing the effect of the orchestral backing.

Some Sondheim loyalists may still be dismayed over any adjustments to a modern classic like “Into the Woods.” For them, the 1989 “original cast” performance filmed for PBS is fortunately still available on disc. But it’s heartening that at a time when movie musicals remain an endangered species, such loving care has gone into bringing one of Sondheim’s most ingenious, affecting works to the screen without unduly compromising what makes it so special.