There have been few rock stars in the annals of pop history who were as colorful as Freddie Mercury. As the lead singer of Queen, he used his four-octave vocal range to weave opera and rock together in ways that had never been heard before or since.

His theatrical stage presence also drew a huge fan base, with Queen setting multiple records for the largest concert audiences of all time and delivering what’s considered the greatest rock performance ever at the Live Aid fundraising concert in 1985. Yet, despite his larger-than-life presence as a performer, Mercury was a troubled and highly private man who kept the fact he was dying from AIDS a secret until two days before his death in 1991, and that paradox is explored richly in the fantastic new biopic “Bohemian Rhapsody.”

The film centers on a stunning lead performance by Rami Malek (who has an Emmy for his starring role in the USA network’s TV series “Mr. Robot”), who perfectly captures Mercury’s rock-star swagger as well as the guilt and loneliness he often felt amid his secret life of bisexual debauchery. Executive produced by surviving Queen members Brian May and Roger Taylor, it also offers a fun and revealing inside look at how some of the band’s most distinctive songs were written and developed using all manner of overdubs, sound effects and studio tricks.

The film opens with a fresh and funny guitar-driven twist on the classic 20th Century Fox opening-credits fanfare, before showing Mercury as he woke up severely ill on the day of Live Aid yet pulled himself together enough to take the stage like a conqueror. Jumping back to 1970, we see Mercury in his pre-stardom days under his birth name of Farrokh Bulsara, working as a luggage handler at London’s Heathrow Airport between scribbling song lyrics and attending club shows of a band called Smile that featured May (Gwilym Lee) and Taylor (Ben Hardy).

At home, the early-20s Farrokh has to contend with parents who don’t understand or approve of his desire for fame, but when Smile’s lead singer abruptly quits, he tells May and Taylor that they’ll need him to be the replacement. Taylor at first is dismissive because of Farrokh’s massive overbite, but the fact he was born with four extra incisors proved to be the key to his amazing vocal talents, as the extra room in his mouth allowed for greater lung capacity when he sang.

Hired to sing at the same time he’s embarking on an intense relationship with a woman named Mary Austin (Lucy Boynton), Farrokh changes his name to Freddie Mercury and the band is on its way to making history. But even as he asks Mary to be his wife, Freddie uses his extensive tours as a way to sneak liaisons with a nonstop parade of men. (The film implies the sexual activity, keeping things at a PG-13 level.)

The resulting complications and the dual life Mercury lived divided between partying excessively and maintaining genuine feelings for Mary, as well as a deep inner loneliness, makes for a fascinating tale. Director Bryan Singer of “X-Men” fame was a surprising choice as the director for “Rhapsody,” but he handles all of it with immense panache — or at least 85 percent of it.

Singer was abruptly fired for personal issues and replaced by director Dexter Fletcher with two weeks left to go in filming, though the film appears seamless and likely provided Fletcher with some valuable experience en route to his current gig directing the Elton John biography “Rocketman.” Yet Singer was in charge for the film’s climactic moments, a practically shot for shot recreation of Queen’s triumphant 20-minute Live Aid performance.

While the choice to place such a long music sequence at the film’s climax is a stylistically daring one, the sheer magnetism of Malek and the wow factor of the band’s music makes it work. The supporting performances are fine across the board, but this is as much a showcase for Malek as the real-life Queen was for Mercury’s unique presence. 

If you love great rock music presented with dynamic flair, this is one movie that will make you want to wax rhapsodically. Well worth the money for anyone who loves great rock and roll, it’s like having a concert and a movie rolled into one.

“Bohemian Rhapsody” Grade: A