The relationship between rockers Metallica and jazz might seem spurious. But Robert Trujillo and Lars Ulrich, the bassist and drummer, respectively, for the thrash metal band — who act as Artists in Residence at this year’s Mill Valley Film Festival — are not all they seem on the surface.

As guest curators for the 11-day event, each member picked a movie they’ll be presenting: Trujillo with “Jaco,” a documentary work in progress about groundbreaking crossover jazz bassist Jaco Pastorius that he produced with John Battsek of Passion Pictures (the Oscar-winning “Searching for Sugar Man”); and Ulrich with “Whiplash,” about an aspiring jazz drummer and his thorny relationship with a tough-love, Juilliard-like instructor.

“A lot of the younger jazz enthusiasts who are really into Jaco don’t want to believe the bass player for Metallica actually went to jazz school, saw Jaco play and had a band that was completely inspired by Jaco (the Infectious Grooves),” Trujillo says. “You’d be surprised by how many people are not happy about my connection to someone who was my hero.”

For his part, Ulrich was raised in jazz-crazy Copenhagen. “My father was very close with (sax legend) Dexter Gordon, who happens to be my godfather,” he says. “And so when I was growing up, the music playing in my household was Miles and Coltrane and Charlie Parker and Ornette Coleman and musicians who spent a lot of time in Denmark in the late ’60s and early ’70s.”

But Ulrich, a self-described “film fanatic,” did not settle on “Whiplash” because of the obvious parallels. “The reason I picked ‘Whiplash’ is not because it’s about a drummer or because it’s about jazz music, it’s because it’s a great film,” he says. “I understand the cute element of the drum connection, but it’s really the first film this year that’s blown me away.”

“Jaco” represents a passion project for Trujillo, and his first as a feature producer. He and the filmmakers, including director-editor Paul Marchand, spent close to fours years compiling film, audio and live music footage, including interviews with bass virtuosos Flea, Alphonso Johnson, Jerry Jemmott and Bootsy Collins, as well as Carlos Santana, Sting, Herbie Hancock, Wayne Shorter, with whom Pastorius played in Weather Report, and Joni Mitchell, who recruited Pastorius for her fusion masterpieces “Hejira” and “Mingus,” and with whom she toured in 1979.

Although nabbing Mitchell represented a major coup for “Jaco,” it also threw a wrench into the machinery, requiring yet another edit on a project that seemed never-ending. “We connected with her just within the last six months,” Trujillo says. “It really changed things, and unfortunately derailed some of the other interviews. She was that powerful.”