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. |
|
|
Thread Tools | Search this Thread | Display Modes |
16th May 2019, 11:17 | #21 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
These are the two funcs that I like to use
Code:
Function MCDegrain(clip c, int "frames") { # By Didee, http://forum.doom9.org/showthread.php?p=1508289#post1508289 frames = default(frames, 2) bs = (c.width>960) ? 16 : 8 super = c.MSuper(pel=2, sharp=1) backward_vec3 = MAnalyse(super, isb = true, delta = 3, blksize=bs, overlap=bs/2) backward_vec2 = MAnalyse(super, isb = true, delta = 2, blksize=bs, overlap=bs/2) backward_vec1 = MAnalyse(super, isb = true, delta = 1, blksize=bs, overlap=bs/2) forward_vec1 = MAnalyse(super, isb = false, delta = 1, blksize=bs, overlap=bs/2) forward_vec2 = MAnalyse(super, isb = false, delta = 2, blksize=bs, overlap=bs/2) forward_vec3 = MAnalyse(super, isb = false, delta = 3, blksize=bs, overlap=bs/2) (frames<=0) ? c :\ (frames==1) ? c.MDegrain1(super, backward_vec1,forward_vec1,thSAD=400) :\ (frames==2) ? c.MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400) :\ c.MDegrain3(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,backward_vec3,forward_vec3,thSAD=400) return(last) } Function MCDegrainSharp(clip c, int "frames", float "bblur", float "csharp", bool "bsrch",bool "Precise") { # From:- http://forum.doom9.org/showthread.php?p=1737045#post1737045 # Based on MCDegrain By Didee, http://forum.doom9.org/showthread.php?t=161594 # Also based on DiDee observations in this thread: http://forum.doom9.org/showthread.php?t=161580 # "Denoise with MDegrainX, do slight sharpening where motionmatch is good, do slight blurring where motionmatch is bad" # In areas where MAnalyse cannot find good matches, the blur() will be dominant. # In areas where good matches are found, the sharpen()'ed pixels will overweight the blur()'ed pixels # when the pixel averaging is performed. # # Mod by StainlessS to add Precise, 3 Sept 2015. frames = default(frames, 2) bblur = default(bblur, 0.6) csharp = default(csharp, 0.6) bsrch = default(bsrch, true) Precise=Default(Precise,False) # Use MRecalculate bs = (c.width>960) ? 16 : 8 c2 = c.blur(bblur) super = bsrch ? c2.MSuper(pel=2, sharp=1) : c.MSuper(pel=2, sharp=1) super_rend = c.sharpen(csharp).MSuper(pel=2, sharp=1,levels=1) # Only 1 Level required for sharpened Super (not MAnalyse-ing) backward_vec3 = MAnalyse(super, isb = true, delta = 3, blksize=bs, overlap=bs/2) backward_vec2 = MAnalyse(super, isb = true, delta = 2, blksize=bs, overlap=bs/2) backward_vec1 = MAnalyse(super, isb = true, delta = 1, blksize=bs, overlap=bs/2) forward_vec1 = MAnalyse(super, isb = false, delta = 1, blksize=bs, overlap=bs/2) forward_vec2 = MAnalyse(super, isb = false, delta = 2, blksize=bs, overlap=bs/2) forward_vec3 = MAnalyse(super, isb = false, delta = 3, blksize=bs, overlap=bs/2) # If Precise, then recalculate on Prefiltered (blurred) Super (NOT the sharpened render super) backward_vec3 = (Precise) ? MRecalculate(super, backward_vec3, blksize=bs/2, overlap=bs/4,thSAD=100) : backward_vec3 backward_vec2 = (Precise) ? MRecalculate(super, backward_vec2, blksize=bs/2, overlap=bs/4,thSAD=100) : backward_vec2 backward_vec1 = (Precise) ? MRecalculate(super, backward_vec1, blksize=bs/2, overlap=bs/4,thSAD=100) : backward_vec1 forward_vec1 = (Precise) ? MRecalculate(super, forward_vec1 , blksize=bs/2, overlap=bs/4,thSAD=100) : forward_vec1 forward_vec2 = (Precise) ? MRecalculate(super, forward_vec2 , blksize=bs/2, overlap=bs/4,thSAD=100) : forward_vec2 forward_vec3 = (Precise) ? MRecalculate(super, forward_vec3 , blksize=bs/2, overlap=bs/4,thSAD=100) : forward_vec3 # (frames<=0) ? c :\ (frames==1) ? c2.MDegrain1(super_rend, backward_vec1,forward_vec1,thSAD=400) :\ (frames==2) ? c2.MDegrain2(super_rend, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400) \ : c2.MDegrain3(super_rend, backward_vec1,forward_vec1,backward_vec2,forward_vec2,backward_vec3,forward_vec3,thSAD=400) return(last) }
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
16th May 2019, 12:54 | #22 | Link |
Registered User
Join Date: Jul 2002
Posts: 241
|
Took this zip: https://github.com/Khanattila/KNLMea...sCL-v1.1.1.zip
placed the files in VD2's plugin32/64, restarted VD2, added to script "KNLMeansCL(d = 1, a = 2, h = 2.0, s = 2)", however it fails with: Code:
--------------------------- File open error --------------------------- Avisynth open failure: Script error: there is no function named "KNLMeansCL" (M:\temp\190515-80D-300-2749_MVI.avs, line 3) --------------------------- OK --------------------------- Code:
LoadPlugin("c:\Programs\VirtualDub2\plugins32\KNLMeansCL.dll") However script then failed with: Code:
--------------------------- VirtualDub Error --------------------------- Video compression error: An unknown error occurred (may be corrupt data). (error code -100) --------------------------- OK --------------------------- Version shows: Code:
AviSynth 2.60, build:Mar 31 2015 [ 16:38:54] |
16th May 2019, 15:50 | #23 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
Either put the dll in avisynth plugins (for auto load) OR use LoadPlugin (from some other directory than VDub plugins32).
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 16th May 2019 at 15:59. |
|
16th May 2019, 17:09 | #24 | Link |
Registered User
Join Date: Jul 2002
Posts: 241
|
Could not yet resolve the "error code -100", some sort of 'memory' malloc failure:
Code:
[*] AVI: Opening file "Y:\test.avs" [i] AVI: Avisynth detected. Extended error handling enabled.[*] Beginning dub operation. [i] Dub: Input (decompression) format is: YUV420. [!] x264 [warning]: --psnr used with psy on: results will be invalid! [!] x264 [warning]: --tune psnr should be used if attempting to benchmark psnr! [i] x264 [debug]: using mv_range_thread = 40 [i] x264: using SAR=1/1 [!] x264 [warning]: MB rate (408000) > level limit (245760) [i] x264: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 [i] x264: profile High, level 4.1, 4:2:0, 8-bit [i] Dub: Output (compression) format is: YUV420. [E] x264 [error]: malloc of size 6955648 failed [E] x264 [error]: x264_encoder_encode failed [i] x264 [debug]: scene cut at 14 Icost:476577 Pcost:452142 ratio:0.0513 bias:0.0560 gop:14 (imb:6289 pmb:1499) [i] x264 [debug]: scene cut at 17 Icost:542324 Pcost:521823 ratio:0.0378 bias:0.0680 gop:17 (imb:6206 pmb:1582) [i] x264 [debug]: scene cut at 23 Icost:506481 Pcost:466510 ratio:0.0789 bias:0.0920 gop:23 (imb:5755 pmb:2033) [E] Error: Video compression error: An unknown error occurred (may be corrupt data). (error code -100)[*] Ending operation. Took this code to a working PC, still the only way to use KNLMeansCL is to load ahead using LoadPlugin, this is a sample code: Code:
LoadPlugin("c:\Programs\VirtualDub2\plugins32\KNLMeansCL.dll") KNLMeansCL(d = 1, a = 2, h = 2.0, s = 2) return FFVideoSource("y:\test.MP4") Code:
--------------------------- File open error --------------------------- Avisynth open failure: Script error: Invalid arguments to function "KNLMeansCL" (y:\test.avs, line 2) --------------------------- OK --------------------------- EDIT: Oh, wait, maybe the script needs to be like this: Code:
LoadPlugin("c:\Programs\VirtualDub2\plugins32\KNLMeansCL.dll") FFVideoSource("y:\test.MP4") return KNLMeansCL(d = 1, a = 2, h = 2.0, s = 2) Last edited by stormy1777; 16th May 2019 at 17:14. |
16th May 2019, 17:30 | #25 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
While your at it, read some Avisynth documentation, at least the basics (the topics under "New to AviSynth – Start Here" on avisynth.nl). Edit - Try also the MCD function I posted above.
__________________
Groucho's Avisynth Stuff Last edited by Groucho2004; 16th May 2019 at 17:33. |
|
16th May 2019, 17:32 | #26 | Link |
Registered User
Join Date: Mar 2015
Posts: 775
|
16Gb is mostly irrelevant for 32-bit process
you can enable 4Gb using extra\auxsetup (enable LAA) reduce memory used by avisynth reduce memory used by x264 (using less lookahead etc)
__________________
VirtualDub2 |
16th May 2019, 18:11 | #27 | Link |
Registered User
Join Date: Jul 2002
Posts: 241
|
Groucho2004, sorry, the mixing in syntax was an oversight/typo, got it right after made the post will try the MCD soon, the -100 error is what prevents making progress since newer PC can handle a lot better than older (which has no failures, and same VD 32-bit is running in both cases).
shekh, i don't think it's memory related, it's just reporting that, but really "run video analysis pass" work fine without any failure in: 1) Uncompressed 2) FFMPEG / x265 3) FFMPEG / x265 lossless 4) Xvid MPEG-4 codec Only in the x264 8 or 10 bit, it is failing, as well as in the old x264vfw - H.264/MPEG-4 AVC codec, with: Code:
x264vfw [error]: x264_encoder_encode failed FFVideoSource("y:\test.MP4") Processing the test.MP4 file DIRECTLY in the same instance of the program, works fine in all codecs, including x264/8bits and old x264vfw. Is there any other "x264" setting or environmental aspect aside what's in the runtime directory that can impact? it sounds like some setup, b/c the other PC has less memory, much older, and yet all these things work fine on it. Stormy. |
16th May 2019, 18:16 | #28 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Run "AVSMeter avsinfo" on that PC and check for errors. Also, run your script with AVSMeter.
__________________
Groucho's Avisynth Stuff |
16th May 2019, 18:47 | #29 | Link |
Registered User
Join Date: Jul 2002
Posts: 241
|
FYI:
also, deleted this file each time, to rule out anything with that: Code:
test.MP4.ffindex Groucho2004, I'm honored, seems like you're the author of AVSMeter!! never heard of it sorry. Not sure what is an error, some lines are in RED, but otherwise output is identical to working PC. Code:
AVSMeter.exe avsinfo AVSMeter 2.9.1 (x86) - Copyright (c) 2012-2019, Groucho2004 VersionString: AviSynth 2.60, build:Mar 31 2015 [16:38:54] VersionNumber: 2.60 File / Product version: 2.6.0.6 / 2.6.0.6 Interface Version: 5 Multi-threading support: No Avisynth.dll location: C:\WINDOWS\SysWOW64\avisynth.dll Avisynth.dll time stamp: 2015-03-31, 06:40:58 (UTC) PluginDir2_5 (HKLM, x86): C:\Program Files (x86)\AviSynth\plugins [CPP 2.5 Plugins (32 Bit)] C:\Program Files (x86)\AviSynth\plugins\AddGrainC.dll [1.7.1.0] C:\Program Files (x86)\AviSynth\plugins\avstp.dll [1.0.3.0] C:\Program Files (x86)\AviSynth\plugins\dfttest.dll [1.9.4.0] C:\Program Files (x86)\AviSynth\plugins\dither.dll [2015-12-30] C:\Program Files (x86)\AviSynth\plugins\LSMASHSource.dll [2017-02-24] [CPP 2.6 Plugins (32 Bit)] C:\Program Files (x86)\AviSynth\plugins\DePan.dll [2.13.1.3] C:\Program Files (x86)\AviSynth\plugins\DePanEstimate.dll [2.10.0.2] C:\Program Files (x86)\AviSynth\plugins\DirectShowSource.dll [2.6.0.3] C:\Program Files (x86)\AviSynth\plugins\ffms2.dll [2016-12-29] C:\Program Files (x86)\AviSynth\plugins\flash3kyuu_deband.dll [2018-05-02] C:\Program Files (x86)\AviSynth\plugins\masktools2.dll [2.2.18.0] C:\Program Files (x86)\AviSynth\plugins\mvtools2.dll [2.7.36.0] C:\Program Files (x86)\AviSynth\plugins\RgTools.dll [0.97.0.0] C:\Program Files (x86)\AviSynth\plugins\TCPDeliver.dll [2.6.0.7] [Scripts (AVSI)] C:\Program Files (x86)\AviSynth\plugins\colors_rgb.avsi [2015-03-30] C:\Program Files (x86)\AviSynth\plugins\dither.avsi [2015-12-30] C:\Program Files (x86)\AviSynth\plugins\mt_xxpand_multi.avsi [2010-09-11] C:\Program Files (x86)\AviSynth\plugins\ShowDiff.avsi [2018-12-03] [Uncategorized DLLs (32 Bit)] C:\Program Files (x86)\AviSynth\plugins\libfftw3f-3.dll [2010-06-21] [Uncategorized files] C:\Program Files (x86)\AviSynth\plugins\addgrain.avs [2011-10-27] C:\Program Files (x86)\AviSynth\plugins\ffms2.lib [2016-12-29] C:\Program Files (x86)\AviSynth\plugins\ffmsindex.exe [2016-12-29] C:\Program Files (x86)\AviSynth\plugins\version.avs [2018-12-02] Then running the script directly: Code:
AVSMeter.exe y:\test.avs AVSMeter 2.9.1 (x86) - Copyright (c) 2012-2019, Groucho2004 AviSynth 2.60, build:Mar 31 2015 [16:38:54] (2.6.0.6) Number of frames: 24908 Length (hh:mm:ss.ms): 00:08:18.160 Frame width: 1920 Frame height: 1080 Framerate: 50.000 (50/1) Colorspace: i420 Frame (current | last): 495 | 24907 FPS (cur | min | max | avg): 1.852 | 1.717 | 5.439 | 2.083 Process memory usage: 305 MiB Thread count: 13 CPU usage (current | average): 15.1% | 14.5% Time (elapsed | estimated): 00:03:57.611 | 03:19:16.393 Press 'Esc' to cancel the process... It keeps running, this is a BEAST, CLI for AVS!!! monster!!! love it...but wait, seems like it's not writing anything?, this is just a benchmark tool?, so not so good for my final goal to get an MP4 file Need to figure out why Vdub thinks the system is misconfigured and dies, there must be something external to the vdub zip/directory that makes it fail, probably by wrongly trying to allocate more memory than needed.. EDIT: AVSMeter seems to only consume 1 cpu, whereas vdub appears to consume entire box (all cpus), maybe there's a way to tell it to run on more than one, but at this point it is not going to help more than it already did since it doesn't appear to WRITE anything Last edited by stormy1777; 16th May 2019 at 19:00. |
16th May 2019, 19:14 | #30 | Link |
Registered User
Join Date: Jul 2002
Posts: 241
|
can't really test the MCD, it too fails with same error:
Code:
--------------------------- VirtualDub Error --------------------------- Video compression error: An unknown error occurred (may be corrupt data). (error code -100) --------------------------- OK --------------------------- Seems like something to do with avisynth/Vdub2 integration, although version() and ColorBars() functions ARE working OK: Code:
Version() Code:
ColorBars |
16th May 2019, 19:34 | #32 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Mainly, yes.
Quote:
What GPU do you have on the box where you ran the benchmark? Edit - I'm a bit puzzled that AVSMeter runs the script but VDub crashes. However, VDub also runs the encoder so - maybe a hardware problem? Dunno...
__________________
Groucho's Avisynth Stuff Last edited by Groucho2004; 16th May 2019 at 19:40. |
|
16th May 2019, 20:02 | #33 | Link |
Registered User
Join Date: Jul 2002
Posts: 241
|
There is no GPU on this laptop, it is brand new, no h/w errors , and vdub works 100% fine without AVS scripting, it CAN encode using the same encoders without AVS, i.e. opening the file DIRECTLY from Vdub. I'm not doing any heavy lifting, really, these are 5-10 min clips, nothing huge at all..
|
16th May 2019, 21:03 | #34 | Link |
Registered User
Join Date: Mar 2015
Posts: 775
|
This is somehow memory related but finding the reason is not trivial. AFAIK x264 with default settings and 1080 source should fit in 1GB.
What you can do: start virtualdub and open your avs script, then run vmmap.exe and select virtualdub.exe process. Then use "File->Save as" to save mmp file and share it. test2: setup x264 to use ultrafast profile, run analyse pass and if it does not fail - repeat vmmap inspection while analysis is still running.
__________________
VirtualDub2 |
16th May 2019, 21:07 | #35 | Link |
Registered User
Join Date: Jul 2002
Posts: 241
|
yeah, tried many avisynth scripts, all input calls, including: AviSource fail with very small clips, all scripts are just one liners, and encoder is the x264/8-bit.. xvid, and others compress fine, so it's some internal vdub issue that's somehow misconfigured on this windows 10.. if there anything to re-install x264 to fix it??
|
16th May 2019, 21:48 | #36 | Link |
Registered User
Join Date: Mar 2015
Posts: 775
|
x264 is standalone, very hard to break.
link to vmmap: http://downloads.tomsguide.com/SysIn...301-33273.html My theory: there is little free usable memory (less than usual).
__________________
VirtualDub2 |
16th May 2019, 21:53 | #37 | Link |
Registered User
Join Date: Jul 2002
Posts: 241
|
Thanks shekh for your time and interest.
I think it's some sort of mis-configuration on the host (not sure why) that manifests itself as an apparent "memory" issue, but really, it's not a "pure" memory issue, since not using AVS script I can encode massive files on the same laptop using the SAME vdub window, just introducing the AVS script causes this failure. OK, trimmed a 3 sec clip, and that fails in all cases on analysis run with x264/8-bit (but does not on xvid), under all profiles EXCEPT Ultrafast, in Ultrafast, it never fails. vmmap when analysis is running OK on the full file, with ultrafast profile (the only one that can analyze) is here: https://anonfile.com/PesdRdrfn0/VirtualDub_zip by mis-configuration, i mean, maybe one codec is not installed correctly, or another program that vdub2 is somehow influenced by it.. At the time of running, nothing major is open/running, just basic, browser and command prompt. no photoshop, or any memory hog like that Stormy. Last edited by stormy1777; 17th May 2019 at 03:48. Reason: add vmmap.zip attachment |
16th May 2019, 21:59 | #38 | Link |
Registered User
Join Date: Jul 2002
Posts: 241
|
In this case, it seems almost impossible NOT to break so long as AVS is in the mix When you say x264 is "standalone" is there an install that needs to take place or all the files under vdub folder are only running?
I'm 99% convinced that something else on this laptop is causing this standalone to fail when file is opened via AVS, opening the video file directly, OR, using different codec, OR using x264/ultrafast causes the error to go away Stormy. |
16th May 2019, 22:02 | #39 | Link |
Registered User
Join Date: Mar 2015
Posts: 775
|
Please put the archive on some file sharing
x264.vdplugin is just dll with no fancy dependencies, no user space config files. Nothing to install.
__________________
VirtualDub2 |
17th May 2019, 03:49 | #40 | Link | |
Registered User
Join Date: Jul 2002
Posts: 241
|
Quote:
well, then I'm very curious indeed to uncover what's going on, maybe another software/installed/configured is "polluting" the VM address space and then leaving almost no memory for Vdub2... this is win7 updated to win10 (64bit , latest updates from winupdates) Stormy. |
|
|
|