Mark Smith

The BBC's big Christmas musical film That Day We Sang is written and directed by Victoria Wood, so it is funny, camp and full of silly words (swarfega! pucker! seepage!) but because it's written and directed by Victoria Wood, it is also nostalgic, melancholic and occasionally awkward. Wood's heroes and heroines are never good-looking, toned and confident; they are shy, inverted, repressed but hopeful. "I'm interested in the people who are slightly outside the mainstream," she says. "People on the outside looking in."

The lead characters in the film, Tubby and Enid, certainly fit that mould. Tubby, played by Michael Ball (who sits on his jazz hands to deliver a touching performance) is an overweight, over-wrought insurance salesman whose close relationship with his mother has always ruled out any other relationship with a woman ("Was I looking after my mother, or hiding behind her?" he wonders).

The other main character, a secretary called Enid, played by Imelda Staunton, has similar problems. Her self-confidence is low, and kept low by her boss, with whom she's having an unfulfilling affair. She would never inspire a Byron, she says to herself in one of her musical numbers. "Enids are not kissed under skies that are starry, we don't go on safari," she sings. "No Leo whisks you off to Rio, just Carry on Cleo."

All of this is familiar source material for Wood - indeed, Enid's big number feels like a sequel to Wood's other great song about repressed sexuality and domesticity Let's Do It ("She licked her lips/she felt sublime/she switched off Gardeners' Question Time.") But the writer and comedian's direct inspiration is much less familiar, obscure even. And complicated.

Wood herself sums up the inspiration like this: That Day We Sang is about a song most people haven't heard of, set in places that don't exist any more, based on a piece on 70s telly she can't really remember. It's also based, she says, on her love of musicals and her wish for lonely, middle-aged people to get what they don't always get in real life: a second chance, a song and dance number and a happy ending.

When I speak to Wood about the film, she explains each element of the inspiration in more detail, and what's most surprising is that the love of musicals she mentions is relatively new. Wood has spent a lot of her career with her fingers on a piano keyboard, but she says she didn't really discover, and learn to love, musicals until well into her 40s.

"It's come upon me over the last 20 years," she says. "I didn't know many musicals as a child, but I love the form now and it comes from films like Singing in the Rain and An American in Paris. It's the extravagant look I love and the lack of realism and the fact we're in a different world because we can be. This is a film, it says, so it's going to look different and then it's going to go back to reality. Let's play with it and celebrate it."

Wood seeks to re-create some of this atmosphere in That Day We Sang with American in Paris-style painted backdrops, but she also recreates a specific moment in Manchester in the 1920s that also served as an inspiration for the film: the moment when 400 members of the Manchester Children's Choir recorded Purcell's Nymphs and Shepherds at the city's Burgh Hall in 1929 (the recording went on to become a hit and was played on the radio for years afterwards). In the 1970s, a documentary was made about a reunion of some of the choir members, and Wood remembers seeing it when she was in her early twenties and living in a bedsit in Birmingham.

All of this musical history came to mind when Wood was asked to create a piece of theatre for the Manchester International Festival in 2011, which she has now turned into the television film. Tubby and Enid are fictionalised representations of the choir members who meet up again in the 1960s and fall in love, which is a way for Wood to explore all those favourite themes of nostalgia, regret, repression and middle age.

The middle age thing is important to Wood. She is 61 years old now and believes television does not do enough to represent this group. "There's a missing bit in the middle but there's millions of us and we're not dead yet," she says. She also recognises that middle age can be time when people look back and regret and explores this emotion in the film. "I'm not a totally happy bunny," she says, "and I would never write something that's totally positive. I can see that there's always something else going on with people and I try to be as realistic as possible about people's emotions."

In the film, she also has a right old go at pomposity, another of her favourite targets. In one of the best sequences, we meet a self-satisfied couple called Frank and Dorothy, who take Tubby and Enid out to dinner at one of the Berni Inns that were ubiquitous in the 1960s. As Frank boasts about his house ("detached and definitely not rented") giant prawn cocktails swirl about him and he's made to look ridiculous.

"I do have a go slightly," she says. "I don't like people who demean others and are rude to the little guys. I always stand up for the little guy, always. I wanted a scene set in a Berni Inn because that was these people's idea of gracious living which of course it never really was. My world was always more of an egg and chip place cafe really. That's what I'm nostalgic for."

Wood is also vaguely nostalgic for Manchester, where That Day We Sang is set and where Wood grew up and was a teenager in the 1960s. Many of the places she remembers have been bulldozed but, with a bit of special effects trickery, they come back to life in her film. "I like to write about Manchester and the north but that Manchester in the film is a vanished place," she says. "The buildings of my childhood, which were all pitch black and covered in soot, they have either been cleaned or they're not there. Manchester is really unrecognisable from the 60s."

And then she remembers a little moment from the 60s, from her childhood. It's 1967. She's just joined a youth theatre and they're rehearsing in a school. There's a record player in the corner and someone's put on a single. It's Penny Lane by The Beatles. They play it every day and it finds a permanent place in Wood's head. That's how music works, she says, and it's also what's she writing about in That Day We Sang.

"Music, if you hear something you've heard as a child, it's a powerful connection, it's a bit like taste," she says. "It transports you to where you were when you heard that music. Penny Lane is a big one for me. It's a happy memory and a happy music. And I love the trumpet anyway and it's got that great trumpet solo. It's a kind of time travel. You put it on and you're in that place."

Wood explores this emotion in the film through Tubby when he hears Nymphs and Shepherds for the first time in 30 years and cries. Someone asks him why he's sad, and he says he's not sure. Maybe it's the passage of time, maybe it's regret, but whatever it is, it's a fine performance from Michael Ball.

"A lot of people said to me they weren't sure Michael was right for the part because he's so Mr Showbiz and dimples and curly hair," says Wood, "but I had an instinct about him. He understood that thing that people with low self-confidence make jokes about themselves. He got to that layer underneath."

Ball can also handle the musical numbers well, which Wood directs with skill, although she's self-deprecating ("I wasn't making a Bond film; there are no fast car chases, just people sitting on a bench.") And if she does have a hope for her film, she says, it is that it might begin a resurgence on television of musicals.

"In the theatre, musicals are the mainstay," she says. "But it hasn't crept into television as yet. Television is ruled either by realistic soaps or reality programmes, but it's creeping back into the cinema at least."

And on television for now, at least we have Wood's version of the musical: what she calls Moulin Rouge in slippers; a world in which an insurance man and a secretary can suddenly start waltzing; a musical of nostalgia and hope; a chain of funny, dry, sad and happy song and dance numbers that close the gap between who we'd like to be and who we are.

That Day We Sang is on BBC2, Boxing Day, 9pm; a documentary about the making of the film, That Musical We Made, is on 3.30pm.