Aretha Franklin’s 1972 album “Amazing Grace” outsold every other record she’s ever made. Some say it’s the greatest gospel album ever recorded. What few outsiders know is that the recording sessions on those two nights in January 1972, at L.A.’s New Temple Missionary Baptist Church, were captured on film by a four-man camera team headed by director Sydney Pollack.

More than 20 hours of 16mm footage — vaulted away for 38 years — are now being edited into a concert film that Warner Bros. once envisioned (curiously, in retrospect) as part of a double bill with “Superfly.”

And while producer Alan Elliott is overseeing the project, the credit on the film will read “a film by Sydney Pollack.”

I always wanted to finish that,” Pollack said, according to Elliott, who had several conversations with the filmmaker in the year before his May 2008 death. “We’re working off Sydney’s notes,” says Elliott, who acquired the project from Warner Bros. at Pollack’s urging and hired Pollack’s longtime editor William Steinkamp (“Out of Africa”) to help shape it into a film for possible theatrical distribution.

Glimpses of the footage show an artist at her zenith as a performer, while also returning to her beloved roots in gospel music. “Most Aretha Franklin fans feel this is her greatest work,” says David Ritz, who co-authored Franklin’s autobiography. “To me, it’s one of the highlights of 20th-century American musical culture.”

Elliott has spent the past two years piecing together the backstory of “Amazing Grace.” A former staff producer at Atlantic Records (Franklin’s label throughout the 1970s), he knew Jerry Wexler, who not only coined the term “rhythm and blues” but who was widely credited with helping propel the Queen of Soul into a superstar.

I brought a profane rhythm section into church,” Wexler quipped in a 2008 conversation with Elliott about the recording of “Amazing Grace.” He labeled the album “a masterpiece” and said he hoped Elliott could finish the film and get it released. Three months after Pollack’s passing, Wexler, too, was gone.

It was in the aftermath of the success of such early concert films as “Woodstock” and “Gimme Shelter” that Warner Bros. — which owned Atlantic Records — agreed to film the recording of “Amazing Grace” on Thursday and Friday, Jan. 13 and 14, 1972, with an eye toward a coordinated album-film release.

Pollack, then a rising star as a director (Oscar-nominated for 1969’s “They Shoot Horses, Don’t They”), was one of the four cameramen, Elliott says. Wexler, along with Franklin and Arif Mardin, produced the album, which was released in June 1972, won a Grammy and eventually went double platinum.

The Rev. Alexander Hamilton — who can be seen in the film conducting the Southern California Community Choir while his boss, gospel giant the Rev. James Cleveland, is at the piano — recalls working for three months with Franklin and Cleveland on the arrangements.

Aretha was at the top of her game,” he says, “and all of us knew her gospel roots far more than the secular world did. To us, it was just exciting to get the chance to work with, at the time, the leading singer in America.

We put a lot of work into making the arrangements tight. We brought in all of the traditional gospel values that everybody knew and loved, yet we added here and there sprinkles of what was then modern: Marvin Gaye’s ‘Wholy Holy,’ Carole King’s ‘You’ve Got a Friend in Me.’ That’s what made it a universal hit. It combined the traditional gospel with songs by secular artists that did not subvert the gospel message.”

Hamilton recalls visiting Pollack in the studio during the initial assembly of the film in 1972. Steinkamp says his father Frederic had begun editing it, and he remembers helping to sync the audio. But Warner Bros. dropped the project in September of that year. “I think because it was gospel, nobody knew what to do with it,” Hamilton says.

According to Elliott, Pollack attempted to revive the project several times without success. Only a snippet of the footage has ever been seen publicly (in a 1988 BBC documentary aired as an “American Masters” on PBS).

Ritz, who is one of few to have watched a substantial portion of the footage, notes that Franklin’s father, Rev. C.L. Franklin, and her mentor Clara Ward, are visible in the church (along with Mick Jagger, clapping in the back row). “It’s the perfect music, an artist at her height, everybody there to make her feel confident and loved, the music of her childhood and the encouragement of the African-American church,” says Ritz.

Hamilton says he’s happy the film may finally be released: “Maybe because it’s history now. Here is one of the most famous artists in the world, as she was then, doing something that nobody had ever done, or has really done since. So I think the film is going to find a wider audience, not just because of its gospel roots, but because of its historical value.”