Frank Marshall estimates he spent more than 100 hours listening to Bee Gees music over the past three years.  It was “Fanny (Be Tender With My Love)”  that got stuck in his head the most often.

The payoff? A documentary — “Bee Gees: How Can You Mend a Broken Heart” — that chronicles the life and times of one of music’s greatest trios. Marshall’s film, which premiered last month on HBO, follows the humble beginnings of brothers Barry, Maurice and Robin Gibb in Australia, as well as their journey to pop superstardom. It captures both the creative excitement that propelled them to the top of the charts, as well as the struggles with drugs and fame that nearly derailed them.

The documentary incorporates archival concert footage, past interviews and fresh conversations with musicians like Eric Clapton, Noel Gallagher and Nick Jonas to capture several decades — spanning from their first hit with “New York Mining Disaster 1941” to the creation of “Stayin’ Alive” for the record-setting “Saturday Night Fever” soundtrack.

As he delved deeper into the backstory of the Bee Gees, Marshall says he was struck by the effortless musical talents of the brothers. “I assume they spent all this time in music school or with vocal coaches,” Marshall told Variety for the “Doc Dreams” series presented by National Geographic. “It turns out, it was all natural. I wanted to explore how this kind of musical relationship happened.” Though Maurice and Robin died years back, leaving Barry as the only living Gibb brother, Marshall says it was “key” to make sure all three siblings are featured equally in the documentary.

Marshall has produced dozens of popular films over the years — a list that includes “Raiders of the Lost Arc,” “The Color Purple” “The Curious Case of Benjamin Button,” “Back to the Future” and “Jurassic World” — but he’s only ever directed a handful of movies. Following the documentary’s release, Marshall discusses why he wanted to step behind the camera and what he hopes audiences take from the Bee Gee’s story.

What specifically drew you to the story of the Bee Gees and made you want to direct this documentary?

I grew up in a musical family. My dad was a guitar player-composer-arranger and he worked at Capitol Records. When I went to visit Steve Barnett, who was the CEO of Capitol Records, about four years ago, I was telling stories about being in the building. We started talking about artists that they had. They were looking to reinvigorate some catalogs, and they just had bought the Bee Gees catalog. I said, “I love the Bee Gees, what about them?” He said, “Let’s see if we can make it happen.” A couple of weeks later, Barry Gibb had come out to attend the Grammys, [which] were honoring him and the Bee Gees. We met in Steve’s office there at Capitol Records. It was sort of fate. It all came together, being in the right place and the right time.

What was your pitch to Barry?

I really mostly talked about being the older brother, and amazingly enough we’re only 12 days apart in age. We were both born in September of 1946 so we had a lot of things in common. And he understood that I had a music sense to things. The more I talked to him, the more amazing I found the story of the Bee Gees to be.

How much did you know about the Bee Gees before you began your research?

I’m kind of like most people. I knew a lot about “Saturday Night Fever,” but I didn’t really know about the early days — how they grew up and where they grew up and how they became singers together and that whole family dynamic that started actually in Brisbane, Australia, where they had a dream about being a musical group.

The documentary is so comprehensive. How do you decide what parts of their life to include and which to omit?

That’s one of the hard things to do — decide what to keep in or not. Actually, there’s probably a five-part series there because they had so many ups and downs in their career. I couldn’t include everything, but we had the heart of the story. The main theme was about songwriting and family. If it didn’t move the story forward with one of those two things I said, “OK, we don’t need that.”

Did you find it challenging to tell both the narrative of the band and each brother individually?

It was important to Barry that we include all of the brothers personalities and not just his. As he says at the beginning, these are just his memories and his perceptions. Maurice and Robin, and even Andy, would have had different memories and different perceptions of what went on on. It was important for me to introduce each brother and how they fit into the group. We had a great interview with David Leaf where Maurice says, “I’m the peacemaker.” That showed how he fit into the brothers, so it was important to have them not only talk about the songwriting and and the music, but also about being brothers.

How did you decide who to talk to for the supplementary interviews? Was there anyone you reached out to who wasn’t able to participate?

That’s the fun thing about making this documentary. I had this great team behind me scouring the internet and looking for people who have talked about being influenced by the Bee Gees. I made up a wish list of of entertainers and artists I wanted to talk to. And guess what? They all said yes. It was kind of amazing because usually you get 25-30% of people [you ask] — everybody’s busy. But everybody wanted to talk about them. It was incredible. From Justin Timberlake to Eric Clapton. How often do you get to talk to Eric Clapton? It was pretty cool.

How did you get in contact with the Disco Demolition night usher named Vince, and what was it like to get his perspective?

The other thing I love about making documentaries [is] you’re kind of on a treasure hunt. You’re looking for little gems that might lead you in one direction or another. [My team] found Vince in Chicago, who is now a pioneer of house music and obviously very knowledgeable about the music industry. He had done a couple of interviews about the Disco Sucks Night at Comiskey Park, where he happened to be an usher. To get that first person perspective was really important. His interview is just fantastic and really lends the historical context to what was happening back then.

The Bee Gees have written a dizzying number of hits. What made them so successful as songwriters?

They’re storytellers. And that’s important to people — the song is about something. That’s why we named the movie “How Can You Mend a Broken Heart.” It was a very significant moment in their getting back together in the early days. They also have an incredible musical sense. The melodies, the hooks they create [are] all very catchy.

They have been described as “chameleon-like” because they were able to capture so many different styles of music.

You can’t really put them into a compartment. They survived a long time and they weren’t really one genre or another. Eric Clapton says, “I thought they were an R&B band.” There’s a lot of country influence there. Then we have the disco period. But they just kept adapting and they had several musical styles that combined to create that unique sound.

Do you read reviews? What kind of feedback have you gotten on the documentary?

It’s been incredible. I do feel that it’s a little bit because everybody’s cooped up and they have to find something to watch every night, but the response has been incredible. Really the goal for me was to celebrate their legacy, and I think people are rediscovering and discovering who the Bee Gees are and how important the impact they have on pop music was. It’s been very, very satisfying to see the response, both from the critics and from the audience.

Have you talked to Barry? What did he think of the finished film?

I have talked to Barry. I don’t think he’s seen the whole movie yet. As you can imagine, it’s kind of difficult for him to look back. But the response that he’s heard, he’s very happy. And I’m really happy  because he’s performing again and he’s got a new album all out. Barry’s back and he’s in a good place now.