Long Walk to Freedom, 146 minutes long and 16 years in the making, is based on Mandela’s autobiography and it tells his astonishing and wonderful story all the way from his traditional upbringing in rural Transkei in the Twenties, through his arrival in Johannesburg in the Forties as a young lawyer, to his growing commitment to the ANC and his decision to support a violent sabotage campaign. This led to his arrest and conviction in 1962, followed by more than 27 years in prison, mostly on Robben Island, before he was finally released in 1990 and then triumphantly elected South Africa’s first black president in 1994. It’s going to be epic, then, however selective the approach.

The obvious danger in making such a movie is being hamstrung by reverence, not to say awe, and so producing a worthy but dull hagiography. The South African producer, Anant Singh, the British director, Justin Chadwick (The First Grader, The Other Boleyn Girl), and scriptwriter William Nicholson (Shadowlands, Gladiator, Les Miserables) have obviously been well aware of this problem and, to their credit, have attempted to show Mandela as a human being with some flaws — for example, acknowledging that he was unfaithful and even violent towards his first wife, Evelyn, and was an absent father before becoming the heroic figure we know.

They’ve also tried to give the story dramatic structure and forward motion, rather than just being a noble pageant, by focusing on Mandela’s troubled relationship with his second wife, Winnie (British actress Naomie Harris, too nice), to whom he had been married for only four years when he was arrested and whose violence, infidelity and corruption made their marriage short-lived after his release. They separated in 1992 and divorced in 1996. Here, her extremism and his forgiveness are contrasted and Mandela says plangently: “What they have done to my wife is their only victory over me.”

So the story is personalised and oddly depoliticised. You would never know from this film that Mandela, as well as leading the ANC, was a member of the South African Communist Party, with all that implies.

Stylistically, the film as well as following the template of prior epics such as Gandhi tries for a more modern, raw look, akin to that of A Prophet and City of God, especially in the scenes of public disorder and prison life. But it remains not so much a drama as a kind of protracted educational video, the message driven home by a soupily emotional score and repeated flashbacks, sometimes in slo-mo, to Mandela’s golden memories of the past, bathed in sunlight.

The script doesn’t shun the obvious either. When Mandela is first approached by ANC activists — “Do you know anything about the African National Congress?” — they at once realise his value: “We need him!” Every scene is a telling stage in the journey. When Mandela’s little grandsons visit him when he is under mere house arrest and thumb their noses at the white policemen, he tells them off for doing it simply because of the colour of their skin: “That is what they do to us — we must do better. Understand?”

The producer, Anant Singh, told the scriptwriter, Nicholson, “We need this to be an international movie, this is for the world, not just South Africa” — which perhaps accounts for some of its didactic obviousness.

The casting of the British actor Idris Elba, however, to play Mandela from the age of 23 to 76, remains problematic. It was said at the time that few South African actors had the physical stature to play Mandela (he was 6ft tall, Elba is 6ft 4in). Elba produces a good imitation of Mandela’s distinctive accent and his stiff-legged gait in old age but facially, and bodily, does not resemble him initially at all (Elba’s parents hail from Sierra Leone and Ghana). He actually looks more like him later on, when the prosthetics kick in.

What Elba does have is an imposing, unignorable physical presence which does make Mandela always a star — but it’s very obvious that his massive, gym-built torso, with those strange sloping shoulders you end up with, is that of an actor best-suited to being a Hollywood superhero, not a real-life politician. Mandela had a bubbling humour — Elba’s efforts at laughter would better have been edited out. Nor does he convince when trying to look thoughtful, although he can give a rousing speech.

But there — Mandela’s story deserves telling, even if it does involve ticking so many boxes (Mandela saying “If I can forgive them, then you can forgive them”) and feels so long and lacking in pace (particularly, inevitably, in covering the prison years) as it heads towards its known conclusion.

Elba never met Mandela. Last year, when Singh showed Mandela some footage of Elba playing him on an iPad, the great man reportedly asked: “Is that me?” It would be good to know with what intonation, for it’s a sentence that could have the stress on any word. Then, apparently, he laughed. Better than weeping, anyway.