Ed Sheeran is mocked for his rapping, and suggests the lyrics of the Beatles’ classic Hey Jude are changed to Hey Dude in the first trailer for his new film.

The singer plays himself in Yesterday, which was directed by Danny Boyle and penned by Love Actually writer Richard Curtis.

The film follows struggling musician Jack, played by Himesh Patel, who discovers he is the only person who can remember the Beatles.

After he is given a guitar by a friend, played by Lily James, he strums a few lines of Yesterday to the surprise of other people, who ask when he wrote it.

When he mentions Paul McCartney and the Beatles, they look blank.

He becomes a superstar when videos of him singing some of the band’s biggest hits go viral and fans believe he is the writer behind them, leading to an appearance on James Corden’s US chat show.

He crosses paths with Sheeran on a plane, when a member of his entourage tells the chart-topping star they are big fans of his work, especially the rapping.

When Sheeran asks: “Really?” he gets the reply: ‘Nah man, leave it to the brothers, that’s my advice’.”

He also pokes fun at himself when he accompanies Patel’s character to the studio to record Hey Jude, and suggests the lyrics are changed to Hey Dude.

Yesterday is due for release in UK cinemas later this year