#119 johnmeyer
Thank you for your comment. Your example of the disappearing football is very clear.
Nevertheless, I wish I had those worries already..
At present I am trying to apply my most limited knowledge in this field, in order to get some sort of a result in stain removal,
as you probably have seen from my reply to jagabo.
Please feel free to comment!
+ Reply to Thread
Results 121 to 150 of 253
-
-
I think that RemoveDirtSSE2.dll needs a Windows MSVC runtime. I don't recall which one, though. Anyone recall?
Could also be the fftw3 system files. Were those copied into Windows System folder?
Many thanks,
Could you elaborate a little on how this should be checked and/or performed if necessary?
Sorry to be such a nuisance, but really am a newbie. -
Fred's script won't work on its own. It requires several dlls. Johnmeyer posted a link to a zip file with those dlls in post #111
https://forum.videohelp.com/threads/365089-8mm-Film-Restoration?p=2372199&viewfull=1#post2372199
Note that .AVS scripts in AviSynth's plugins folder are not loaded automatically. Only dlls and AVSI scripts. If you rename your RemoveDirtMC().avs file to RemoveDirtMC.avsi it should auto load. Note that the name of the fuction doesn't depend on the name of the AVS or AVSI script (the name of the script is just for you're convenience in identifying which file has the script) but rather on how it's declared in within the script.
I would use the script I posted in its entirety. That way you don't have to worry about whether the RemoveDirtMC() and RemoveDirt() functions are auto loaded properly, or manually loaded with an import(). But it should work either way. Be careful that two scripts don't create functions with the same name. I'm not sure what happens, whether the first one found is used, the last one found is used, or if you get an error message. And note the RemoveDirtMC() calls RemoveDirt() so if you change the name of RemoveDirt() you need to change the call to that function in RemoveDirtMC().
I wonder if this might cause problems with dlls and AVSI scripts auto loading? If AviSynth uses the Registry to keep track of the plugins folder renaming the folder will leave the Registry pointing to the wrong location. Avisynth would continue to work (with internal filter or manually loaded filters) because the avisynth.dll is in the \Windows\System32 or \Windows\SysWOW64 folder. -
Fred's version of RemoveDirtMC is an "avs" script. The avs file should be in your Avisynth plugins folder, but it won't load automatically the way dll's do. An avs plugin has to be imported explicitly (see below).
Don't modify it. It can be modified, if you know what you're doing, but avs scripts of this type have been optimized by the developer.
Change your script:
Code:AviSource("d:\desktop\1986-test 1e.avi") 03_RemoveDirtMC(last, 55, false)
Code:Import("drive:\path\Avisynth 2.5\plugins\03_RemoveDirtMC.avs") ### <<<- adjust drive and path to match your system AviSource("d:\desktop\1986-test 1e.avi") 03_RemoveDirtMC(last, 55, false)
Code:Import("D:\Avisynth 2.5\plugins\03_RemoveDirtMC.avs")
You can copy the complete text of jagabo's version into the bottom of your script, but it's easier to make an avs file of the function text itself. I took the liberty of doing that for you (attached, below). Copy the avs script into your plugins folder and import jagabo's version of RemoveDirtMC similarly:
Code:Import("drive:\path\Avisynth 2.5\plugins\RemoveDirtMC.avs") ### <<<- adjust drive and path to match your system AviSource("d:\desktop\1986-test 1e.avi") 03_RemoveDirtMC(last, 55, false)
I'll echo jagabo about renaming the installed Avisynth folder. If it was installed as "Avisynth 2.5", changing the folder name won't match the pointers in the registry. Try changing it back to the name that was installed. When I first installed 2.6 I forgot that one PC had Avisynth installed on my D: drive but I was in a rush and took the default C: drive location for 2.6. So I had 2.5 (aka 2.6) on my C drive, but I still had all the plugins in my d: drive. Quel problem!! So I uninstalled 2.6, then installed it again using the correct drive and folder path for my 'puter.
Last edited by LMotlow; 6th Feb 2015 at 09:00.
- My sister Ann's brother -
If you want to use my version of Fred's script, and not VideoFred's version, then you do NOT want to import his version of RemoveDirtMC. If you look at what I posted earlier, you will see that I actually included that code inside my script as a function. Functions can be stored in their own file, or inside the script itself; this is strictly a matter of style and preference, and there is no functional difference.
You will not get satisfactory results removing blotches if you use the original (VideoFred) version because, as I already mentioned in one of my earlier posts, I heavily modified RemoveDirtMC (as noted by LMotLow, it can be modified). It is these modifications that help the script find and remove those large blotches that cover an appreciable percentage of the frame. Without these modifications, those blotches would never be removed.
Just for the sake of completeness, and to help your understanding, the purpose of calling RemoveDirt from this RemoveDirtMC script is to be able to first apply motion compensation (that's what the "MC" stands for) to the video before the RemoveDirt plugin can work its magic. You'll see motion compensation used for lots of different things, but in this instance it is used to move the two adjacent frames so that they both "line up" with the current frame. This is a little like taking two pieces of paper containing similar, but not identical text, holding them up to the light, and then moving one piece of paper up/down/rotate until you see everything align. Once you do that, any flaws that are in one piece of paper, but not on the other, become very easy to see.
So, my main piece of advice is to decide whether you are going to use my version of the script, or VideoFred's. While I derived mine from his work, I heavily modified it to speed it up (4x to 6x faster, if you can do multi-threading), reduce the amount of sharpening, and improve the quality of the denoising by using "MRecalculate" to improve the motion compensation prior to doing the degraining and the dirt removal.Last edited by johnmeyer; 6th Feb 2015 at 12:10. Reason: Removed spurious left parenthesis
-
True, and thanx to johnmeyer for clarifying the function issue. Yes, the version of RemoveDirtMC used by john is in his script. So there's no need to import the function, period. Looks like the "RemoveDirt" errors came from the fact that the O.P. changed the name of his Avisynth folder from 2.5 to 2.6. No wonder the system couldn't find all the plugins.
- My sister Ann's brother -
-
Yes, I totally agree.
I learned forty years ago, in programming school, that you should always make explicit calls and not leave it up to the compiler or interpreter to figure out what is to be loaded. Yes, it saves a few lines of code to not have all those "load" and "import" statements, but after you've spent a few hours troubleshooting, only to find out the "smart" code grabbed the wrong thing, you get religion and don't ever do that again. -
jagabo#123
1.Sorry jagabo, my question is not about fred's total script but about RemoveDirtMC.avs.
By the way, in my plugin folder it is simply called: 03_RemoveDirtMC; no further extension like avs or avsi.
Should this not be a dll? If so where can I find it?
2. I changed the script to:
AviSource("d:\desktop\1986-test 1e.avi")
RemoveDirtMC.avsi(last, 55, false)
Result:
Changing it to:
AviSource("d:\desktop\1986-test 1e.avi")
03_RemoveDirtMC.avsi(last, 55, false)
results in a similar "I don't know… "
3. Sorry, my shortcomings are too evident: I can't follow your explanation. Therefore I would rather concentrate on just a plugin that runs. Would it make things a lot easier if I would install AviSynth 2.5 instead of 2.6? -
motlow #124
Thank you very much! According to your advice I changed the the script to the following:
Import("C:\Program Files (x86)\AviSynth 2.6\plugins\03_RemoveDirtMC.avs")
AviSource("d:\desktop\1986-test 1e.avi")
03_RemoveDirtMC.avsi(last, 55, false)
Result:
In my plugin folder the RemoveDirtMC plugin is simply called: 03_RemoveDirtMC; no further extension like avs or avsi. Consequently, I changed the script to:
Import("C:\Program Files (x86)\AviSynth 2.6\plugins\03_RemoveDirtMC")
AviSource("d:\desktop\1986-test 1e.avi")
03_RemoveDirtMC(last, 55, false)
Result:
I'm most grateful for your modifying the jagabo script and for simpifying things for me and I certainly intend to test your further suggestions. Right now I think we should first try to get the above running.
I did install AviSynth 2.6 but again would it be wiser to install 2.5 instead?
#125-129 johnmeyer and manono,I shall be reverting to your contributions later. I am not that fast anymore..
Please ignore the attachment, don't know how to delete it.. -
There is no underscore or 03 when you call the function . It's just RemoveDirtMC(55, false)
Code:Import("C:\Program Files (x86)\AviSynth 2.6\plugins\03_RemoveDirtMC.avsi") AviSource("d:\desktop\1986-test 1e.avi") RemoveDirtMC(last, 55, false)
If the actual .avs file is renamed .avsi, the 1st line is not necessary it should autoload -
Are you able to see extensions? If so, then it should have an extension. If not then you should turn them on so you can see them.
No, it should not be a DLL. DLLs are added to a script with a 'LoadPlugIn' line. AVS and AVSI are added to a script with an 'Import' line. But, as pdr mentioned AVSIs are supposed to autoload if put in the right place. -
Re: #125 jagabo
Yes, it is right there:
Re: #126 johnmeyer
Your comments are most interesting and I got hold of the the versions you specified of RemoveDirt and RemoveDirtMC. Nevertheless, I keep getting the same errors..
Any clue?
Re: #127 Lmotlow
That was just an experiment. This what "version" says:
Nevertheless: errors.
Re: #128 manono
These are the contents of my plugin directory at present:
The top three ones do not have visible extensions. Via 'Properties' I found that the top one is an .avsi and the orther two are .avs. Is it imperative that the extension are visible, here and in the script?
If so, how do I go about it?
Re: #129 johnmeyer
Point well taken! -
Re: #132 poisondeathray
That one was downloaded from VideoFred's package and it had the 03_ in front.
I assumed that this was also included in Fred's script, so I left it in place.
Now I use johnmeyer's version which is simply called 'RemoveDirtMC'.
In spite of this, the script is still causing an error.
Re: #133 manono
No, as mentioned in #134 (#128) I do not see the extensions. Please let me know how to turn them on.
As I understand now, it is always wise to use an 'LoadPlugIn' line in the script. -
It doesn't matter to AviSynth that Explorer isn't showing extensions. But hiding extensions from you is one of the stupidest default settings in Windows. Turn that setting off! From any Explorer window go to the Folder And Search Options and disable "Hide extenesion of known file types".
-
Gentlemen,
At last I have some success, be it limited.
Here, at http://avisynth.org.ru/despot/despot.html I found the 'DeSpot' filter by Kevin Atkinson.
I modified the script to my situation:
AviSource("d:\desktop\1986-test 1e.avi")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\despot.dll")
ConvertToYV12()
Crop(0,0,720,288) #to show test
i = last
# Compare half-frames with and without noise reduction
DeSpot(p1=35, p2=14, pwidth=70, pheight=70, mthres=25, mwidth=20, mheight=15, interlaced=false,
\ merode=33, ranked=false, p1percent=0, dilate=0, fitluma=false, blur=0, motpn=false, seg=0)
StackVertical(i, last)
To my great surprise it worked! A little.
As you will see in the attached clip, most of the smaller dark spots have disappeared from the lower half of the image.
The larger stains however, are still there.
I started using the default parameter values given by Mr. Atkinson. Of course these will have to be modified.
Mr. Atkinson supplies a lot of information, however, far too much for a good understanding by the newbie I still am.
Therefore, I would be most grateful if you could give me some guidance here with respect to getting a better performance on the larger stains.
Many thanks! -
-
I started out, many years ago, using Despot, but could never get the darn thing to work very well. I spent hours using it, with hundreds of different settings. But, if you can get it to work, that's great!
-
Thank you for warning me, John. I shall not waste any further time on that filter.
I hope to find some time today to experiment with the script you posted in #109.
Could I just change the first line to point to my avi file and then copy everything after 'VIDEO FILE' ?
I'll make sure having the proper filters stored in my plugin folder. -
No, you have to change other things. For instance, the speed has to match the speed of your original. And, the pixel dimensions have to match your original. I'm sure there are other things. Go through all the variables in the first part of the script and make sure they match. It shouldn't take more than 1-2 minutes to do this.
-
Thanks John. Apart from changing the clip name and path, the only things I could find are these two:
1. Play speed: does this have to match the speed of the clip "as is" (in my case 25fps) or the original
S-8 speed of 18fps? I filled in: 18.
2. I changed final size after cropping to W=720 H=576
Is there anything I overlooked? Here is the clip's readout in MediaInfo:
General
Complete name : D:\Desktop\1986-test 1e.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 402 KiB
Duration : 1s 0ms
Overall bit rate : 3 293 Kbps
Writing library : VirtualDub build 35491/release
Video
ID : 0
Format : MPEG-4 Visual
Format profile : Advanced Simple@L5
Format settings, BVOP : 1
Format settings, QPel : No
Format settings, GMC : No warppoints
Format settings, Matrix : Default (H.263)
Muxing mode : Packed bitstream
Codec ID : XVID
Codec ID/Hint : XviD
Duration : 1s 0ms
Bit rate : 3 223 Kbps
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 5:4
Frame rate : 25.000 fps
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.311
Stream size : 393 KiB (98%)
Writing library : XviD 66
After making the above changes I copied everything from '#VIDEO FILE' until the very end into AVSEdit and saved it
as 1986-test 1e JMscript-1.avs.
When I tried to play it, I got the following error message, which is strange since 'mvtools2.dll' definitely is included in
my plugin folder which just contains all of your dll's: 14 to be precise.
I must be doing something wrong and I'm looking forward to your advice. -
You need to provide the full path name to each of the dll imports. Ie, change
Code:LoadPlugin ("mvtools2.dll") #Version 2.5.11.9 2/24/2012
Code:LoadPlugin ("c:\program files (x86)\avisynth 2.5\plugins\mvtools2.dll") #Version 2.5.11.9 2/24/2012
Code:#LoadPlugin ("mvtools2.dll") #Version 2.5.11.9 2/24/2012
Last edited by jagabo; 12th Feb 2015 at 16:41.
-
You need to match the speed to the actual number of frames per second in the clip you supply. These frames must be "frame-accurate" (i.e., after any inverse telecine so that you get rid of all the duplicates). The original speed of the camera is totally irrelevant. You set the playback speed when you are totally finished with the process. In other words, at the very end of the whole process, you change the AVI header so that the frames play back at whatever speed comes closes to matching the real-life speed of the original subject that was filmed. Not all cameras had precise control over the film speed, and you often need to set this to something other than the usual amateur film speeds of 16, 18, and 24 fps.
Last edited by johnmeyer; 12th Feb 2015 at 17:08. Reason: missing right parenthesis
-
Thanks Jagabo,
I followed your advice and it seems we made some progress since I got this message:
which is again a few lines down in the script…
Sorry, but do not understand your suggestion to put a # in front of the "LoadPlugin"- command.
Doesn't this cancel the command?
Yes, I am running 32-bit Avisynth 2.6 (not 2.5) and the dll's are also 32-bit as far as I know. -
#144 Hello John,
OK , I changed the frame rate to 25. Nevertheless, I again got the message mentioned in #145.
Changing the speed indeed is what I usually do at the end when I use Premiere for lip-synching the audio recorded at the time on synchronized cassettes. Fortunately, I then had the wisdom to record a 1kHz tone on each cassette, in order to have a tape speed reference.
As it turns out now, my Minolta 8D6 camera has been running at exactly 18fps all the time!
Any further suggestions on getting your script running? -
Are you sure you have RemoveDirtSSE2.dll? Try changing the LoadPlugin line fromRemoveDirtSSE2.dll to RemoveDirt.dll. Or download the RemoveDirt package again and replace RemoveDirt.dll in you plugins folder with RemoveDirtSSE2.dll (assuming you have an SSE2 capable CPU).
Last edited by jagabo; 12th Feb 2015 at 18:21.
-
#147 Jagabo
Here are the contents of my plugin folder and RemoveDirtSSE2.dll is there alright:
The HIDE subdirectory contains other filters like TCPDeliver and DirectShowSource that came along with the installation of AviSynth.
The only strange thing I saw in the script that the L of LoadPlugin suddenly was upside down!
I retyped the line but it made no difference.
Changing the LoadPlugin line from RemoveDirtSSE2.dll to RemoveDirt.dll does not help either.
Copied the plugins again from the site johnmeyer recommended (Film Restoration Script (Meyer version) DLLs): no change.
How can I find out whether I have an SSE2 capable CPU?
It seems more people have this problem but I cannot find a solution anywhere.
For example http://forum.doom9.org/archive/index.php/t-166861.html
There's talk about a "support library needed for the SSE2Tools.dll" and about "MSVC runtimes version 7, 8, 9 or 10."
I am sorry but I simply do not understand what is meant here. Could you help please?
The Processor in my PC is an Intel® Core™ i5-4430 CPU @ 3.00GHz 3.00GHz
Is that OK? -
How can I find out whether I have an SSE2 capable CPU?
Your computer is fine and supports SSE2, SSE3
FYI , cpu-z will tell you more info about which instruction sets are supported by various processors
http://www.cpuid.com/softwares/cpu-z.html