View Full Version : Repair scratched frames
cybersharky
19th May 2012, 19:31
http://dl.dropbox.com/u/47490038/spot.png
What can I do to remove that mark on the face? This frame a few surrounding ones have similar marks.
I had ripped this episode already, somehow it's gotten corrupted on my hdd. And, no that mark is on the episode I just copied from the dvd :(
Didée
19th May 2012, 21:13
Oh, a fluff on Sheridan's nose. Well, on B5 there's probably several hundreds of dirt/dust/scratches per episode. What about the grain being DCT-destroyed by mpeg2? What about the swamped black levels? What about the CGI parts being blend-converted (DEFT machine, maybe)?
Methods that clean such dirt will also have strong impact on the film grain. If, OTOH, one is okay with reducing the grain, then maybe one should use a generic filter (MDegrain) instead of simple clamping.
And ... or ... or ... and ...
This show is a concentrate of problems that would need to be adressed. The disks are standing on my shelf for a decade, and still I didn't start ripping, because I still can't decide what to actually do with'em.
Mounir
19th May 2012, 22:19
If it's only a few frames i can help you i have a special software for that (like photoshop but better)
Didée
19th May 2012, 22:52
There's no need for any "special software". Spot removal is a classical in Avisynth. Despot, motioncompensated despot, motioncompensated clense, RemoveDirtMC, ... see e.g. here (http://forum.doom9.org/showthread.php?p=1402690#post1402690). (Though for B5, I'd use blksize=16/overlap=8). For single-frame treatment, ReplaceFramesSimple().
cybersharky
20th May 2012, 13:55
osup = o.MSuper(pel=2,sharp=2)
bv1 = osup.MAnalyse(isb=true, delta=1,blksize=16,overlap=8,search=4)
fv1 = osup.MAnalyse(isb=false,delta=1,blksize=16,overlap=8,search=4)
bc1 = o.MCompensate(osup,bv1)
fc1 = o.MCompensate(osup,fv1)
Interleave(fc1,o,bc1)
MedianblurT(0,0,0,1) # you can also use "Clense(reduceflicker=false)" instead
SelectEvery(3,1)
The above code works for the first problem frame, but has no impact on the spots on Ivanova's forehead in image below
http://dl.dropbox.com/u/47490038/ivanova.png
@Didée, yes, I've encoded mine a few times, but eventually was happy with just using mdegrain2. Although now that I see the spots and scratches, I'm not totally sure.
StainlessS
20th May 2012, 14:19
Might be worth trying DeSpot with SEG=1 or SEG=0, in place of MedianBlurT
(and always use tsmooth=0, DeSpot can just alter spots and not do a global frame mod)
and select just the frames you want to affect using ReplaceFramesSimple or ClipClop
which allows for multiple replacement clips (cant remember if ReplaceFramesSimple does).
EDIT, would have tried this but need more than a single frame for despot.
EDIT: Something like this,
ORG=Last
osup = o.MSuper(pel=2,sharp=2)
bv1 = osup.MAnalyse(isb=true, delta=1,blksize=16,overlap=8,search=4)
fv1 = osup.MAnalyse(isb=false,delta=1,blksize=16,overlap=8,search=4)
bc1 = o.MCompensate(osup,bv1)
fc1 = o.MCompensate(osup,fv1)
Interleave(fc1,o,bc1)
c1=MedianblurT(0,0,0,1).SelectEvery(3,1)
c2=Despot(SEG=0,etc).SelectEvery(3,1)
SCMD="
1 25 # Fix frame 25 with MedianBlurT
2 35 # Fix frame 35 with Despot
1 100,200 # Fix range 100-200 with MedianBlurT
2 500,600 # Fix range 500-600 with Despot
"
ClipClop(ORG,C1,C2,scmd=SCMD)
EDIT: dont use Despot on already MedianBlurT clip/frame.
If you wanted to use MedianBlurT for all of clip except a few odd frames then eg
SCMD="
1 0,0 # replace entire org clip with MedianBlurT clip
2 25 # fix frame 25 with Despot ONLY
2 100 # Fix frame 100 with Despot ONLY
"
Didée
20th May 2012, 15:00
The above code works for the first problem frame, but has no impact on the spots on Ivanova's forehead in image below
Its not possible to evaluate the ineffectiveness of a temporal filter by just one screenshot. Check the actual frame sequence. If the spots are present/identical in two subsequent frames instead of only one, then a radius=1 temporal median is of course without effect.
My opinion still is that dirt/spots are one of the lesser problems of B5 ....
BTW, just to have it noted: The AR of (at least) the PAL release is not 16:9 (1.7777). The Ar in fact is 15:9 (1.6666).
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.