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. Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se |
|
|
#61 | Link |
|
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,406
|
Nah, Im continuing to use older avs+ header, minus the stdint header requirement which prevents VS2008 compiler use.
No problems. EDIT: Above for v2.6/2.6+ plugs, am still using 2.5 header for avs 25 plugs.
__________________
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; 9th May 2020 at 17:02. |
|
|
|
|
|
#63 | Link | ||
|
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,406
|
Code:
RT_WriteFileList(String,String,bool "append"=false)
Non-clip function.
This function, takes as the first string, a filename template with wildcards, this template can be eg
"Fred.jpg" or "Fr?d.jp*g". where the '?' character matches any single character and the '*' wildcard matches zero or more characters.
v1.03, Can take multiple pipe ('|') separated Wilcards in the extension ONLY, as in "D:\Pics\*.BMP|JP*G|PNG"
The second string is the output filename which will be created and contain the files matching the input file template.
The function will return the number of filenames written into the output file. Directories are ignored altogether
and not written to the output file. A return of -1 indicates a problem opening/writing the output file.
v1.06, Append, if true appends to existing file. NOTE, the return value does NOT include any already existing
filenames if append is true (use RT_FileQueryLines to inquire total number of filenames when append = true).
Do search on "RT_WriteFileList", one script using it here:- https://forum.doom9.org/showthread.p...73#post1916173 EDIT: Smaller script function here:- https://forum.doom9.org/showthread.p...35#post1914335 EDIT: nuther one:- https://forum.doom9.org/showthread.p...10#post1911810 EDIT: Yet a nuther 1:- https://forum.doom9.org/showthread.p...st#post1896023 I accidentally deleted some files, and recovered some 1000's of text files all with names like asaoidajljlasa.txt, is really tedious having to look though 10,000 text files so i made a script that showed any files containing a particular word on a video clip frame. Much easier just moving to next frame instead of loading another text file into a text editor. Quote:
You could also perhaps find use for this, Code:
RT_FSelOpen(string "title"="Open",string "dir"="",string "filt",string "fn="",bool "multi"=false,bool "debug"=false)
Function to select EXISTING filename using GUI FileSelector.
Title = Title bar text.
Dir = Directory, "" = Current
Filt = Lots, eg "All Files (*.*)|*.*"
[Displayed text | wildcard] [| more pairs of Displayed text and wildcard, in pairs ONLY].
first one is default.
fn = Initially presented filename (if any).
multi = Multiply Select filenames. Allows selection of more than one filename at once.
debug = Send error info to DebugView window.
Returns
int, 0, user CANCELLED.
int, non zero is error (error sent to DebugView window).
String, Filename selected, Chr(10) separated multiline string if MULTI==true (and multiple files selected).
Example, to prompt for an AVI file and play it.
avi=RT_FSelOpen("I MUST have an AVI",filt="Avi files|*.avi")
Assert(avi.IsString,"RT_FSelOpen: Error="+String(avi))
AviSource(avi)
From the source code before it was included into RT_Stats, here:- https://forum.doom9.org/showthread.p...07#post1638307 Code:
AVSValue __cdecl FSelOpen(AVSValue args, void* user_data, IScriptEnvironment* env) {
char * myName="FSelOpen: ";
const char * myFilter=
"All files (*.*)|*.*|"
"Avi Files (*.avi;*.XVid;*.DivX)|*.avi;*.XVid;*.DivX|"
"Mpg files (*.vob;*.mpg;*.mpeg;*.m1v;*.m2v;*.mpv;*.tp;*.ts;*.trp;*.m2t;*.m2ts;*.pva;*.vro)|*.vob;*.mpg;*.mpeg;*.m1v;"
"*.m2v;*.mpv;*.tp;*.ts;*.trp;*.m2t;*.m2ts;*.pva;*.vro|"
"Other Vid (*.mkv;*.Wmv;*.mp4;*.flv;*.ram;*.rm)|*.mkv;*.Wmv;*.mp4;*.flv;*.ram;*.rm|"
"Audio Files (*.mp3;*.mpa;*mp1;*.mp2;*.wav)|*.mp3;*.mpa;*mp1;*.mp2;*.wav|"
"Avs files (*.avs;*.avsi)|*.avs;*.avsi|"
"Text files (*.txt;*.log;*.asc)|*.txt;*.log;*.asc|"
"Image files (*.bmp;*.jpg;*.jpe;*.jpeg;*.png;*.tga;*.tif;*.gif;*.tiff)|*.bmp;*.jpg;*.jpe;*.jpeg;*.png;*.tga;*.tif;*.gif;*.tiff|"
"Bat files (*.bat)|*.bat|";
"Exe files (*.exe)|*.cmd";
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; 2nd November 2022 at 05:48. |
||
|
|
|
|
|
#64 | Link |
|
Registered User
Join Date: Aug 2016
Posts: 901
|
Wow ok, wasn't expecting that.
I suppose I should probably explain what I'm trying to do. Basically I want to iterate through all the files inside a dir (and its subdirs) and check if a filename matches the one I'm looking for. In the meantime I'm working around it by using an ahk script to generate my avs scripts programatically so I can get away with having hardcoded paths for now. It's still a little annoying though as it means if I ever moved the avs files (or the video files they point to) to another location then the whole thing breaks (but, I can just run the ahk scripts again so it's not the total end of the world but still would be nice to have completely self-contained, self-sufficient avs scripts with no external path dependencies). |
|
|
|
|
|
#65 | Link | |
|
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,406
|
Quote:
There is Exist("filename") :- http://avisynth.nl/index.php/Internal_functions#Exist which works also on folder name so long as it does NOT end in slash/backslash (although I've a feeling that Pinterf fixed that in current AVS+). You could also scan a RT_WriteFileList to see if matching file exists but Exist() quicker. Avisynthesizer_Mod has a Batch mode which creates avs script for each {possibly mulitple} GUI selected file, using a script template.
__________________
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; 2nd November 2022 at 16:49. |
|
|
|
|
|
|
#66 | Link | |
|
Registered User
Join Date: Oct 2018
Location: Germany
Posts: 1,097
|
Quote:
So for me this works quite well. Hibrydcoding ![]() Code:
SourceFile = ScriptDir() + "Hammer.mkv" SourceFile = Exist(SourceFile) ? SourceFile : "E:\Ablage\Hammer.mkv" video=LWLibavVideoSource(SourceFile, cache=False) audio=LWLibavAudioSource(SourceFile, cache=False) audioDub(video, audio)
__________________
Live and let live |
|
|
|
|
|
|
#67 | Link |
|
Registered User
Join Date: Nov 2003
Posts: 418
|
I'll give you a reason. Initially my question is what's the difference between the 2 dlls in the download?
GScript_25_32.dll and GScript_26_32.dll ? But as I surveyed this thread, I have to ask... I have Avisynth+ and am trying to run a script (AiUpscale) and it's bombing due to a syntax error AS THOUGH GScript is not "in" the system. I was about to install the GScript filter but saw here where it's allegedly BUILT IN to Avisynth+. Please tell me what's going on here. Is it still built in? If so, then why is my Gscript script (AiUpscale.avsi) bombing with a syntax error at the first IF? |
|
|
|
|
|
#68 | Link |
|
Registered User
Join Date: Mar 2011
Posts: 5,062
|
You don't need the GScript string wrapper when using the native Avisynth+ version. Either way though, I'm pretty sure the conditions must be inside brackets.
Code:
if (i > 10) {
x = 1
}
else {
x = 4
}
Code:
GScript("""
if (i > 10) {
x = 1
}
else {
x = 4
}
""")
|
|
|
|
|
|
#69 | Link | |
|
Registered User
Join Date: Nov 2003
Posts: 418
|
Quote:
The presence of the script AiUpscale.avsi in my plugins folder causes any script (even version.avs) to blowup with the syntax error when I try to open my script (version.avs) in my player (Vdub). It blows up at the first IF statement in AiUpscale.avsi. |
|
|
|
|
|
|
#70 | Link |
|
Registered User
Join Date: Nov 2003
Posts: 418
|
In anticipation that you'll ask me for my AVSMeter, here it is, showing that I'm using Avisynth+.
Code:
D:\MyApplications\AVSMeter>avsmeter -avsinfo AVSMeter 3.0.9.0 (x86), (c) Groucho2004, 2012-2021 VersionString: AviSynth+ 3.7.3 (r4003, 3.7, i386) VersionNumber: 2.60 File / Product version: 3.7.3.0 / 3.7.3.0 Interface Version: 10 Multi-threading support: Yes Avisynth.dll location: C:\WINDOWS\SysWOW64\avisynth.dll Avisynth.dll time stamp: 2023-07-16, 04:00:38 (UTC) PluginDir2_5 (HKLM, x86): C:\Program Files (x86)\AviSynth+\plugins PluginDir+ (HKLM, x86): C:\Program Files (x86)\AviSynth+\plugins+ [C++ 2.5 Plugins (32 Bit)] [Version, Time stamp] C:\Program Files (x86)\AviSynth+\plugins\avssr.dll [n/a, 2014-01-09] C:\Program Files (x86)\AviSynth+\plugins\dgbob.dll [n/a, 2003-07-06] C:\Program Files (x86)\AviSynth+\plugins\DGDecode.dll [1.5.8.0, 2015-12-26] C:\Program Files (x86)\AviSynth+\plugins\NicAudio.dll [n/a, 2012-08-27] C:\Program Files (x86)\AviSynth+\plugins\TIVTC.dll [1.0.5.0, 2017-12-18] [C++ 2.6 Plugins (32 Bit)] [Version, Time stamp] C:\Program Files (x86)\AviSynth+\plugins+\ConvertStacked.dll [n/a, 2023-07-16] C:\Program Files (x86)\AviSynth+\plugins+\DirectShowSource.dll [n/a, 2023-07-16] C:\Program Files (x86)\AviSynth+\plugins+\ImageSeq.dll [n/a, 2023-07-16] C:\Program Files (x86)\AviSynth+\plugins+\Shibatch.dll [n/a, 2023-07-16] C:\Program Files (x86)\AviSynth+\plugins+\TimeStretch.dll [n/a, 2023-07-16] C:\Program Files (x86)\AviSynth+\plugins+\VDubFilter.dll [n/a, 2023-07-16] C:\Program Files (x86)\AviSynth+\plugins\aWarpsharpMT.dll [2.1.9.0, 2023-11-19] C:\Program Files (x86)\AviSynth+\plugins\DGDecodeNV.dll [0.0.0.2052, 2016-10-18] C:\Program Files (x86)\AviSynth+\plugins\ffms2.dll [n/a, 2020-08-22] C:\Program Files (x86)\AviSynth+\plugins\LSMASHSource.dll [1129.0.0.0, 2023-07-16] C:\Program Files (x86)\AviSynth+\plugins\masktools2.dll [2.2.30.0, 2022-02-19] C:\Program Files (x86)\AviSynth+\plugins\mvtools2.dll [2.7.45.0, 2021-06-08] C:\Program Files (x86)\AviSynth+\plugins\Shader.dll [n/a, 2024-05-07] C:\Program Files (x86)\AviSynth+\plugins\svpflow1.dll [4.0.0.132, 2016-12-21] C:\Program Files (x86)\AviSynth+\plugins\svpflow2.dll [4.0.0.136, 2016-12-21] [Scripts (AVSI)] [Time stamp] C:\Program Files (x86)\AviSynth+\plugins\colors_rgb.avsi [2022-10-06] C:\Program Files (x86)\AviSynth+\plugins\FFMS2.avsi [2015-05-22] C:\Program Files (x86)\AviSynth+\plugins\GameDropFixV5.avsi [2017-10-04] C:\Program Files (x86)\AviSynth+\plugins\InterFrame2.avsi [2015-07-22] C:\Program Files (x86)\AviSynth+\plugins\LimitedSharpenFaster.avsi [2017-01-03] C:\Program Files (x86)\AviSynth+\plugins\Shader.avsi [2024-05-07] C:\Program Files (x86)\AviSynth+\plugins\TCS-Video-Functions.avsi [2024-04-27] [Uncategorized files] [Time stamp] C:\Program Files (x86)\AviSynth+\plugins\AiUpscale - Copy.xxxavsi [2024-05-07] C:\Program Files (x86)\AviSynth+\plugins\AiUpscale.xxxxavsi [2024-05-08] C:\Program Files (x86)\AviSynth+\plugins\colors_rgb.txt [2022-10-06] C:\Program Files (x86)\AviSynth+\plugins\ffms2.lib [2020-08-22] C:\Program Files (x86)\AviSynth+\plugins\ffmsindex.exe [2020-08-22] D:\MyApplications\AVSMeter> |
|
|
|
![]() |
| Tags |
| for-loop, if-then-else, while-loop |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|