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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 6th August 2007, 14:51   #1  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
DV dropout

Which filter is suitable for eliminating dropouts in presenting in DV source .
What I mean as dropout: in DV sometimes a part of the picture is missing or damaged.
Terka is offline   Reply With Quote
Old 6th August 2007, 18:42   #2  |  Link
cwk
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
cwk is offline   Reply With Quote
Old 6th August 2007, 23:58   #3  |  Link
IanB
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.
IanB is offline   Reply With Quote
Old 7th August 2007, 00:16   #4  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
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)
}
usage:

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
Mug Funky is offline   Reply With Quote
Old 7th August 2007, 08:47   #5  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
thank you!
Terka is offline   Reply With Quote
Old 14th October 2011, 01:12   #6  |  Link
Mounir
Registered User
 
Join Date: Nov 2006
Posts: 773
Excellent script, just what i needed,
Mounir is offline   Reply With Quote
Old 14th October 2011, 05:45   #7  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,769
Quote:
Originally Posted by Terka View Post
Which filter is suitable for eliminating dropouts in presenting in DV source .
What I mean as dropout: in DV sometimes a part of the picture is missing or damaged.
Have you tried first to clean your player?
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:12.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.