GRAEME Obree no longer owns a bath.

It was while soaking in the tub that the Scottish cyclist had his eureka moment to build the brilliantly bonkers contraption "the Beastie" used for his human-powered world land speed record attempt two years ago.

To avoid embarking on any similarly unorthodox schemes any time soon, Obree has taken drastic action. "I only have a shower now," he says. "It is far safer. There is less time for the ideas to dig holes."

But that is arguably to do Obree - and his former bath - a disservice. His captivating and often tumultuous journey is charted in a new film, Battle Mountain: Graeme Obree's Story, which will have its premiere at the Edinburgh International Film Festival on Wednesday. It follows the 49-year-old from Ayrshire as he prepared for his record bid in Nevada in 2013.

The first question the uninitiated might ask is: why would anyone want to climb inside what looks like a wobbly coffin on wheels and then propel themselves head first along a highway at speeds of almost 60mph? "What would possess a rational, sane person to do that?" ponders Obree, cracking up laughing. "Where shall I begin? I was born ..."

Obree first captured the public imagination when he broke the hour record in 1993 on "Old Faithful", a bike famously made from old machine washing parts. He went on to become a double world individual pursuit champion and claimed the hour record a second time in 1994.

Off the bike, Obree's against-the-odds success was blighted with debilitating self-doubt, alcohol binges, depression, suicide attempts and a heart-wrenching battle with his sexuality. His life story was given the Hollywood treatment in the 2006 film, The Flying Scotsman, starring Jonny Lee Miller, Billy Boyd and Laura Fraser.

When we meet Obree is in a slightly apprehensive mood. He eyes me warily, reminiscent of a nervous tortoise that could retreat into its shell at any moment. Obree will later tell me he still finds it difficult dealing with the glare of the spotlight and the looming premiere of Battle Mountain has stirred up old fears.

"I wish I had done a Banksy," he says, name-checking the pseudonymous British graffiti artist. "No-one knows his face. That would have been so much better."

Obree has only seen a rough cut of David Street's documentary so far. While pleased with the narrative, he admits to cringing at seeing himself on screen. "Did you ever watch a holiday video and think: 'Oh, no...'" he peers gingerly from between his fingers. "That's a natural reaction. I'm too close to judge it. Other people will be that mirror."

Battle Mountain is enthralling. Obree's trademark maverick genius and colourful lyricism ("If you are a tiger among animals, you might be a slightly ageing tiger, a slightly-less-trained-than-you-could-be tiger, but you are still a tiger," he says at one point) are juxtaposed against moments of childlike innocence and a searing determination.

We see him toiling away in his flat: sketching, poring over measurements, wielding a blow torch, sawing away at bits of metal and even crouching behind a dusty sideboard to gauge how much he can squash his shoulders inside the Beastie's Kevlar and fibreglass shell.

Obree takes me back to the months before he decided to embark on the project, keen to answer the question as to why someone would choose to endure the suffocating and unstable confines of the Beastie.

"I was doing a Gerry Rafferty in Saltcoats," he says, referring to the reclusive period of the late Scottish singer. "I went up to Sainsbury's one evening - the saver shelves because I had no f***ing money - and there was someone collecting for the Scouts at the till."

He embarks on a winding tale that veers off course a few times, but the upshot of it is that Obree had an epiphany that he could use his story to inspire people. That was 2010. It was time to face the world. "I realised I couldn't hide away any more," he says. "No more doing a Gerry Rafferty."

Having ruled out another crack at the hour record, Obree needed a fresh project. He had worked as an advisor to Jason Queally when the Olympic gold medallist had set a European record at the World Human Powered Speed Challenge at Battle Mountain in 2001.

"I was lying in the bath thinking about what I could do," recalls Obree. "I thought let's go back to the HPV [Human Powered Vehicle] idea. Build a bike with no rules and no UCI blazer types saying: 'those handle bars are at the wrong angle.'"

