James Franco is the right guy to make a movie about one of the worst movies ever made.

Not that I’m saying Franco’s long and impressive and wildly varied career path is pockmarked with his own lousy movies; quite the contrary. Franco is infinitely more talented than the hapless and clueless wannabe auteur Tommy Wiseau of “The Disaster Artist” — but given Franco’s own trippy, sometimes perplexing, I’ll-try-anything-once resume, he shares a certain wacky kinship with Wiseau.

They’re both willing to risk making themselves look foolish in the name of creating art. But in Wiseau’s case, the mad endeavors didn’t result in anything approaching art, or even a comprehensible bad movie.

The infamous 2003 debacle known as “The Room,” written by, directed by and starring Wiseau, wasn’t just inept. It was so off-the-charts lousy, so insanely terrible, so ludicrously jumbled, it has crossed over into cult status, complete with midnight screenings and audience members cheerfully yelling out particular awful lines.

“The Disaster Artist” is a breezy, entertaining and even affectionate movie about the making of “The Room.” Franco directs and stars in this adaptation of the book by Greg Sestero (played by Franco’s brother Dave), who at the time was an aspiring actor.

Greg and Tommy meet in an acting class in San Franciso. Their world-weary teacher (Melanie Griffith) is suitably mortified when Tommy wails “STELLA!” over and over again as a way of demonstrating his “talent.” Tommy clearly believes he’s channeling Brando. His teacher clearly believes the closest he’ll even get to even a TV show is changing the channel.

Nevertheless, Greg is drawn in by this mysterious, longhaired, imposing presence who looked like he had just jumped off the ship in a pirate B-movie and spoke with an accent unlike any accent anyone had ever heard before. The pair head to Los Angeles to pursue their dreams of becoming Hollywood famous.

Tommy’s a nightmare. When he spots Judd Apatow (played by Judd Apatow) in a restaurant, he rudely interrupts Apatow’s dinner and starts pitching himself, even as Apatow points out how inappropriate this is and tells him this isn’t how it works. Finally an exasperated Apatow says to Tommy, “You’ll never make it, not in a million years,” to which Tommy replies, “But AFTER that?”

Everything about Tommy is shady. Shady shady shady. How old is he, really? (He claims to be in his late teens when he’s obviously at least twice that age. At best) Where was he born? (He says he’s from New Orleans, even though he sounds more like one of the “wild and crazy guys” from the old “Saturday Night Live” bit.) Where does the money come from when Tommy starts talking about making his own movie, and eventually raises some $6 million? (This remains a mystery, both in “The Disaster Artist” and in real life.)

When they go to the park with a football, why does Tommy chuck it into the ground with a weird motion, as if he’s literally never even seen a game in his life?

Greg doesn’t care, at least not at first. Tommy is making a MOVIE — a real movie — and Greg is going to have a substantial role in said movie.

Franco peppers the movie with often-hilarious extended cameos by Zac Efron, Seth Rogen, Hannibal Buress, Megan Mullally, Alison Brie and Bryan Cranston, among others. Everyone gets into the spirit of “The Disaster Artist,” which isn’t about mocking the delusional and borderline pathetic Tommy Wiseau, but in celebrating his horribly misguided but seemingly sincere burning passion to make a movie, even when it’s apparent to everyone EXCEPT Tommy that he has absolutely no idea what he’s doing.

In recent years, the talented Franco has teetered on the edge of self-parody (some would argue he fell in), testing our good will with the stint on “General Hospital”; the off-putting social media endeavors; the disastrous, too-hip-for-the-room co-hosting gig at the Oscars; the strange performance art, e.g., covering himself in gross and sticky goo of some sort.

With “The Disaster Artist,” of all projects, Franco reminds us he’s a genuine talent behind and in front of the camera. How’s that for a neat trick?

★★★

A24 presents a film directed by James Franco and written by Scott Neustadter and Michael H. Weber, based on the book by Greg Sestero and Tom Bissell. Rated R (for language throughout and some sexuality/nudity). Running time: 98 minutes. Opens Friday at local theaters.