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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 3rd June 2019, 11:45   #4701  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 1,812
That seems like a lot of work to solve a problem that hardly anyone will ever face, and it could introduce unforeseen problems.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 3rd June 2019, 11:48   #4702  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,126
Quote:
Originally Posted by wonkey_monkey View Post
That seems like a lot of work to solve a problem that hardly anyone will ever face, and it could introduce unforeseen problems.
Not really, the guy above has already foreseen these unforeseen problems.
__________________
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 ???
StainlessS is offline   Reply With Quote
Old 3rd June 2019, 12:42   #4703  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,016
Quote:
Originally Posted by MysteryX View Post
No problem.
1. Do a discovery of all DLLs and what's in them
2. Once the script is loaded and started rendering, unload everything that is not in use
NOTE: We still know what functions are available and where
3. If a function is later called that is unloaded, load it.

Otherwise, while we have any script playing that uses auto-loading, we cannot update any dll files.
I think this was actually the original Avisynth strategy. Mostly due to processes at the time being very limited in the number of simultaneous dlls that could be loaded so if you stuffed the autoload directory full you could actually encounter this problem.

Nowadays you can load a gazillion of dlls as long as you compile them with a shared runtime so there's really no reason to do things like that.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 3rd June 2019, 13:05   #4704  |  Link
Groucho2004
►◄
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Location: A wretched hive of scum and villainy
Posts: 4,418
Quote:
Originally Posted by Myrsloik View Post
I think this was actually the original Avisynth strategy. Mostly due to processes at the time being very limited in the number of simultaneous dlls that could be loaded so if you stuffed the autoload directory full you could actually encounter this problem.
The limit was 50 DLLs and still is in AVS 2.6.1 Alpha.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 3rd June 2019, 13:19   #4705  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,067
What that sounds like is akin to the plugin cache index idea I'd proposed way way back when the fork had just happened. I can't even remember what the actual reason was; I think it may have been to save resource usage by not going through the 'autoload everything->unload everything->load only what the script uses' dance when the environment starts. Certainly nothing to do with files being locked (and because it's still autoloading everything at startup, it's not saving anything resource-wise).

Found it. And the actual reason: it was to avoid bad plugins (the example given was one of the versions of WarpSharp) crashing the environment even when they aren't being used in the script, just because they were being autoloaded.
qyot27 is offline   Reply With Quote
Old 3rd June 2019, 13:28   #4706  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,016
Quote:
Originally Posted by qyot27 View Post
What that sounds like is akin to the plugin cache index idea I'd proposed way way back when the fork had just happened. I can't even remember what the actual reason was; I think it may have been to save resource usage by not going through the 'autoload everything->unload everything->load only what the script uses' dance when the environment starts. Certainly nothing to do with files being locked (and because it's still autoloading everything at startup, it's not saving anything resource-wise).

Found it. And the actual reason: it was to avoid bad plugins (the example given was one of the versions of WarpSharp) crashing the environment even when they aren't being used in the script, just because they were being autoloaded.
As a bonus some compilers (looking at you borland) would change the FPU rounding mode so some other poor plugin would crash. Good times!
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 3rd June 2019, 15:26   #4707  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 1,285
well, it's still case problems https://github.com/pinterf/AviSynthP...ment-463595150 and https://forum.doom9.org/showpost.php...postcount=4508
__________________
My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 3rd June 2019, 16:01   #4708  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,126
Dont know if any longer the case, but,
I used to have problems with Script Function Named Difference(), (probably back in either v2.58 or early v2.6 Alpha), I tracked it down to similar named plug func
in (I think) one of Kassandro's dll's. No idea why, as Script Functions are supposed to Override dll which are supposed to Override Builtin.

I just renamed Script function to something else (ClipDelta which I figured would not be chosen by anyone else).

EDIT: (Plugin_Autoload_and_Name_Precedence AND Plugin Autoload and Conflicting Function Names ):- http://avisynth.nl/index.php/Plugins...ame_Precedence
__________________
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; 3rd June 2019 at 20:48.
StainlessS is offline   Reply With Quote
Old 4th June 2019, 16:36   #4709  |  Link
LouieChuckyMerry
Registered User
 
LouieChuckyMerry's Avatar
 
Join Date: Feb 2014
Posts: 322
Hello. After much kind help I've finally made the switch to AviSynth+ and native 16-bit, and I'm wondering if there's any way to improve my encoding speed. My usual script, on a quad-core x64 Windows 7 setup, using x86 MeGUI with x86 AviSynth+ and the latest versions of all necessary plugins-filters is:

Code:
DGSource Information Here
SetFilterMTMode("Default_MT_Mode",2)
SMDegrain(TR=x,ThSAD=xxx,RefineMotion=True,Plane=0,Chroma=False,n16=True,n16_Out=True)
FastLineDarkenMod4()
ConvertToDoubleWidth()
F3KDB(Y=100,Cb=100,Cr=100,GrainY=0,GrainC=0,Input_Mode=2,Output_Mode=2)
PreFetch(5)
# Sent To 10-bit x264
I ask because I'm achieving ~75% of the encoding speed I had with SEt's AviSynthMT and stacked 16-bit using older versions of the necessary plugins-filters, and I figure that I missed something along the way . Thanks for any suggestions.

