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. |
15th April 2010, 10:10 | #1 | Link |
Registered User
Join Date: Aug 2007
Posts: 45
|
need help on repair old anime
Hello Everyone!
I would like to learn how to use Avisynth and all the filters arround to repair/improve my collection of old anime. I would like to make my first try on "Arupusu no Shōjo Haiji" which is from 1974 and it is extreme noisy and suffers some shaking. Furthermore this anime suffers spotting and also dark lines are too bright for my taste. For getting an idea of this toon, here a lossless compressed sample (34 MB, codec:FFV1) http://rapidshare.com/files/376022232/sample.avi Edit:Another sample direct from the source (15 MB, mpeg2): http://rapidshare.com/files/376421612/sample_cut.mpv Edit: My avisynth-Script (you may have to adjust the path for the filters) Code:
# Set DAR in encoder to 4 : 3. The following line is for automatic signalling global MeGUI_darx = 4 global MeGUI_dary = 3 AviSource("sample.avi") ### colorcorrection LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\ColorMatrix.dll") ColorMatrix(hints=true, threads=0) ### anitflicker loadplugin("deflicker.dll") DeFlicker(scene=30) ###linedarken Import("FastLineDarken.avs") FastLineDarken(strength=128) ### DeDot TComb(mode=2,fthreshl=10,fthreshc=20,othreshl=5,othreshc=6,map=false,scthresh=12.0) ### crop crop( 14, 2, -10, -2) ###Saturation Tweak(sat=1.1, bright=-30, cont=1.1) ### Denoise LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\Convolution3DYV12.dll") Convolution3D("animeBQ") #----- eDeen(r=2, ty=20, tuv=30, ly=2, luv=3, hqc=true) FFT3DFilter(sigma=2.0, plane=4, bw=48, bh=48, bt=4, ow=16, oh=16, sharpen=1, interlaced=false) #ConvertToYV12() #deSpot i=ConvertToYV12() d = DePanEstimate(i,trust=3) DePanInterleave( data=d) DeSpot(p1=30, p2=15, pwidth=800, pheight=600, mthres=20, motpn=true, dilate=1, seg=1, color=true,ranked=true) SelectEvery(3, 1) ### deshake Import("Stab.avs") Stab() ### 3rd party filter LoadVirtualDubPlugin("MSU_cartoon_restore.vdf","MSUCartoonRestore", 0) ConvertToRGB32.MSUCartoonRestore("bilateral", 2, 4, 30) ConvertToYV12() ###Sharpen aWarpSharp2(depth=20,type=0,blur=4,thresh=128,chroma=4) MSharpen(threshold = 15, strength = 100) ###duplicate frames Dup(threshold=3,blend=false,copy=true,chroma=false,blksize=8,show=false) But i am not satisfied with the result, so i beg for your help: I cant fix this x and y shaking, and the areas of same colour still have noise. Do you have any suggestions or hints for me? I played arround with all this disabled (#) filters in the script but i failed to find good settings - maybe you have an idea? greetings, bololo Last edited by bololo; 19th April 2010 at 09:07. |
15th April 2010, 12:50 | #2 | Link | |
Registered User
Join Date: Nov 2009
Posts: 2,352
|
I cant help you with the deshake because Im having the same problems as you. Your source has many similarities with film artifacts so taking a glance to the 8mm restoration thread could give you many clues.
If I was you I'd go with a script in this fashion: Quote:
You may also want to use an All-in-one script if you want the easy way out, like MCSpuds or MCtemporaldenoise.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread Last edited by Dogway; 15th April 2010 at 17:23. |
|
16th April 2010, 06:49 | #4 | Link |
Registered User
Join Date: Aug 2007
Posts: 45
|
@lansing : big thx for your reply, but too bad i can not test your solution, as i can not load FFT3D.dll, nor few others (eg VariableBlur.dll) I think its a Windows7 x64 issue...
@dogway : i will have a look into your advices, thank you for that. also i uploaded another example direct from the mpg2: (Sample 15 MB, mpeg2): http://rapidshare.com/files/376421612/sample_cut.mpv |
16th April 2010, 14:58 | #5 | Link | |
Almost Silent Member
Join Date: Jun 2002
Location: Purgatory
Posts: 273
|
Strange... I'm running Win7 x64 and both FFT3DFilter and FFT3DGPU work perfectly here. Have you installed the FFTW libraries?
Quote:
__________________
Rethinking the "Why?" chromosome. |
|
18th April 2010, 12:01 | #7 | Link |
Registered User
Join Date: Aug 2007
Posts: 45
|
After putting the files into the SySWOW64-folder everything runs fine! Thank you!
After much testing i decided to use a modified Stab() function to stabilize the picture. It works quite good. Code:
############################################################################## #Original script by g-force converted into a stand alone script by McCauley # #latest version from December 10, 2008 # #modified for fill up black edges by bololo # ############################################################################## function Stab (clip clp, int "range", int "dxmax", int "dymax") { range = default(range, 1) dxmax = default(dxmax, 4) dymax = default(dymax, 4) temp = clp.TemporalSoften(7,255,255,25,2) inter = Interleave(temp.Repair(clp.TemporalSoften(1,255,255,25,2)),clp) mdata = DePanEstimate(inter,range=range,trust=0,dxmax=dxmax,dymax=dymax) DePan(inter,data=mdata,offset=-1, mirror=15, blur=30) #DePanStabilize(inter, data=mdata, dxmax=4, dymax=4, rotmax=0, zoommax=0) SelectEvery(2,0) } Code:
loadplugin("deflicker.dll") DeFlicker(scene=30) ### DeDot TComb(mode=2,fthreshl=10,fthreshc=20,othreshl=5,othreshc=6,map=false,scthresh=12.0) ### crop crop( 14, 2, -10, -2) ###Saturation Tweak(sat=1.2) ### Denoise LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\Convolution3DYV12.dll") Convolution3D("animeLQ") ### need more denoise! FFT3DFilter(sigma=2.0, plane=4, bw=48, bh=48, bt=4, ow=16, oh=16, sharpen=1, interlaced=false) ###Sharpen aWarpSharp2(depth=20,type=0,blur=4,thresh=128,chroma=4) ### deshake (modified as the listing above) Import("Stab.avs") Stab() ###Eliminate duplicate pictures Dup(threshold=4,blend=false,copy=true,chroma=false,blksize=8,show=false) regards, bololo Last edited by bololo; 18th April 2010 at 16:09. |
18th April 2010, 16:02 | #8 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,352
|
dup doesnt eliminate any dups as long as I know. It just convert dups into the same frames (copy) for bitrate economy. For eliminate dups (decimation) use Decimate, or TDecimate and look for a dup repetition pattern.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread |
18th April 2010, 16:09 | #9 | Link |
Registered User
Join Date: Aug 2007
Posts: 45
|
Okay, but that causes a problem:
Because of the many spots not all duplicated frames are detected. I think only 60-70% of duplicated frames are detected. So if only those detected duplicates are getting removed wouldnt that cause problems to the framerate like causing a variable framerate? regards, bololo |
18th April 2010, 18:29 | #10 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,352
|
of course. Anime originally has frame duplication, even in the source 24fps, its animation economy. You shouldnt aim to remove all the dups, just those introduced through the 24fps ->29.976/25. The rest kind of dups inherent to the animation can be then used for the Dup filter. This will only make your video play at original 24fps, no variable framerate. I think that ideally you should use srestore (which removes necesary dups for x->24fps) if we are talking about purism, or Tdecimate for removing 1 dup every 25 frames.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread Last edited by Dogway; 18th April 2010 at 18:32. |
19th April 2010, 09:09 | #11 | Link |
Registered User
Join Date: Aug 2007
Posts: 45
|
I updated the final script into the first posting for everyone who may suffer similar problems.
Its maybe not perfect, but the best i can afford and compared to the source i am satisfied with the result. Thank you everybody for reading/helping |
23rd June 2010, 03:25 | #12 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,352
|
I like restoring old anime so I tried your source, this is what I got, only left a spot remover, and the 25->24fps thing, with some fine tweaking, but I think now it is more viewable. There isnt a better quality release of this anywhere?
1.6Mb http://www.sendspace.com/file/s6zfak
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread |
Tags |
ancient, anime, avisynth, improve, repair |
Thread Tools | Search this Thread |
Display Modes | |
|
|