Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
6th August 2007, 18:42 | #2 | Link |
Registered User
Join Date: Jan 2004
Location: earth, barely
Posts: 96
|
BadFrames creates a blend of the previous and next frame and uses this to replace the current one. To use this plugin, you will need to know which frames require replacing beforehand. The plugin asks for specific frame numbers.
If you don't know the damaged frames before, or if there are too many to specify, you can use conditionalfilter (internal to avisynth) to replace frames based on certain conditions. cwk |
6th August 2007, 23:58 | #3 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
For best results this really needs to be done as part of the decoding process when the DV syntax errors are first detected.
Perhaps you can make a request in the DV forum for an enhancement to Cedocide to output some form of colour key mask information in the decoded images. i.e YUV=$000000 or $ffffff invalid pixel values indicating these areas need repair. Once you have the information any of the many techniques for masking in replacment data can be used. It may be as simple as copy the equivalent pixels from the previous frame to as complicated as a full motion vector recontructions from several adjacent frames. |
7th August 2007, 00:16 | #4 | Link |
interlace this!
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
|
here's the one i use. success varies depending on the length of the dropout and the complexity of the motion.
Code:
function morph (clip c, int in, int "out", int "blksize") { Function fill_loop(string s, int stop, int count) { return (stop == 0) ? s : string("tofill.mvflowinter(fill_vb,fill_vf,time=" + string(100*(count - stop)/float(count))) + ",thscd1=255,thscd2=255).selectevery(tofill.framecount(),0)," + fill_loop(s,stop-1,count) } out=default(out, 0) blksize=default(blksize,16) d=c.trim(in,out)# in-1? numframes=d.framecount-2 tofill=d.selectevery(c.framecount(),0,c.framecount()-1) fill_vf=tofill.mvanalyse(truemotion=true,blksize=blksize,pel=2,isb=false,overlap=blksize/2) fill_vb=tofill.mvanalyse(truemotion=true,blksize=blksize,pel=2,isb=true,overlap=blksize/2) filled=eval("interleave(" + fill_loop("" ,d.framecount()-1,d.framecount()-1) + "tofill.selectevery(tofill.framecount(),tofill.framecount())).assumefps(c.framerate())") c.trim(0,in-1)++filled++c.trim(out+1,0) } find the dropout visually (you really should watch what you encode anyway, though i never did - there's other people for that ), then: morph(inframe, outframe) where inframe and outframe are the first good frames adjacent to the glitch. you'll probably need to photoshop the output of this and re-insert the stills with imagesource, too. this is quite effective when there's not too many glitches, but it can get tedious when you've got a crap master - in which case a re-shoot is in order
__________________
sucking the life out of your videos since 2004 |
Thread Tools | Search this Thread |
Display Modes | |
|
|