There's an hour worth of terrific movie in "Babylon," now in theaters. What a shame that the good stuff is trapped in three hours and nine minutes of self-indulgent bloat.

That's what comes from seeing the insane days of Hollywood through the cocaine haze of its pioneering egos.

Filmmaker Damien Chazelle sets "Babylon" during the Roaring '20s when movies are in a traumatic transition from silents to talkies. The stress drives everyone to drink, or worse. By contrast, 2016's "La La Land," which made Chazelle -- then 32 -- the youngest director ever to win an Oscar, was an unabashed love letter to the Hollywood dream factory.

PHOTO: Brad Pitt plays Jack Conrad and Diego Calva plays Manny Torres in Babylon from Paramount Pictures.
Scott Garfield/Paramount Pictures
Brad Pitt plays Jack Conrad and Diego Calva plays Manny Torres in Babylon from Paramount Pictures.

In "Babylon," Chazelle rabidly bites the hand that feeds him. Oh, he's still starry-eyed about the celluloid magic that makes stars immortal. But his exposure of the toxic debauchery and ugly exploitation behind the scenes is a hate-on of epic proportions.

Chazelle begins his film with a close-up of a pooping elephant on its way to a party. The shock tactics continue as the film trots out real-life scandals surrounding such icons as Fatty Arbuckle and gossip queen Hedda Hopper. Their names are changed. But why? You can't libel the dead.

Take hard-drinking, hard-loving leading man John Gllbert, the Brad Pitt of his day. Nice touch having Pitt take the role, here called Jack Conrad. Pitt brings a welcome and lovely nuance to Jack's comic bravado and growing self-loathing. His riveting restraint makes him a standout.

As Nellie LaRoy, Margot Robbie recalls "It Girl" Clara Bow. Chazelle encourages the gifted Robbie to act like her life depended it. Whatever she's doing, it's a lot, especially when Nellie's Jersey accent kills her career in talkies and her gambling addiction puts her in mortal danger.

PHOTO: Margot Robbie plays Nellie LaRoy and Li Jun Li plays Lady Fay Zhu in Babylon from Paramount Pictures.
Scott Garfield/Paramount Pictures
Margot Robbie plays Nellie LaRoy and Li Jun Li plays Lady Fay Zhu in Babylon from Paramount Pictures.

In the midst of this circus of hedonists is Manny Torres, a Mexican immigrant who rises from gofer to studio exec. Manny, in thrall to Jack and in love with Nellie, is played by Diego Calva ("Narcos: Mexico"), a solid actor in a role that needed a star to hold the film's center.

Chazelle overstuffs "Babylon" with undeveloped subplots. Jovan Adepo portrays a Black jazz trumpeter who is forced to humiliate himself by using makeup to look darker on screen. And Li Jun Li excels as a sexually fluid chanteuse based on Anna May Wong. I don't know what dangerous gangster Tobey Maguire is playing, but he creeped me out big time.

PHOTO: Rory Scovel plays The Count, Diego Calva plays Manny Torres, Ethan Suplee plays Wilson and Tobey Maguire plays James McKay in Babylon from Paramount Pictures.
Scott Garfield/Paramount Pictures
Rory Scovel plays The Count, Diego Calva plays Manny Torres, Ethan Suplee plays Wilson and Tobey Maguire plays James McKay in Babylon from Paramount Pictures.

We long for more of these characters. And more of the great Jean Smart as columnist Elinor St. John, who tells Jack, without cruelty, that, yes, his career is over but not to despair. "Someone born 40 years from now will see you and think of you as a friend," she says.

For all its flaws and relentless sprawl, "Babylon" sticks in the memory. There's one breathtaking shot in which the camera pans across a dozen silent films shooting side by side. In another scene, what looks like 100 extras (none digital, all real) protest their mistreatment on set.

In the film's most stunning set piece -- not the opening wild party of gyrating naked torsos that is nowhere near as outrageous as Chazelle thinks it is -- we watch Nellie working on her first talkie. With strict silence demanded, Nellie as a coed needs only to enter a dorm room, plop down her suitcase and say two words, "Hello, college!"

Chaos ensues. Nellie can't hit her marks. Her voice rises or falls with each take, especially when she moves away from the overhead microphone. The camera operator dangerously overheats in a soundproof booth. And the agony and ecstasy of filmmaking is distilled in a sequence that is for lack of a better term hilariously horrifying.

PHOTO: Lukas Haas plays George Munn, Brad Pitt plays Jack Conrad and Spike Jonze plays Otto Von Strassberger in Babylon from Paramount Pictures.
Scott Garfield/Paramount Pictures
Lukas Haas plays George Munn, Brad Pitt plays Jack Conrad and Spike Jonze plays Otto Von Strassberger in Babylon from Paramount Pictures.

Near the end of "Babylon," Manny steps into a movie theater in 1952 to see "Singin' in the Rain," a silent-to-talkie classic that makes light of the gods and monsters of filmmaking through musical comedy. And for a brief, shining moment Manny forgets the blood, sweat and tears it took to produce a few precious minutes of celluloid bliss.

Chazelle's ambition is indisputable. But the home run pitch he hungers for is swung at and missed. You can't spit in Hollywood's eye for 90% of your movie and then roll a collage of film clips from "The Jazz Singer" to "Avatar" that insists the end justifies the means.

Or maybe you can. Chazelle is a firm believer that you always hurt the thing you love. And he runs himself ragged trying to reconcile that contradiction.

Let me describe my reaction to "Babylon" with the title of another, better-focused Chazelle film -- "Whiplash."