The judges said, "All the cinema halls in India shall play the national anthem before the feature film starts and all present in the hall are obliged to stand up to show respect to the national anthem ."
Twelve people were arrested on Monday at an international film festival in the southern state of Kerala for failing to observe the order, police said.
They said the film-goers, who have not been identified, had refused to stand after being asked to do so by organisers and police.
Sparjan Kumar, police chief of Kerala state capital Thiruvananthapuram said, "They were formally arrested and later released on bail."
According to police, six of the 12 had been attacked after refusing to stand, but that no charges would be brought against the attackers.
Kumar said the 12 cinemagoers arrested in his state had been charged with various related offences, including contempt of court.
There were however a number of reports of cinemagoers being attacked for failing to stand, even before the court gave its ruling.
In October, a wheelchair-user was assaulted in a Mumbai cinema by fellow members of the audience who apparently failed to realise he was disabled.