Charles Woolard, 42, was serving a life sentence with a minimum 12 year term for the murder of Grant McDonald, who was beaten to death in an Edinburgh pub in 2005.
He was eventually released last April after serving 13 years behind bars - but within five months was arrested again, this time accused of a violent assault on a woman in Dundee.
Woolard met Jenny Whyte, 32, while both were inmates at Saughton prison in Edinburgh, where he was serving his life sentence.
The relationship continued after Woolard was released last year.
By September Woolard had started a relationship with another woman, but that fell apart when Miss Whyte claimed she was pregnant with his child.
He travelled to her flat in Dundee’s Coldside two nights in a row to see her, however, on September 11, following his second visit, Miss Whyte told her mum and a support worker that Woolard had attacked her and showed them injuries to her arms and neck that she said he caused when he grabbed then strangled her.
Miss Whyte told the court: “He was right in my face, he called me a dirty cow and he grabbed my neck and choked me.”
Woolard was then arrested over the attack at his home in Edinburgh, where police seized his phone.
On it they found a bizarre video that showed a teacher moving provocatively in front of a white board before the scene cut to another video of a child touching himself.
Woolard told his trial at Dundee Sheriff Court that he had been sent the video “as a joke” by a friend and had forwarded it on, leading to him being charged with possessing and distributing an indecent image of a child.
He denied charges of assault to injury, possessing an indecent image of a child and distributing an indecent image of a child.
After a three-day trial a jury took just 40 minutes to find the assault charge not proven and find him not guilty of the child abuse picture charge.
Sheriff Tom Hughes told him he had been acquitted and was free to go, but Woolard did not walk free from court because his life licence was revoked.
Liam Kerr, Scottish Tory shadow justice secretary, said: “Scotland’s prisons are chock-a-block and this means that having male and female offenders in close proximity is a fact of life.”
“But the prison service must provide a safe environment for all inmates, particularly female and vulnerable inmates. Otherwise there’ll be no hope of turning their lives around.”