PDA

View Full Version : "both" and "inpaint" in inpainting filter


dragon25
17th October 2008, 07:31
is there a script to enable a much faster process as im encoding on a quad core q6600 at 3.51ghz with 6gb of memory

ive just done a pass of a dvd menu which i adjusted so that the dvd didnt have trailers etc for my own use becuase i hate them and wanted a clean menu.

well the priocess just took 63 hours...and the menu was only 1 min 30 secounds long.

now i imaging doing the process wit a full film would take well over 2 years if this has anythign to go by, in which case i really would like to know of a "hack" to really improve the processing speed.


LOADCPLUGIN("C:\Program Files (x86)\AviSynth 2.5\FilterSDK\AVSInpaint-2008.02.23\AVSInpaint.dll")
Import("E:\menu\InpaintFunc.avs")
mpeg2source("E:\menu\VIDEO_TS\VTS_01_1.d2v")
BilinearResize(720, 480)
InpaintFunc( mask="1mainmenu.bmp",loc="0,0,0,-80", mode="both", speed=20, ppmode=1, pp=100 ,radius=200.0,preblur=200.0)

is the script.

and i have the sam results for both and inpaint, doing with just deblend is far far quicker bu only takes care of part of the item.

Reuf Toc
17th October 2008, 21:15
To speed up things, reduce the speed parameter (with a value of 20, all the frame of the movie will be analysed).
Maybe I should change this parameter to be more intuitive.

And if it is possible, adjust loc parameter to have the smaller clip to analyse (but I supose you've already done this).

Another solution is to trim your clip for logo analysis. Once the computation is done, you can apply the function to your entire clip (logo analysis is computed only one time)

manono
17th October 2008, 21:47
Another solution is to trim your clip for logo analysis. Once the computation is done, you can apply the function to your entire clip (logo analysis is computed only one time)
Really? You don't have to analyze the entire thing? Because when using InPaint, it often takes as much as the entire length of the video before it even opens to be encoded. What percent of the video would you recommend be analyzed, and exactly how? With a straight Trim of, maybe, 10 percent of the movie, or maybe with something like this applied at the bottom of the script:

SelectRangeEvery(400,40)

which also analyzes 10%, but in a different way.

dragon25- Just why is this thing taking 63 hours for a short menu? Are you actually running a bunch of CCE passes or something, on that script you posted? If so, make a Lagarith lossless AVI first and then encode from that. That way the slow script has to encode only once. Or, better if possible, just cover up the text for the trailers using the Overlay command and a piece from a different part of the menu. Or make a BMP of the menu and remove the trailer part in a photo editor, and then use the Overlay command to add back on top all the motion menu parts. There are lots of ways to solve the problem in much less time than 63 hours.

Reuf Toc
18th October 2008, 14:50
By default, the function is set to analyse 25% of the input clip (speed value of 5). InpaintFunc internally use SelectRangeEvery() to reduce clip length.
The solution I gave is to use only if the computation is judged too long after reducing speed parameter.

I have no idea about minimum amount of the movie to be analysed to have an "acceptable result". I suppose it depend of the source. And of course, by reducing speed, you also decrease inpainting quality. Matter of compromise...

dragon25
19th October 2008, 23:15
just how would i know why its taking 63 hours lol

it seems that when i select both or inpaint it takes so much longer than deblend which ona full film would take less than 4 hours.

so i guess since inpaint fucntion is in the both feature that its the inpaint that cuases the long processing time.
im also runnign this in tmpgenc dvd author as i have found it does such a much better and clearer job than virtual dub etc (made the bottom logo go completely without any smudging than i found in virtualdub mod. plus when using tmphenc dvd software it keeps the dvd format and quality.

whats overlay command as ive only got hold of the inpaint etc meanings ....oh sayign this i do have a request, with all this 0,0,0,0 thing, can anyone make a picture of the position and the space covered by each one (if you see what i mean)

with people sujesting that i reduce the speed with another saying if reduced that includes quality...im not doign this to do a rubbish job im doing this to do a quality job.

oh and i just wished to thank the person that came up with this script becuase the quality of the blurring is outstanding , as ive always use puremotions software to blur before.

oh and for some reason when i select new posts this topic hasnt shown up for me...why?

manono
19th October 2008, 23:51
whats overlay command
It's nothing to do with the Inpaint function, but is an AviSynth command used to put something over something else:

http://avisynth.org/mediawiki/Overlay

If you can post a picture of this menu, I (or someone else) might be able to show you how it works. I've used it on many menus with obnoxious logos or some text I wanted to remove, without having to use the very slow Inpaint function.
if you see what i mean
I don't understand. Maybe someone else does.

dragon25
20th October 2008, 00:25
http://i43.photobucket.com/albums/e368/MPAASUCKS/SIZEANDBARS.jpg

so this shows the (o,o,o,0) when doing the adjustign from LEFT,TOP,RIGHT,BOTTOM

so im asking can somebody do a simlari shot showing how the areas covered looks, ie what are the size of the bars , what are the legnths of the bars since if you did say 20,10,0,0. would the bvars cross over each other of limit the legnth?

i do hope thats made better sense.

manono
20th October 2008, 01:09
Oh, you want to find the coordinates for the white rectangle you made, so you can plug them into the InPaint function script? There are lots of ways, I suppose. You can open the black and white BMP you made in a lot of picture editors and find them out. Me, I make a simple AviSynth script and open it in GKnot, go to the Resolution Tab, and crop down to the white rectangle. You can also open it in VDub(Mod) and do the same:

ImageSource("C:\Path\To\Menu.bmp")

dragon25
20th October 2008, 02:29
nope.

say if i wanted to cover a logo on the bottom right corner.

if i did 0.0.0-400 is this covering the complete lower section or is there a estimates space that is covered.

if that sounds better.

manono
20th October 2008, 02:53
I have no idea what you're asking. You didn't do as I asked either, and provide a pic of the Menu so I or someone else might be able to show you a better way to do this. So I'll retire from this discussion. Good luck.

dragon25
20th October 2008, 02:56
only reason i coudlnt asnwer you my friend is becuase i really didnt understand what the question was.

i will supply a shot or the shot im using from the menu tomorrow when i wake up (im in the uk)

i appreciate all replies.

http://i43.photobucket.com/albums/e368/MPAASUCKS/tinkermenu.jpg

Reuf Toc
20th October 2008, 17:30
Sorry but I really don't understand what you want. If you need help to find the "loc" values, look at InpaintAssist (an InpaintFunc subfunction - check the wiki (http://avisynth.org/mediawiki/InpaintFunc) for more details and to get the last version.)

The error you describe in your other topic ("analyze: mask is empty") can occur when there is no white part in the mask or if your "loc" values are false. To check this, use show=true in your parameters. And once again, if you want faster result, reduce speed value.

dragon25
20th October 2008, 18:30
i dont know how else to explain my question for somebody to know what im asking.

ok let me try.

im agien the left hand border, now imagine that border being small in with and length and long on width and length. now with the LOC is there a specific measurement for each loc or is it just a long constant wall , that if you did say 50,0,0,0 that the left hand bar would cover the whole left section.

do you see what/ where im getting at here