EDINBURGH  Like his fellow Scot Susan Boyle, who made a meteoric entry into show business, the stunt bicyclist Danny MacAskill can divide his life in two: before his YouTube video and after.

Eight months ago, MacAskill’s daily routine was fairly predictable. He would leave the apartment he shares with a roommate, hop on his bike and maneuver through strangling traffic to his job as a bicycle mechanic.

Along his route, he passed a metal fence with a spiky top. He had eyed it for years.

“I’d look at it and say, ‘I can ride that rail,’ ”said MacAskill, 24.

He eventually got up the nerve, and the subsequent 30-second trick  which took four days to shoot  became the jaw-dropping highlight of a 5-minute-37-second video posted on YouTube in April.