Edit: Any ideas anyone?

Last edited by LouieChuckyMerry; 9th June 2019 at 18:33. Reason: System Info; Bump
LouieChuckyMerry is offline   Reply With Quote
Old 10th June 2019, 12:11   #4710  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 1,812
Just out of curiosity:

VirtualDub2 can load various filetypes (MKV, MPEG2, MP4, etc) instantly, without - I assume - having to do any indexing. Is there are any reason why an AviSynth source filter couldn't work the same way, so as to do away with the slow first load? Or is there a source plugin that already does this?
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 10th June 2019, 12:34   #4711  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,010
The only plugin I know of is LSMASHVideoSource. But it only supports ISO file containers, like *.mov, *.mp4, *.m4v, *.3gp, *.3g2, *.mj2, *.dvb, *.dcf, *.m21,
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database || https://github.com/avisynth-repository
ChaosKing is offline   Reply With Quote
Old 10th June 2019, 16:22   #4712  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,949
DirectShowSource , DSS2 can too , but it can be unreliable
poisondeathray is offline   Reply With Quote
Old 10th June 2019, 21:20   #4713  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 1,812
Quote:
Originally Posted by ChaosKing View Post
The only plugin I know of is LSMASHVideoSource. But it only supports ISO file containers, like *.mov, *.mp4, *.m4v, *.3gp, *.3g2, *.mj2, *.dvb, *.dcf, *.m21,
Hmm, so it probably shouldn't say "It uses FFmpeg (libavcodec) to decode all supported audio and video formats." on the wiki, then (the bold text links to an FFmpeg page).

I'm somewhat wary of a filter which throws an exception for a missing file, as well...
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 10th June 2019, 21:30   #4714  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,010
Quote:
Originally Posted by wonkey_monkey View Post
Hmm, so it probably shouldn't say "It uses FFmpeg (libavcodec) to decode all supported audio and video formats." on the wiki, then (the bold text links to an FFmpeg page).
As long the video is in a mp4 container it should be decoded. So not entirely false.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database || https://github.com/avisynth-repository
ChaosKing is offline   Reply With Quote
Old 11th June 2019, 00:53   #4715  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,067
It'd only be false if it said FFmpeg (libavformat, rather) was being used to demux it when using LSMASH[Video|Audio]Source. It isn't. LSMASH is demuxing it and passing the video and audio over to libavcodec. The LwLibav[Video|Audio]Source functions, on the other hand, do use only FFmpeg (libavformat->libavcodec).
qyot27 is offline   Reply With Quote
Old 11th June 2019, 05:10   #4716  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: Germany
Posts: 5,795
@pinterf

Maybe you like this idea too:

https://forum.doom9.org/showthread.p...02#post1876802
stax76 is offline   Reply With Quote
Old 11th June 2019, 08:01   #4717  |  Link
ryrynz
Registered User
 
ryrynz's Avatar
 
Join Date: Mar 2009
Posts: 3,206
Yeah please. 32-bit x86 can stop to stop being relevant.
ryrynz is offline   Reply With Quote
Old 11th June 2019, 08:31   #4718  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,245
Quote:
Originally Posted by LouieChuckyMerry View Post
using x86 MeGUI with x86 AviSynth+
[...]
I ask because I'm achieving ~75% of the encoding speed I had with SEt's AviSynthMT and stacked 16-bit using older versions of the necessary plugins-filters, and I figure that I missed something along the way . Thanks for any suggestions.

Edit: Any ideas anyone?
Without seeing the real memory consumption (avsmeter is a good help for that), I'd say that the default memory is too small for Prefetch(5). Try giving a larger SetMemoryMax value. Or change for x64.
pinterf is offline   Reply With Quote
Old 13th June 2019, 15:08   #4719  |  Link
LouieChuckyMerry
Registered User
 
LouieChuckyMerry's Avatar
 
Join Date: Feb 2014
Posts: 322
Quote:
Originally Posted by pinterf View Post
Without seeing the real memory consumption (avsmeter is a good help for that), I'd say that the default memory is too small for Prefetch(5). Try giving a larger SetMemoryMax value. Or change for x64.
Thanks for your reply, pinterf. I'll try various combinations of "SetMemoryMax()" and "PreFetch()" and see if I can improve my speed (and thanks for the AVSMeter reminder). I'm keen to try AviSynth+ x64; any suggestions for a good place to find the required x64 plugins-filters?
LouieChuckyMerry is offline   Reply With Quote
Old 13th June 2019, 18:07   #4720  |  Link
Zetti
Registered User
 
Join Date: Dec 2015
Location: Denmark
Posts: 207
http://avisynth.nl/index.php/AviSynth+_x64_plugins
Zetti is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:29.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.