CANNES, France — The Cannes Film Festival opened on Tuesday on the French Riviera, with movies by 21 directors contending for the top award, the Palme d’Or. Two of them look certain to miss their red-carpet premieres, and not out of choice: Russia’s Kirill S. Serebrennikov is under house arrest, and Iran’s Jafar Panahi is banned from making films or leaving his country.

Mr. Serebrennikov has been confined to a Moscow studio apartment since August. In a case that has raised concerns about artistic censorship in Russia, he is accused of embezzling $2.3 million in Russian government funds via a theater company he runs. Mr. Panahi was arrested by Iranian authorities in 2010 and banned from filmmaking after he tried to to shoot a documentary about the country’s disputed 2009 presidential elections.

That hasn’t stopped either director from getting their films shot and dispatched to France in time to be selected for the festival. The winner of the competition is announced on May 19.

Mr. Panahi’s “Three Faces” (which premieres on Saturday) is the fourth movie he has directed in defiance of the filmmaking ban. His previous title, “Taxi Tehran,” won the Golden Bear award at the Berlin Film Festival in 2015.