Asked why he had been living a hermit-like existence, Obree is sanguine. "Face," he says. "After The Flying Scotsman film, my face was recognised. I couldn't go out without people coming up to me. There was a lot of stuff going on.

"When you are in and out of mental institutions and make no royalties from the film, where is your money coming from? I was doing nothing. I was trying to avoid mental institutions and being seriously depressed."

His world land speed record attempt, announced in 2011, gave Obree renewed focus. Like Old Faithful before, the Beastie - christened in a text message by six-time Olympic champion Sir Chris Hoy - utilised innovative engineering including a set of rollerblades Obree unearthed in a Saltcoats charity shop.

Then there is the "magic saucepan" that "turned six eggs into firemen". Dashing out to watch a band one evening, Obree accidentally left a pan of eggs boiling away. He returned home to find the front door kicked in and six firefighters standing in his flat. The blackened saucepan was repurposed as a shoulder rest for the Beastie.

Comic imagery aside, his preparations for Battle Mountain saw Obree face far greater challenges than simply building an odd-looking bicycle at his kitchen table (those of a sensitive disposition should skip the next few paragraphs).

In the film, Obree lays bare the eye-watering and unexpected side effects of an anti-depressant drug he was taking which led to a medical condition called priapism: a persistent and painful erection.

Obree had to undergo vascular surgery and was left with 24 staples in his leg. The wound became infected, leading to a pus-filled abscess which saw him readmitted to hospital. Unable to train for several weeks, Obree refused to give up. I tell him that must have taken tremendous character. He looks caught off guard by this praise, pausing to collect his thoughts.

"You have to carry on regardless," he says. "I have always wanted to be part of a team and it never happened in cycling because I was never welcome. I have never been part of anything. I was an individual cyclist my entire career. This was my chance to be part of a team.

"When I was up to my elbows in dust at 2am, on my own in my kitchen, I would remember Charlie [his manager] had committed time and effort, David was following me around with a camera. It was almost like being part of a team that was going to the North Pole so I couldn't very well go: 'Sorry guys, I'm out of here.' Besides what image would that give young folk? When it gets too heavy, just give up?"

Obree has said he would rather be known as a mass murderer than a quitter. His eyes widen in alarm. "Did I say that?" he says. He gives a low whistle. "Oh, that's heavy." It is a remark he attributes to the pressure he put on himself to set a new world record. There is no doubting Obree is a man with tenacity. Yet, he is also a man who has had to overcome more than most, not least the "black weight" of depression that led to two suicide attempts in 1998 and 2001.

Obree believed that by ending his life he was "doing the world a favour". He took 116 aspirins and cut a seatbelt from his car intending to hang himself. Thankfully he was found before it was too late.

Throughout his life, Obree has never shaken the feeling of being an outsider. By his own admission, it stems back to his childhood in Ayrshire where Obree and his older brother Gordon were bullied because their father was a policeman.

Bikes became an "escape mechanism" and the pair would spend hours cycling together. Gordon's death in a car crash in 1994 understandably had a profound effect.

Obree has been amiable up until this point, but when the topic of his depression is raised the shutters come down. Is he in a good place in his life? "Obviously I'm going to say I am," he says. "Right, next ..."

The film does cover this ground, I counter gently. The past, after all, is what has made him who he is today. Obree visibly relaxes again. "That is very true," he says. "But I have changed my philosophy. I have dropped all templates. I don't abide by moral codes or principles - principles are the worst.

"I have spent my life, from the youngest age you can remember, chiselling away at a rock in front of me. Things like: 'a man has got to work hard' and 'it's nice to be nice.' I thought: 'Let's whittle out the bollocks.'"

