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. |
9th December 2019, 20:38 | #5001 | Link | |
Registered User
Join Date: Jan 2019
Location: Antarctica
Posts: 74
|
Quote:
Also, would like to know why I cannot use Prefetch(2) for 720p or if I even need it or if 1 is good enough. For my DVD's in 480p it runs just fine with Prefetch(2) but if a source requires anti-aliasing using maa2() even at 480p I have no choice but to use Prefetch(1) as I get Access Violation. I don't get it. With 8 gigs I thought that should be enough. Could it be that AviSynth issue running out of memory? Last edited by dREV; 9th December 2019 at 20:54. Reason: stuff |
|
10th December 2019, 08:40 | #5002 | Link |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,781
|
To access most of your RAM, do you execute it with a 64-bit application? Apart from that, an access violation can have different reasons, maybe also a code error in one of the used plugins, so it's probably worth a closer investigation. Try running it in AVSMeter64, this tool should produce quite verbose error messages. Also don't underestimate that an encoder itself needs RAM too (in this regard, 8 GB can already be "rather low" when processing FullHD content, too little for x265 already).
|
10th December 2019, 10:50 | #5003 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
What LigH said,
+, have a look at your Windows logs for both Application and System errors. My Computer/Properties/Manage/Event Viewer/Windows Logs/ Application, & System Quote:
__________________
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; 10th December 2019 at 11:00. |
|
10th December 2019, 20:55 | #5004 | Link |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,904
|
Definitely update Avisynth+ like StainlessS said.
As to the lack of RAM, if you're using x86, you might wanna take a look at this: https://forum.doom9.org/showthread.php?t=163281 I successfully made Avisynth x86 use more than 7 GB of RAM on my 32 GB system by splitting each filter into a separate process so that each process can allocate 2 GB of RAM and Avisynth as a whole can allocate as much RAM as possible. As to the modifications in red, I'll take a look at it later as I'm really in a hurry right now. |
16th December 2019, 10:02 | #5005 | Link | ||||
Registered User
Join Date: Jan 2019
Location: Antarctica
Posts: 74
|
Quote:
I've only gotten this Access Violation majority of times when using real.finder's maa2 script in combination with Prefetch(1). It never fails. With older versions of maa2 this issue is non-existent. Maybe cuz real.finder's updated maa2 script uses HBD or something? I've used AVSMeter 32 bit version and it gives no errors just does it as if no issues. Encoder needs RAM? That's news to me I never heard this before. I'm content with just 720p sources at the moment. Quote:
Quote:
I've did a few tweaks using your critique if I understood it correctly. However, I cannot use your f3kdb settings cuz I get errors. MeGUI complains that the resolution is not the same plus there was some things that wasn't working out right like when I would use Gradfun3 with mask using lsb as I need it to be the first thing done before applying any other filter to lessen any detail loss. Anyways here's what I been using Code:
dither_convert_8_to_16() #Debanding - Gradfun3 16bit lsb with mask=0 #misc filter(s) 16 bit lsb - only if needed like smdegrain s16 = last DitherPost(mode=-1) #line darkening (sometimes) maa2() dither_convert_8_to_16()) s16.Dither_limit_dif16 () ly = GradFun3mod(thr=0.35,yuv444=true, resizer="DebilinearM", lsb_in=true, lsb=true) lc = nnedi3_resize16(1280*2, 720*2,lsb_in=true,lsb=true,kernel_d="Spline36",kernel_u="Spline36",src_top=0.0,src_left=0.50,nlsb=false) lu = lc.UtoY() lv = lc.VtoY() YtoUV(lu,lv,ly) DitherPost(mode=-1) ConvertBits(bits=16) #I want this here to get more bitrate but at first I did some tests using what you wrote ConvertToStacked() # grain ConvertFromStacked().ConvertToDoubleWidth() Quote:
Last edited by dREV; 16th December 2019 at 10:12. Reason: stuff |
||||
16th December 2019, 15:07 | #5006 | Link | |
Registered User
Join Date: Mar 2011
Posts: 4,829
|
Quote:
If I add maa2() to a script in MeGUI's Script Creator and preview it, when I close the Script Creator MeGUI invariably complains about an error and wants to close. MeGUI doesn't use Avisynth+ 3.4 as it's portable Avisynth yet and I haven't tested 3.4 as I still have Avisynth 2.6 installed, but it happens when using Avisynth 2.6 too. If I comment out maa2() before loading a script to add it to the job queue (as from memory, the same thing happens) then uncomment maa2() before running the encoding job, it's usually fine from there. I'm not using MeGUI's OneClick encoder. I'm running XP. Maybe there's some weird problem with maa2() that only effects MeGUI, but I have no idea what could cause it. Have you tried opening a script containing maa2() with another program such as MPC-HC to see if there's still an access violation, assuming you have Avisynth installed? You can tell MeGUI to use the installed Avisynth to see if anything changes. I'm pretty sure for me, opening the script with a different program is not a problem, but don't quote me on that because I haven't used maa2() for a while and my memory is terrible. Last edited by hello_hello; 16th December 2019 at 15:24. |
|
16th December 2019, 18:12 | #5007 | Link | |||
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,904
|
Quote:
Code:
s16 = last Now we're going to brutally truncate everything to 8bit planar so that maa2 can work, but don't worry, we're NOT gonna use it directly! Code:
DitherPost (mode=-1) Code:
maa2() Code:
Dither_convert_8_to_16 () If we go on with our filterchain like this we would lose precision 'cause we have brutally truncated our original 16bit stacked to 8bit planar in order to use maa2, so the 16bit stacked we ended up with at the end is "fake" in the sense that it has gone through a loss of precision. But... remember what I wrote at the very beginning? We stored our original 16bit stacked BEFORE the anti-aliasing in our variable "s16". So now the idea is to tell Avisynth "Hey, take the original 16bit stacked clip, compare it with the anti-aliased 8bit planar one that we brought to the "fake" 16bit stacked and subtract the changes". This way it's as if we applied anti-aliasing with 16bit precision. Quote:
Quote:
Last edited by FranceBB; 16th December 2019 at 20:03. |
|||
17th December 2019, 04:13 | #5008 | Link | ||||
Registered User
Join Date: Jan 2019
Location: Antarctica
Posts: 74
|
Quote:
Quote:
--[Information] [12/16/2019 4:46:35 PM] AviSynth+: 3.4 (20-10-2019) (inactive) --[Information] [12/16/2019 4:46:35 PM] AviSynth+ portable: 3.4 (20-10-2019) (active) There might be more AviSynth dll's in MeGUI in other folders so may wanna use the search function to find em. No, I haven't opened it in MPC-HC cuz I dunno how you guys do that. I've seen YouTube videos do that but no steps exactly what they did to get it to be viewed on MPC-HC. I'm using k-lite too codec pack. Would like to know how to do it on AVSPmod as well. Quote:
Also, I worked out the error as I was confused how to implement dither_convert_8_to_16() with Gradfun3 deband filter as I need that. I had no idea that f3kdb(input_depth=8, output_mode=1, output_depth=16) can replace dither_convert_8_to_16() in avspmod and did a test encode and worked out. It's basically the same as above just the removal of the first dither 8 to 16 code. Code:
f3kdb(input_depth=8, output_mode=1, output_depth=16) #Debanding - Gradfun3 16bit lsb with mask=0 #misc filter(s) 16 bit lsb - only if needed like smdegrain s16 = last DitherPost(mode=-1) #line darkening (sometimes) maa2() dither_convert_8_to_16() s16.Dither_limit_dif16 () ly = GradFun3mod(thr=0.35,yuv444=true, resizer="DebilinearM", lsb_in=true, lsb=true) lc = nnedi3_resize16(1280*2, 720*2,lsb_in=true,lsb=true,kernel_d="Spline36",kernel_u="Spline36",src_top=0.0,src_left=0.50,nlsb=false) lu = lc.UtoY() lv = lc.VtoY() YtoUV(lu,lv,ly) DitherPost(mode=-1) ConvertBits(bits=16) #I want this here to get more bitrate but at first I did some tests using what you wrote ConvertToStacked() # grain ConvertFromStacked().ConvertToDoubleWidth() Quote:
Last edited by dREV; 17th December 2019 at 04:18. Reason: stuff |
||||
17th December 2019, 21:41 | #5009 | Link | ||
Registered User
Join Date: Mar 2011
Posts: 4,829
|
Quote:
Quote:
For AvsPmod you either open an existing script or create a new one and it has a preview. I don't recall any special requirements for either, other than to have Avisynth installed, but I haven't installed Windows and programs from scratch in quite a while. By the way, for MPC-HC, Ctrl+E re-opens the current video, so you can modify scripts and re-open them to view the change quite easily, or you can open the script in a second instance of the player to preview the difference. If you can't save changes to scripts because they're locked after MPC-HC opens them, try disabling the Avisynth source filter under Internal Filters in MPC-HC's options, or use Notepad to edit the the scripts. It ignores the locked status and lets you save changes, whereas other editors probably won't. If a script is too slow MPC-HC will skip frames when you play it before possibly giving up completely, but you can still use the step button on the navigation bar to slowly step through frames etc. Last edited by hello_hello; 17th December 2019 at 21:53. |
||
21st December 2019, 08:34 | #5010 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Not sure if this has been flagged before. EDIT: v3.4.0
Code:
BITS=16 BlankClip.ConvertToYV12.ConvertBits(BITS) X = 16 Y = 16 W = 128 H = 128 #COL=$00FFFFFF # No Alpha COL=$FFFFFFFF # Full Alpha WHT=BlankClip(Width=W,Height=H,Color=COL) # Prob if RGB32 or YV12, but not YUV420P16 WHT=WHT.ConvertToYV12 #WHT=WHT.ConvertBits(BITS) Overlay(WHT,x=X,y=Y) crop(0,0,W+2*X,H+2*Y) # Crop Overlayed with 16 pixels border PointResize(512,512) # for view
__________________
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; 12th January 2020 at 14:31. |
29th December 2019, 20:44 | #5011 | Link |
gMKVExtractGUI author
Join Date: Aug 2003
Location: Greece / Thessaloniki
Posts: 251
|
Hey guys! I just installed AviSynth+ v3.4 and I am looking for the pdb file to load symbolas for AviSynth.dll but unfortunately they are not included in the release assets.
Any chance one of the devs could upload them somewhere? PS. I am trying to debug a custom application that uses AviSynth, however currently it fails to clear the resources, specifically when trying to delete the environment pointer: Code:
IScriptEnvironment* environment; ... delete environment; environment = NULL; Edit: For any guru out there that can understand assembly, the instruction that gets stuck is: Code:
07333830 mov dword ptr [ebp-48h],eax Last edited by gpower2; 29th December 2019 at 20:55. |
29th December 2019, 21:34 | #5012 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
For reference, this is how I initialise (and destroy) IScriptEnvironment for AVS 2.6 (AVISYNTH_INTERFACE_VERSION 5/6):
Code:
const AVS_Linkage *AVS_linkage = 0; typedef IScriptEnvironment * __stdcall CREATE_ENV(int); int main() { int iInterfaceVersion; IScriptEnvironment *AVS_env = 0; HINSTANCE hDLL = ::LoadLibrary("avisynth"); if (!hDLL) { //Cannot load avisynth.dll return -1; } try { CREATE_ENV *CreateEnvironment = (CREATE_ENV *)GetProcAddress(hDLL, "CreateScriptEnvironment"); if (!CreateEnvironment) { //Cannot load CreateScriptEnvironment() ::FreeLibrary(hDLL); return -1; } iInterfaceVersion = 7; while (!AVS_env) { iInterfaceVersion--; if (iInterfaceVersion < 5) { //Cannot create IScriptenvironment (AVSVersion too old) ::FreeLibrary(hDLL); return -1; } AVS_env = CreateEnvironment(iInterfaceVersion); } AVS_linkage = AVS_env->GetAVSLinkage(); //Do your stuff //destroy AVS_env->DeleteScriptEnvironment(); AVS_env = 0; AVS_linkage = 0; } catch (AvisynthError err) { printf("%s", (PCSTR)err.msg); } ::FreeLibrary(hDLL); } There are additional checks I do, for example making sure avisynth.dll exports "AVS_linkage". If you're interested, look at the code of AVSMeter and/or avsr (link in my sig).
__________________
Groucho's Avisynth Stuff Last edited by Groucho2004; 30th December 2019 at 20:23. Reason: updated code |
29th December 2019, 21:39 | #5013 | Link |
gMKVExtractGUI author
Join Date: Aug 2003
Location: Greece / Thessaloniki
Posts: 251
|
Thank you very much for your suggestions guys!
To be honest, I am using a patched version of AvisynthWrapper that MeGUI used (I am not sure if it still uses the same), for a C# application. If I find the time, I may "play" with IScriptEnvironment2, although I am not sure if it's compatible with Avs 2.5 and Avs+ 3.4 But it would be nice to have the pdb files either way for such edge cases. |
29th December 2019, 21:50 | #5014 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
It's compatible with AVS+ only but still experimental as far as I know.
__________________
Groucho's Avisynth Stuff |
29th December 2019, 22:15 | #5015 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,496
|
I deleted my post as I realised I don't really know what I'm talking about, but in any case I use IScriptEnvironment2 in conjunction with ->DeleteScriptEnvironment() to delete it, not just calling regular delete, so maybe that's the problem.
|
29th December 2019, 23:03 | #5016 | Link | |
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,420
|
Quote:
But anyway, the reason is that 3.4 was built as Release, no *.pdb files were generated at all. Also, the packaging in CMakeLists.txt doesn't copy them over to Output/ even if they are generated. http://www.mediafire.com/file/01xgi9...191227.7z/file The current git HEAD hasn't changed too much since 3.4, so here's a build with the *.pdb and *.ilk files included. |
|
29th December 2019, 23:06 | #5017 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Not sure if you need the new interface for additional functionality but you don't need IScriptEnvironment2 to use DeleteScriptEnvironment(), it works fine with IScriptEnvironment.
__________________
Groucho's Avisynth Stuff |
29th December 2019, 23:21 | #5018 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
https://forum.doom9.org/showthread.p...te#post1631151 And the benefit of the newer DeleteScriptEnvironment(): https://forum.doom9.org/showthread.p...te#post1512400 When AVSMeter still used the 2.5 interface, I used this to destroy IScriptEnvironment: AVS_env->~IScriptEnvironment(); AVS_env = 0;
__________________
Groucho's Avisynth Stuff Last edited by Groucho2004; 29th December 2019 at 23:28. |
|
29th December 2019, 23:26 | #5019 | Link | |
gMKVExtractGUI author
Join Date: Aug 2003
Location: Greece / Thessaloniki
Posts: 251
|
Quote:
Also, if I first assign it to NULL, how can I delete it afterwards? I am a bit of a n00b regarding C++ since I've never written anything at a professional level... The code is posted in GitHub (really messy stuff, I just created a repo to have a versioning system while updating/cleaning it) and the relevant code is here in case anyone wants to take a peek. Thanks for the debug build qyot27, I'll post any results here if I manage to have any! |
|
29th December 2019, 23:28 | #5020 | Link | |
gMKVExtractGUI author
Join Date: Aug 2003
Location: Greece / Thessaloniki
Posts: 251
|
Quote:
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|