Sir Henry At Rawlinson End 1980 Based on Vivian Stanshall's 1978 record of the same name, screenplay by Vivian Stanshall and Steve Roberts, directed by Steve Roberts. The idea started on the John Peel radio show in 1975. You can hear some of that material on YouTube. You can watch a nice documentary on Vivian here.
Here's the plot synopsis from the Wikipedia:
The plot of Sir Henry at Rawlinson End revolves around attempts to exorcise the ghost of Humbert, the brother of drunken aristocrat Sir Henry (Trevor Howard) who was accidentally killed in a drunken duck-shooting incident whilst escaping trouserless from an illicit tryst. It transpires that Humbert's ghost will not rest until it is supplied with replacement trousers. Until then the ghost walks the corridors of Rawlinson End, often accompanied by that of Humbert's dog Gums which has repossessed its own body, now stuffed and mounted on a trolley.
Amongst the eccentric family members, mad friends and grudgingly loyal servants involved are Hubert, Henry's other (earthworm fixated) brother, the eternally knitting Aunt Florrie, the tapeworm-obsessed Mrs. E, Lady Philippa of Staines (Liz Smith), who enjoys the odd 'small' sherry and the ever-present Old Scrotum, Sir Henry's wrinkled retainer.
It's all rather mad and not for everyone. I got a few laughs out of it but at times it's dragging along with nary a gag in sight. You might like it more than me. Click the links above and find out.