The girlfriend of a serial sex offender phoned police when she found a secret stash of child abuse pictures in his house.
Steven Perrie's girlfriend grew suspicious when she found a DVD recorder hidden in his bedroom drawer.
When Sharon Aiton played one of the DVDs she found a picture of a child aged around five being abused.
The horrified mother also found a pair of soiled childrens underwear in the drawer.
Perrie has admitted offences relating to child abuse images for the third time.
The 46-year-old was jailed for two years in 2004 after being caught with a record collection of indecent images - more than 400,000 photographs and nearly 16,000 videos.
The former bricklayer, from Forfar, received a second jail sentence in 2005 when it emerged he had been downloading abusive images while working on an extension to a friend's house.
The father-of-two admitted the latest offences at the High Court in Aberdeen on Tuesday - pleading guilty to downloading and distributing more than 16,000 images and 593 videos.
The court heard that Perrie had been living alone but was in a relationship with Miss Aiton, the mother of his two-year-old daughter.
Advocate depute Neil Beardmore said: "She found a pair of girls pants which appeared to be soiled with semen and a quantity of DVDs."
Around 300 of the pictures were categorised as the most severe possible. The pictures originated from across Europe, Asia and America.
Defence advocate Susan Duff said Perrie has a "long-standing problem" with child abuse images.
She said: "He realises that to continue with this behavior will result in him facing lengthy periods of imprisonment.
"That is not something he wants for the rest of his life.
"He doesn't want to commit the offences because the consequences far outweigh what he gains from committing them.
"This has been the lightning bolt that has made him realise that this can't continue."
At court on Wednesday, Lord Uist deferred sentence for a risk assessment order to gauge how much of a threat Perrie would pose to the public if liberated.
He will be sentenced at the High Court in Edinburgh in June.