The crux of this is a mantra which endeavours to "protect the balance of well-being and cause no unnecessary harm". It is a phrase Obree uses no fewer than 19 times during our conversation (he's also penning a new book on this theme).

The lion's share of the time, he says, the driving forces have been negative. "The hour record was driven by the need for me to feel worthwhile and the need for perceived status," he says. Does Obree still feel like he is chipping away at that rock? "No, there is nothing left of it."

One of the biggest milestones was being able to be honest about his sexuality. Obree, who has two sons, told his family he was gay in 2005. Although he and his former wife Anne are divorced, they remain close. "We never actually fell out, it was just unfortunate," he says.

Is he in a relationship? "No," says Obree. "I'm not in a position to be in a relationship." Why not? He points to his face. "Just being in the public eye. I can't even access a relationship, you could imagine: 'Guess who's on a dating website?' No, I don't think so."

A sentence hovers on his lips. "I'm being slightly defensive today, I apologise. Once it is out there ..." Obree trails off. Later, as I leave, he will reiterate that sentiment. "When you share anything personal, people feel that is a thread they can pull," he says.

There are many strands of incredible bravery to his story that are often forgotten. Breaking the hour record in 1993 saw Obree smash "straight through the glass ceiling of amateur-professional cycling."

Obree went from racing his bike to scrape what prize money he could to buy baby milk to having the world at his feet. "This was bigger than Olympic golds, this was like a sky rocket that fires you straight into the middle of it all," he says. "No one had heard of me before then."

He quickly realised it wasn't the utopia he had hoped. It was a time when drug-taking and doping was rife in cycling. "As glibly as asking 'How was your flight?' people would say: 'What did you use for the hour record?' I would reply: 'Nothing' and their response was: 'Amateur.'"

Obree put his head above the parapet in this "grubby era" of the sport at great cost to himself. In 1995, when the doping culture was at its height, he lost a particularly lucrative deal.

"My contract was £40,000 plus bonuses and appearance money. I was told they would be taking a couple of grand out for steroids, growth hormone, blood doping and stimulants like cocaine," he says. "I said: 'Nah, I'll give it a miss'. Well, it was a bit more emphatic than that. So that was it, goodbye, you're off the team.

"I thought I could carry on regardless." Obree gives a small, sad shake of the head. "I was in a serious depression for a couple of months. My brother had died, I had lost the hour record and couldn't ride my bike. It felt like everything had been taken away from me."

Obree was once told by a psychologist he has an emotional age of 12 or 13. "At best," he clarifies. "Eleven or 12 was more the quote." How does he feel that has affected him? "Well, not really understanding the dynamics of social situations to the depth I should," he says.

He turns 50 this year. Does being able to talk openly about things Obree kept deeply buried for many years mean he finally feels at ease in his own skin?

"Being comfortable depends on other people around you," he says. "If I'm protecting the balance of wellbeing and causing no unnecessary harm, then I'm comfortable."

These days Obree steadfastly avoids alcohol. His stance is "just don't touch it". It is a topic he feels strongly about, referring to people who do drink as "eth-heads".

Obree recounts one such encounter. "I was on a plane two hours from Malaga and this guy goes: 'That's the Flying Scotsman.' It's the middle of the day and the guy is standing with a can of lager in his hand. He says: 'I've read his book. I'm convinced that guy is an alcoholic.'" Obree mimics an inebriated snarl. "He's pointing for the whole plane saying: 'This guy here.' I thought: 'For goodness sake, beam me up.' The joys of fame, don't you just love it?"

Obree is unsure how the new film will be received. "The thing I dread about it is the amount of attention because I don't actually like attention," he says. "I find it very dehumanising and objectifying. I feel almost like a Cruft's poodle. I have always been quite quiet. I would hide in the forests when I was a kid.

"I'm not going to stress myself because I'm on journey. I like to think of it as a magical mystery tour. This film could go huge like the Blair Witch Project or it could fizzle out and be niche. I just don't know what could come of it."

While we already know he sets a new world prone record of 56.62mph, Obree jokingly goes to great pains not to give away too many spoilers. "I know that the main character survives," he says. Which, ultimately, isn't a bad way to sum up the inimitable Graeme Obree.

Battle Mountain: Graeme Obree's Story is part of the Edinburgh International Film Festival 2015 and will be shown on Wednesday and Thursday. Visit edfilmfest.org.uk