A motorcyclist has been charged with reckless and dangerous driving after his high-speed stunts were posted on the YouTube website.
Officers were stunned after seeing clips of the 34-year-old Edinburgh man driving at speeds averaging 112 mph.
The man is also seen doing wheelies and driving at 170mph in East Lothian at the end of last year.
Police traced the man after detailed study of the clips. A report is being submitted to the procurator fiscal.
Riding a Yamaha R1, he is said to have covered the distance between Longniddry and North Berwick in just seven minutes, at speeds averaging 112 mph in certain sections.
He is also said to have been seen accelerating from rest to high speeds in first gear, performing wheelies and flooring a Honda Fireblade motorbike to its maximum speed of 170 mph along St Germains, the dual carriage running between Prestonpans and Longniddry, on a wet day.
After detailed examination of the YouTube footage, Lothian and Borders Police officers and staff from the force's forensic computer unit were able to trace the man.
Ch Insp Kenny Buchanan of Lothian and Borders Police road policing branch said: "Driving at break-neck speeds along public roads is completely unacceptable and extremely dangerous.
He said: "Allowing footage of it to be posted on a public website is a sure-fire way of getting caught.
"Thanks to the clips on the website, we were able to clearly identify the rider of the bike, and stop him in his tracks.
"We urge this to be a lesson to other drivers who foolishly believe that stunts like these are good entertainment.
"They are not, they are dangerous and could result in very serious consequences, certainly for yourself, if not some other innocent member of the public."
It is thought that this is one of the highest speeds ever recorded by Lothian and Borders Police.
Police are investigating another complaint about a car being driven at more than 100mph in East Lothian, footage of which was also posted on the YouTube website.