Yesterday Pharrell debuted the video for “Happy,” otherwise known as the world’s first 24-hour music video. The innovative film features an interactive clock for easy streaming, or can be alternatively viewed via six four-hour segments. There’s also a condensed four-minute version, y’know, if you don’t have an entire day to spare. But how did they pull off this ambitious project exactly?

Fast Company did a little investigating, speaking with the directing team We Are From L.A., the video’s line producer Jett Steiger, VP of iamOTHER Mimi Valdes and Pharrell himself. From its grueling schedule, mile-long treks and on-the-spot casting, the piece uncovers some pretty awesome secrets behind the 11-day shoot.

UPDATE: Check out the official behind-the-scenes video below, courtesy of iamOTHER.

Check out a few excerpts after the jump…

The particular equation behind “24-Hour Happy,” as the project came to be called, can be broken down as follows: 400 people perform the four-minute song, including Pharrell and a few celebrities (part of the fun is finding Steve Carell–the voice of Gru–Jimmy Kimmel, Tyler the Creator and Kelly Osbourne, among others). Pharrell does the song 24 times, at the top of every hour, followed by 14 additional performances within that hour. WAFLA chose to shoot in Los Angeles (they don’t call themselves We Are From L.A. for nothing), starting at sunrise in Downtown L.A., moving to LAX, Silver Lake, Echo Park and Hollywood, among other places, ultimately circling back to Downtown. Filming took 11 days (not consecutive), with two days dedicated to Pharrell. “On the non-Pharrell days, we shot 42 setups,” says WAFLA. “We must have walked 10 miles a day. Fortunately it was L.A., where no one walks, so sidewalks were generally empty, which made it easy to shoot.”

Casting was key. “We wanted as diverse a group as possible–all ages, all ethnicities, all types,” says Valdes. “Our choices were based mostly on personality–people who looked like they’d have fun on camera.” Adds Pharrell: “We didn’t want to use models or caricatures. We wanted archetypes–people you’d walk past in a mall.”

Though most of the people auditioned, a few were cast on the spot. “If we saw someone who looked cool on the street, we’d ask if they wanted to be in a Pharrell video and they jumped at the chance,” says [IAmOther Vice-President, Mimi] Valdes. Those chosen by audition had the advantage of getting the song in advance, allowing them to rehearse their moves. But on the day itself, everyone got just one take, including Pharrell. “That’s what accounts for the charm,” says Valdes. “Everyone knew they had one shot–this was their moment to go all out, and we love that.”