If you're going to "Taking Woodstock," be sure to wear some flowers in your hair -- but while you can expect to turn on and tune in, don't expect to rock out exactly.

As fun and far out as Ang Lee's flashback to the iconic 1969 concert/counterculture statement is, it isn't a music film, and nor does it pretend to be. There are moments when strains of Janis Joplin float around, or Country Joe MacDonald and the Fish work up the crowd in the background, but Lee ("Lust, Caution," "Brokeback Mountain") leaves the music angle to the 1970 Oscar-winning documentary about the concert.

That doesn't mean his journey up the country isn't a groovy trip in its own right, though, as "Taking Woodstock" -- coinciding with the concert's 40th anniversary -- takes a historical, behind-the-scenes tack, based on Elliot Tiber's book of the same name.

Nobody really thinks about it, but those three days of peace and music in mid-August 1969 were preceded by several months of hard work and planning. Played in the film by Comedy Central star Demetri Martin, Tiber came to the table late in the game but his role was pivotal.

Jonathan Groff and Demetri Martin in a scene from 'Taking Woodstock.'

WOODSTOCK
3 stars, out of 4

Snapshot: A drama with comedic elements, based on real events, about a naive young man who ends up playing a key role in the staging of 1969's Woodstock music festival.

What works: Director Ang Lee does a lovely job putting the historic concert into context, capturing pure moments of fleeting joy in the process.

What doesn't: Much of the first half of the film feels slight, and it sags for stretches.

The concert's organizers had just been run out of nearby Wallkill, N.Y., whose business owners decided they'd be better off without a "major hippie invasion." The clean-cut Tiber, however, happened to have a festival permit from his town, Bethel, N.Y., for a chamber music concert he was going to host at his family's financially strapped fleabag motel. Realizing that Woodstock would probably lure a few more attendees to town -- hippies or not -- he somewhat naively offered his permit to its organizers.

The rest would be history.

For the first two-thirds of the film, that backstory -- not the concert -- gets the bulk of Lee's attention. It's interesting and often amusing stuff, populated as it is with a cast of oddball characters, but it's also uneven, with a tendency to sag for stretches.

Lee keeps things afloat with an appealing air of levity, including a fun but restrained use of split-screen, an homage to the 1970 doc, as well as cameos by that movie's Port-O-San guy and its peace-sign-flashing nuns. Much of "Taking Woodstock," however, is burdened with a nagging feeling that it's all a touch too slight for the Oscar-winning director of "Brokeback Mountain."

Martin's Tiber is standing near a lake filled with bathing hippies, and he's talking with his father (Henry Goodman) and his family's newly hired cross-dressing security guard (Liev Schreiber). Softly, the music cranks up from the Yasgur farm, where the concert eventually took place, and wafts in over the trees.

"It's starting," Martin says. At his father's urging, he decides to wander down to the concert site and drink it in (or inhale it, as it were).

Just like that, the film gets a new, meaningful life. As Martin dives into the psychedelic haze, Lee seizes the opportunity to put the whole, crazy trip into context, transforming "Taking Woodstock" into a magic-carpet ride with mind-altering moments and satisfying snatches of depth.

For instance, there's Tiber's mother, played in a hoot of a performance by Imelda Staunton ("Harry Potter and the Order of the Phoenix"). She is scrappy, she is a bully and she is consumed with money, money, money.

"How have you done it?" Martin asks his father. "How have you lived with her for more than 40 years?"

"I love her," comes the response.

Cut to an American flag.

Equally deserving of praise is the sheer scope of Lee's convincing reproduction of the concert site, exemplified by an extended tracking shot along what must be a miles-long set on a New York highway. It's beyond groovy. It's astounding.

And at other times, Lee manages to capture moments of pure joy, such as when Martin and co-star Emile Hirsch ("Into the Wild," "Speed Racer") slide through the mud with musical accompaniment by Canned Heat. It's impossible not to get caught up in their bliss and wish that the scene -- that lovely, fleeting sliver of time -- could last just a little longer. For a brief, shining moment, it is everything -- and then it's gone.