When you’re rocking out to Metallica at Outside Lands in San Francisco in August, or perhaps grooving to some hipster-approved dance-pop act at Southern California’s Coachella come spring, you might want to take a second to thank the Monterey Pop Festival.

Yes, the three-day event that took place way back in 1967 — and was captured in D.A. Pennebaker’s documentary “Monterey Pop” — had an immense impact on the music world that can still be felt a half-century later.

“This is pre-Woodstock. This is pre- all the other festivals,” says Gregg Perloff, whose Berkeley-based Another Planet Entertainment puts on Outside Lands and other large music events.

“(Monterey Pop) legitimized that a large number of people could go to a music festival. It was the first of its kind.”

In recognition of the 50th anniversary of the festival — and Pennebaker’s legendary concert film about it — a restoration of “Monterey Pop” is being shown in theaters today. Taken from the original 16mm camera negatives and supervised by Pennebaker, now 91, and boasting a 5.1 surround sound mix engineered by legendary music producer Eddie Kramer, this restoration captures the film’s earth-shaking performances in all their glory.

Some 200,000 people attended the Monterey Pop Festival over its three-day schedule at the Monterey County Fairgrounds, many of whom had descended upon the West Coast inspired by the same spirit expressed in the Scott McKenzie song “San Francisco (Be Sure To Wear Flowers In Your Hair),” written by festival organizer John Phillips of the Mamas and the Papas expressly as a promotional tune for the festival.

Songs featured in the film, in order of appearance:

Scott McKenzie — “San Francisco (Be Sure to Wear Flowers in Your Hair)”

The Mamas & the Papas — “Creeque Alley” and “California Dreamin’”

Canned Heat — “Rollin’ and Tumblin’”

Simon & Garfunkel — “The 59th Street Bridge Song (Feelin’ Groovy)”

Hugh Masekela — “Bajabula Bonke (The Healing Song)”

Jefferson Airplane — |“High Flyin’ Bird” and “Today”

Big Brother and the Holding Company (with Janis Joplin) — “Ball ‘n’ Chain”

Eric Burdon & The Animals — “Paint It Black”

The Who — “My Generation”

Country Joe and the Fish — “Section 43”

Otis Redding — “Shake” and “I’ve Been Loving You Too Long”

The Jimi Hendrix Experience — “Wild Thing”

The Mamas & the Papas — “Got a Feelin’ ”

Ravi Shankar — “Dhun” (“Dadra and Fast Teental”) .