A top Marlow student made a five minute video for his family before standing in front of a train, an inquest has heard.

"Exceedingly intelligent" Joel Langford, aged just 17 years and who scored top grades in his GCSE exams, was worried about what the future held for him after leaving Great Marlow School.

Despite his schoolboy cleverness, Joel's mother told a coroner that he was a "challenging child."

He was obsessed with personal hygiene and felt lonely after classmates moved to different countries or new schools. She told the coroner he was unhappy after being turned down for a job with Costa Coffee and worried about the future.

An inquest in Beaconsfield on Wednesday heard that on the morning of his death, Joel recorded a video on his mobile phone.

Coroner Crispin Butler told the hearing: "Joel has explained that it was what he wanted to do and all the evidence corroborates that."

The inquest was told that the schoolboy was characterised by his extreme intelligence, achieving the top grades for his GCSEs particularly in science and maths, despite being diagnosed with severe dyslexia from a young age.

The court heard how the pupil started to feel the pressure after making the jump from GCSEs to A-levels.

His mother, Susan Langford, aptly described her high-functioning autistic son's condition as "worsening" after he started A-levels where she said it dawned on him that he had an “uncertain future".

In her evidence to the inquest, she said: "He had become obsessed about hygiene, unable to wear certain clothes if he felt they would get dirty. Ironically, on the day of his death we thought that problem was over as he wore a jumper he had refused to wear before."

Dr Anoushka Bheekha, a senior mental health practitioner in Oxford, said: "Joel explained his issue with contamination to us. He said it made him feel unpleasant, dry and clammy.

"He avoided sitting on the sofa and refrained from touching anyone after he had had his shower and his mother had found him sleeping on the floor of his bedroom because he said his bed did not feel clean."

Although the school provided a safe zone for Joel, it was said that his only friends had either moved schools or to a different country, leaving him feeling lonely as other people in school called him "weird, loser and r*****".

Mr Butler heard that on March 18 at 7.20am, the youngster from Woodland Way, Marlow, recorded a five-minute video on his mobile phone.

In hindsight, his mother said he appeared "happy" before leaving his home for the last time.

At around 8.25am that day, just as the school gates were opening, Joel rang the daughter of Dr Andrew Graves, a person who shared his love of art, saying that he did not want to continue living and he wanted her to live a happy life, the inquest heard.

The only witness to his death was train driver Richard Woodley, who had only qualified six months previously.

He had been working the early morning shift on the single track journey from Marlow to Bourne End when he spotted Joel.

He told the inquest: "At around 9.10am we were travelling at 40mph. As the crossing came into sight I saw a male run out from the left hand side from the trees. I did not see anyone else with him.

"I thought he was just running across the crossing as many people do, but I put on the emergency brake which cannot be undone until the train has completely stopped.

"I looked away as the train ran over the male. This was clearly an intentional act."

Mr Butler, recording a conclusion of suicide, said: "The medical cause of death was a single trauma injury by train collision.

"Joel has explained that it was what he wanted to do and all the evidence corroborates that.

"He died instantly and there was never any lifesaving opportunity. There is a significant amount of evidence that confirms Joel's intentions."

For confidential support in the UK, call the Samaritans on 116123, email jo@samaritans.org or visit a local Samaritans branch.

See samaritans.org for more details or go to papyrus-uk.org if you need support or advice.