Mackenzie Crook is best known for his roles in The Office, Pirates of the Caribbean and Game of Thrones. He has now written and directed a BBC Four sitcom about metal detector enthusiasts, which was screened in Edinburgh on Monday.
When Mackenzie Crook was filming Almost Human in Vancouver last year, he found he had too much time on his hands.
Required only one day in seven, life was a becoming unbearably boring for a bright man cooped up all alone in a trailer.
It is the sort of situation that can see depression inveigle its way into an artistic soul like rising damp.
To stave off the blues, he started to write up an idea for a sitcom that had been swirling around his head for the past couple of years, triggered by an episode he had seen of Channel 4's Time Team programme.
He set about writing his comic story about a couple of middle-aged men with a passion for metal detecting.
He found that writing the scripts was a quicker and easier process than writing his two children's novels, The Windvale Sprites (2011) and The Lost Journals of Benjamin Tooth (2014).
He hooked-up with TV comedy producer Adam Tandy, who worked on The Thick of It and Inside No 9, and started to send him drafts. Tandy liked his style.
The more Crook wrote, the more he wanted control over the piece: an authorship that went beyond being its writer and lead actor and into the realm of auteur.
Although he had never directed before, he backed his lifelong interest in art and drawing to have imbued him with a visual sensibility that, when supported by an experienced lighting cameraman (Jamie Cairney), would see him through.
He made a ten-minute taster-tape and showed it to the BBC, who promptly commissioned six episodes. He says he found directing made him "very nervous", until he "relaxed into it". But having had the experience, he now has the bug.
"I'd like to have a go at directing when I'm not in front of the camera… that's the way I want my career to go," he says.
All of this has happened in the last few months. Last night, in the BBC's Edinburgh Festival Potterrow tent, a nervous Crook sat back for the first time and watched episode one of his creation in front of members of the public.
"There were bits that I had forgotten were funny that people laughed at, and bits I thought were hilarious that nobody laughed at," he said in the Q&A afterwards.
For a man who tracks his success back to the moment Bob Mortimer spotted his stand-up routine at the Edinburgh Festival well over a decade ago, he appears ill at ease in front of an audience.
His innate charm and humour warm the room, but it is clear that the one character he loathes to play in public is Mackenzie Crook. (When he asked Tandy for notes on his acting performance in the sitcom, the actor/writer/director was repeatedly told: "Don't forget to smile.")
In The Detectorists, he is one of two amateur metal detector-wielding men who hope to happen upon an Anglo-Saxon treasure trove in the rolling hills of the West Country.
They make for a comedic odd-couple: Crook tall and skinny with academic pretensions, and Toby Jones: short and dumpy and as down-to-earth as the ploughed fields they scan.
It is an unusual sitcom for the Twitter age. Its slow pace and bucolic nature make it feel more of a companion piece to classic 20th Century comedies like Last of the Summer Wine and Dad's Army, rather than the British answer to the snappy, smart-arse worlds portrayed in contemporary American funnies such as in 30 Rock or Curb Your Enthusiasm.
Crook describes the look and feel of the piece as a "love letter to the British countryside".
There is nothing cynical or spiteful about the show's humour. Crook is not sending-up metal detectorists.
In fact, he has become one himself - and quite the enthusiast. When asked about his most exciting find (a musket ball), he spoke with the sort of wide-eyed passion that is typical of the slightly obsessed male hobbyist. Or, put another way, exactly the type of person he was aiming to portray in The Detectorists.
There is a more than a hint of Gareth from The Office in the air: the west-country accents, the amateur enthusiasts, and the over-simplified simplifications. That is, of course, the role that made Mackenzie Crook a star. And one, he says, he only narrowly got.
"It came down to two of us, me and Tim Plester, who has since become a friend," he explains. "One of them [Ricky Gervais and Stephen Merchant the show's creators] preferred him, the other preferred me, and for whatever reason I got the gig."
Now, the making of his latest project echoes the actor/writer/director approach taken by Gervais in The Office.
There is also a hint of Ricky Gervais in Crook's creative approach of building a project around an ensemble of like-minded mates.
These are comparisons at which Mackenzie Crook will probably grimace. But not for long, if the whole thing comes full circle and it is his show picking up the Baftas and Emmys over the next year or two.
The Detectorists will be on BBC Four in October.