Plot: There's a hidden melody on Earth, and if a specific musical instrument plays this melody, the Earth will be rid of evil aliens.
The visuals are like Mad Max or The 13th Warrior. I saw the movie in the '90s.
Science Fiction & Fantasy Stack Exchange is a question and answer site for science fiction and fantasy enthusiasts. It only takes a minute to sign up.Sign up to join this community
This is Masters of the Universe (1987).
Masters of the Universe (stylized as Masters of the Universe: The Motion Picture) is a 1987 American superhero film directed by Gary Goddard, produced by Yoram Globus and by Menahem Golan and written by David Odell. The film stars Dolph Lundgren, Frank Langella, Jon Cypher, Chelsea Field, Billy Barty, Courteney Cox, Robert Duncan McNeill, and Meg Foster. It is based on the Mattel toy line of the same name and tells the story of two teenagers who meet He-Man, the most powerful man in the universe, and his friends, who arrive on Earth by chance from their home planet Eternia and go on a mission to save the universe from He-Man’s archenemy, the evil Skeletor.
In this live-action adaptation of the cartoon, Skeletor's forces acquire a device called the Cosmic Key, which can open a portal to any location if the correct series of musical notes is entered into it.
They use it to launch to launch a surprise attack on Castle Grayskull and take it over, forcing He-Man, Man-at-Arms, Teela and Gwildor, the inventor of the Cosmic Key, to flee Eternia by opening a portal of their own with a prototype version of the Key.
The heroes arrive on Earth and end up being stranded there for a while, since they lose track of the prototype Key, and also can't remember the correct melody to enter into it to open a portal back to Eternia. To make things worse, they're followed to Earth by Skeletor's forces, who want the prototype Key.
Fortunately, the prototype Key is found by a pair of human teenagers, who return it to the heroes. Also, one of the teenagers, who conveniently happens to be a musician, is able to remember to the melody required to open a portal to Eternia, despite having heard it only once or twice.
With the teenagers' help, the heroes manage to return to Castle Grayskull and recapture it from Skeletor, saving the Earth from his soldiers in the process.