View Full Version : Please help me make this script faster
Nagashi
20th July 2010, 14:54
This is the script I am currently using. Before I added in DFTTest(sigma=0), it only took me about 1.5 hrs to encode a 25 minute anime episode.With DFTTest(sigma=0), it takes me 14 hrs. to encode a 25 minute episode. With this setup, the upscaled output video comes out looking damn good! I mean, all those nasty compression artifacts GONE! However, I don't want to wait 14 hrs. per episode. Is there anyway to speed up the encoding process using these filters?
Also, please let me know if you see any major problems with this script.
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\decomb.dll")
MPEG2Source("C:\Users\VTS_02_1.d2v")
Crop(4,0,-4,0,true)
TFM().Tdecimate()
FFT3DGPU(plane=0, sigma=0.1, sigma2=0.1, sigma3=2.0, sigma4=4.0)
DFTTest(sigma=0)
Tweak(sat=1.2)
MSharpen(15,20,true,false,false)
Lanczos4Resize(1280,720)
Keiyakusha
20th July 2010, 15:24
DFTTest is a slow filter. However not sure why you using sigma=0. It makes not much sense to me but I'm too lazy to look at the docs to check what it does :Р
Anyway you shouldn't be using FFT3Dgpu AND DFTTest. Choose one of them and set up in the way that artefacts will be gone.
Lanczos4Resize(1280,720) --> if you not targeting some specific device so you need this resolution and nothing else, there is no point in such upscaling since stretching the video on playback can give the same or even better results, depending on how you watching the video.
And you shouldn't use crop before TFM. However in this case its probably safe.
Guest
20th July 2010, 15:43
MSharpen() is also very slow. Try to live without it.
cretindesalpes
20th July 2010, 16:42
- Avoid using both dfttest and FFT3D, they do (almost) the same thing.
- IMHO sigma=0 with the default ftype in dfttest does nothing. In this case, this filter acts mainly as an heating device for your room and crunches lots of numbers for nothing.
- If you want something quicker, you can use tbsize=3 instead of 5 (default). Try to play with overlapping and window size, too (take a look at the doc).
- FFT3D and dfttest are temporal filters. Without motion compensation, they may produce ghosting artifacts and give suboptimal results. Use MSuper, MAnalyse, MCompensate and Interleave/SelectEvery to achieve mo-comp. See here (http://forum.doom9.org/showthread.php?t=147676) for inspiration. Of course, this would slow down again a bit the whole filtering.
- The benefit of classic upscaling (lanczos, spline, bicubic, etc.) over realtime resizing at playback time is very low. If you are determined to rescale, first use an EDI resizer (nnedi2_rpow2 for example) to upscale x2 then downsize to your desired format.
- I would also question the Tweak command (1.2 is pretty high). Unless your source is really dull because of a poor transfer and you know how to fix the colors, don't use it. Advices given in anime restoration tutorials are disastrous when people think they are general rules and follow them blindly.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.