A spokesman for the force said: “Lothian and Borders Police are committed to ensuring all of our officers and staff perform their duties to the highest standard.

“We are aware of the online video clip, and an internal investigation is already underway to determine the circumstances surrounding the incident.”

The 69-second clip is described in a synopsis as “was walking home in the early hours of the mornig and found two sleeping police on duty. Lothianburn junction of the edinburgh bypass”.

During a commentary the cameraman said: “Okay, this is, eh, about five o’clock in the morning. I’m up next to the by-pass.

“There’s two police men sleeping in their car pu***ing out on duty.

“F****** caught by (unclear) sleeping. Snoozing away, snoozing away.”

At this point the cameraman goes in for a close-up shot of the officers and – although the footage is poor quality – they can both be seen not reacting to the man.

He goes on: “See if I can get a close up. It’s a bit dark.

“Absolutely snoozing. Check the f****** dribble, it is nearly dribbling down his back, check it out, check it out.

“Phone 999 to see if they’re in, hello 999.”

Lastly the man takes footage of the patrol car’s number plate.

He signs of with: “Two coppers sleeping.”

The clip was added on January 14 and yesterday it already had 641 views.

Last night a victim’s charity said they were glad Lothian and Borders Police were looking into the matter but added that they would have to wait on the outcome of any investigations before commenting further.

A spokesman for Victim Support Scotland said: “We note that Lothian and Borders Police are looking into the matter.

“However we would stress the high standard of policing provided by Lothian and Borders Police and other police forces in Scotland in relation to assisting victims of crime.”

Matthew Elliott, Chief Executive of the TaxPayers’ Alliance said: “Of course, this needs to be properly investigated to determine if they were asleep on the job but this video doesn’t look good.

“Night-shifts may be a quieter time but that doesn’t mean that the police can take their eye off the ball.

“Taxpayers want to see officers alert and ready to tackle crime in their communities at all hours.”

See more of our pictures at our Flickr site and videos at our dedicated channel, Deadline TV.