BBC Film executives reckoned it was as plain as the mole on Agnes Brown's face.

There simply had to be a Mrs Brown movie. The television adventures of the potty-mouthed Dublin mammy attracted 11 million viewers, it's repeated more times than Mrs Brown says "feck" in an episode, and the show is now a worldwide brand with cartoon spin-offs, tea towels, greetings cards and books.

But will D'Movie be a D'Isaster? Hit sitcoms transfer as easily to film as Agnes Brown moves from baggy cardigan to shimmering ball gown. A few have made it. The Likely Lads, On The Buses and Porridge managed to pull decent audiences at the cinema. And, more recently, The Inbetweeners actually improved on its television success.

But dozens more have failed. Steptoe And Son, Rising Damp and Till Death Us Do Part never hit the mark set by their sitcom counterparts. Bless This House, Bilko and Bewitched made a case for the argument that more is usually less. More recently, Keith Lemon - The Film proved to be, well, a lemon. So why do sitcoms find it so hard to move on to celluloid?

"The problem is context," says Rab C Nesbitt writer Ian Pattison, who helped steer Mrs Brown writer Brendan O'Carroll through the first troubled waters of his sitcom creation. "Viewers don't like to see their heroes being relocated. They like to see them in their familiar living room or pub, but when the sitcoms move to film, there is an hour more to fill. What writers tend to do is take the action abroad. But before you know it, the cosy characters who lived routine domestic lives are suddenly caught up in a diamond heist. And where a sitcom was once set in a living room, suddenly the viewers are watching Lawrence Of Arabia."

It was all very well for The Inbetweeners to take off to Ayia Napa (a natural journey for teenage boys) but taking Steptoe And Son out of the junkyard and off to Spain took the viewer out of their comfort zone. Alan Partridge: Alpha Papa worked to a degree, but then the original show didn't follow a traditional sitcom format, instead utilising lots of exterior shots. And Partridge's world was very much inside his own head.

The same could be said for The Likely Lads. The hit sitcom wasn't defined by its location geography. What worked was the philosophising about the meaning of life by the protagonists, and the film continued in this vein. Dad's Army, on the other hand, also performed well at the box office, but changes to shooting locations and recasting of supporting roles didn't help, nor did the addition of German characters across the Channel. The writers looked to have lost the plot.

So will D'Movie travel as well as On The Buses, which was the UK's top performing film of 1971? Agnes Brown will have her work cut out because D'Plot reveals she is to breathe fresh air for the first time. Mrs Brown, we learn, goes out to work every day as a street trader in the fruit and veg stalls of Dublin's Moore Street. It's here she takes on the forces of darkness in the form of big-business developers who are trying to take over her patch. Along the way, this Che Guevara in a dress meets up with blind trainee ninjas, an alcoholic solicitor and a barrister with Tourette's Syndrome.

Christine Langan, who runs BBC Films, believes O'Carroll's effort will win over both sitcom and popcorn audiences. "Brendan has a very good instinctive understanding of how to make the leap from the small screen to the big screen, and that's absolutely imperative if you're going to go on this future film adventure," she says.

The film boss adds that worldwide distributors are "very confident" in the film. And there is hope O'Carroll's effort, distributed by Universal Pictures, could see the Irishman making his breakthrough in the US. "It's very feel-good," Langan insists. "With British comedy, you look to make it work in your own territory and then make greater assessments of how they might travel."

What most fans of Mrs Brown won't know is she has been carrying a film ace up her beige cardie sleeve since 1999 - when the first Agnes Browne (she had an 'e' then) movie was released.

Directed by and starring Hollywood actress Anjelica Huston (astonishingly) as the Dublin mammy, the film was made after producer Greg Smith spotted O'Carroll's novel The Mammy in an airport book shop, read it and loved it.

But the process of bringing book to film was more fraught than Agnes discovering the electricity's been cut off and son Dermot is on the rob again. O'Carroll himself struggled to see how Morticia from The Addams Family could ever be passed off as a North Dublin housewife. He had hoped to line up Rosie O'Donnell to play the lead, with Huston directing. But once O'Donnell passed, Huston herself stepped into Agnes's slip-ons.

There were also major problems in coming up with the screenplay. Initially, writer John Goldsmith was brought in to create the first draft. "I had no problem with him being English," said O'Carroll. "You don't have to go to space to write Star Trek."

But that didn't work out and he did have problems with Irish writer/director Jim Sheridan, the man behind Oscar-winning My Left Foot, when he and O'Carroll attempted to write together. The Dubliners couldn't agree on the tone of the film, they couldn't agree on the ending. In fact, practically the only thing they could agree on during the 13th-draft writing process was it would be set in Dublin in the 1960s.

Yet, O'Carroll has learned from his mistakes. He now believes he should have complete say in the writing of the film. And, in replicating the world inside his head, he needs casting approval. Although in 1999 he had never played Agnes except on a Dublin radio station, since then he's come to realise she works best as a man dressed as a woman.

Stanley Baxter, one of the country's best-ever crossdressers, agrees. "Brendan O'Carroll makes a brilliant woman," he says. "When I first watched the series, I didn't know he was a man; he is that good. But when you watch closely you'll see he has incorporated so many female traits. As for the film, I think it will work. O'Carroll is too clever not to make it work."

Comedy writer Ben Elton is also a Mrs Brown fan. "My favourite comedy of all is Dad's Army, and it's like Mrs Brown in that what you're looking at is a show where the basic joke is on humanity. It's not done in a cruel manner, it's trying to say we're all silly and desperate and not as confident as we seem." Elton believes D'Movie will see fans flock to the multiplexes. "Mrs Brown is so adored because it's just glorious silliness," he says.

O'Carroll has certainly incorporated enough silliness into the movie, but he's also well aware of the problems of context. Since the first Agnes Browne movie was based on a book, and set in a range of locations, he knew the film had to reflect this. But he also knows the world of Agnes is essentially the kitchen/sitting room world. And he has to return there as often as possible, as Till Death Us Do Part did, with Alf Garnett delivering monologues from the smallest room in the house.

What O'Carroll has also learned from the first film adventure is Agnes Brown's world shouldn't be too dramatic, too Angela's Ashes. He's learned the sitcom works because it's based not on his novels but on his stage plays, which revolve around unabashed sentimentality. "I love a happy ending," he admits. And he's learned many sitcom-to-film experiences don't work because movie versions are made by producers who weren't involved in the original show. That's why he's trusting sitcom producer Stephen McCrum and director Ben Kellett to carry TV success on to the big screen.

But there's another important reason why Mrs Brown's Boys D'Movie will work. O'Carroll has waited for 15 years to get another chance to take Agnes to the movies. He won't waste it. Of course, the critics are expected to trash the film before the trailers are up, as they have done the television series. But that doesn't matter to the creator. "I don't give a feck," he says.

What matters is O'Carroll is so confident he's already talking about a follow-up film. D'DVD bargain bin? Not for a long time yet.

Mrs Brown's Boys D'Movie is in cinemas on Friday. Brian Beacom is the author of The Real Mrs Brown (Hodder, £6.99)