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 22nd July 2017, 15:39   #3561  |  Link
Metal
Registered User
 
Join Date: Jun 2016
Posts: 9
Quote:
Originally Posted by LigH View Post
Then, next steps: download and unpack AVSMeter, and check
  • AVSMeter.exe -avsinfo
  • AVSMeter64.exe -avsinfo
  • AVSMeter.exe yourscript.avs
  • AVSMeter64.exe yourscript.avs
for error messages. I guess "the specified module" which is missing may be the Microsoft Visual C++ Runtime in the required version.
Yes!!! Finally!!!
Thank you so much LigH, I updated the Microsoft Visual C++ Runtime and it worked.
Metal is offline   Reply With Quote
Old 23rd July 2017, 15:13   #3562  |  Link
edcrfv94
Registered User
 
Join Date: Apr 2015
Posts: 44
Maybe auto one processes for each C/C++ filter(auto switch 32bit if 64bit not available) and auto adjustment prefetch and keep frames cache, can temporarily solve the multi-threaded problem until a new method appears.

Code:
colorbars(width = 1920, height = 1080, pixel_type = "yv12")

src = last
mcdn = src.kf_MCDegrainN(clip c, int "tr")

rfs(src, mcdn, mappings="[1000 2000] [3000 4000]") #Remap Frames

function kf_MCDegrainN(clip c, int "tr")
{	
	
	tr       = default(tr,          6)
	
	super  = MSuper(levels=0)

	multi_vec = MAnalyse(super, multi=true, delta=tr)
	
	c.MDeGrainN(super, multi_vec, tr)
	
	return last
}
Code:
colorbars(width = 1920, height = 1080, pixel_type = "yv12")

src = last

#1 processes prefetch 16 keep 14
#export last, src
#pass

mcdn = src.kf_MCDegrainN(clip c, int "tr")
	function kf_MCDegrainN(clip c, int "tr")
	{	
		
		tr       = default(tr,          6)
		
		super  = MSuper(levels=0)
		#2 processes prefetch 14 keep 12
		#export super
		#pass last, c

		multi_vec = MAnalyse(super, multi=true, delta=tr)
		#3 processes prefetch 12 keep 10
		#export multi_vec
		#pass last, c, super
		
		c.MDeGrainN(super, multi_vec, tr)
		#4 processes prefetch 10 keep 8
		#export last
		#pass
		
		return last
	}

rfs(src, mcdn, mappings="[1000 2000] [3000 4000]") #Remap Frames
#5 processes prefetch 8 keep 6
#export last
MP_Pipeline cann't pass audio, just for example.
Code:
MP_Pipeline("""
	
	SetMemoryMax(500)
	
	colorbars(width = 1920, height = 1080, pixel_type = "yv12")
	src = last
	
### export clip:src
### prefetch: 14,12
### ###

	SetMemoryMax(500)
	
	c = src
	super  = MSuper(levels=0)
	
### export clip:c, super
### pass clip:src
### prefetch: 12,10
### ###

	SetMemoryMax(500)
	
	multi_vec = MAnalyse(super, multi=true, delta=tr)
	
### export clip:multi_vec
### pass clip:src, c, super
### prefetch: 10,8
### ###
	
	SetMemoryMax(500)
	
	mcdn = c.MDeGrainN(super, multi_vec, tr)
	
### export clip:mcdn
### pass clip:src
### prefetch: 8,6
### ###
	
	SetMemoryMax(500)
	
	rfs(src, mcdn, mappings="[1000 2000] [3000 4000]") #Remap Frames
	
""")

Last edited by edcrfv94; 23rd July 2017 at 15:16.
edcrfv94 is offline   Reply With Quote
Old 23rd July 2017, 15:31   #3563  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 770
Quote:
Originally Posted by edcrfv94 View Post

MP_Pipeline cann't pass audio, just for example.
yes, Unfortunately

I wish someone did these changes https://github.com/SAPikachu/MP_Pipe...ment-269108878
__________________
My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 13th August 2017, 05:18   #3564  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 770
hi pinterf

when you back can you check this, I didn't note it before since I use mpp(MP_Pipeline) most of the time and by using mpp it seems to work!

edit: this one too https://forum.doom9.org/showpost.php...postcount=2709 since you will touch the autoload things

edit2: this one too https://forum.doom9.org/showthread.p...12#post1814912
__________________
My Avisynth Stuff

Last edited by real.finder; 13th August 2017 at 09:33.
real.finder is offline   Reply With Quote
Old 25th August 2017, 09:36   #3565  |  Link
junh1024
Registered User
 
Join Date: Mar 2011
Posts: 16
Really, how hard is it 2 make SSRC accept int16 in? Most of the audio tools (DAWs, VSTs, outside of avs) I use happily do format/bitdepth conversions silently.
junh1024 is offline   Reply With Quote
Old 1st September 2017, 12:02   #3566  |  Link
fenarinarsa
Registered User
 
Join Date: Jun 2015
Posts: 2
AddAutoLoadDir behavior changed

Hello everyone,

Since AVS+ 2502 the AddAutoLoadDir behavior changed.

Before this version, I could add 32bits and 64 bits DLLs (in two different folders) and AviSynth would load the correct ones depending on the environment it's working on. Because I currently must use an old x86 software and ffmpeg x64 at the same time from the same script.

Now it fires an error (cannot load DLL...) and stops there.

That a real issue for me since I generate an AVS+ script that should work in 32bits *and* 64bits and that I don't use the AVS+ default plugins dir (we have in-house developments).

In other word, this change in behavior breaks everything that was working quite well until now

I looked for a way of having conditionnal loading, but I couldn't find a variable that returns the current environment. Another way would be to add an optional argument to AddAutoLoadDir like "errors=false".

Am I missing something there ?


BTW I'm the technical director of a cable/DSL French TV channel and we've been using AviSynth and AVS+ for 9 years to generate our on-air & VOD/catch-up video graphics
I must say you're doing an awesome work. Last year I was thinking about ditching AVS because we had a lot of issues relating to memory management, HD, ffmpeg and QuickTime, but AVS+ saved it
demo => http://www.youtube.com/watch?v=ZbHMMxTcgec
fenarinarsa is offline   Reply With Quote
Old 1st September 2017, 12:21   #3567  |  Link
Groucho2004
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Location: Barcelona
Posts: 3,443
Quote:
Originally Posted by fenarinarsa View Post
Since AVS+ 2502 the AddAutoLoadDir behavior changed.

Before this version, I could add 32bits and 64 bits DLLs (in two different folders) and AviSynth would load the correct ones depending on the environment it's working on. Because I currently must use an old x86 software and ffmpeg x64 at the same time from the same script.
I guess you can blame me for this since I suggested to pinterf to add a check for the correct bitness of plugins in the auto-load directories.
A possible solution for this could be to modify the AddAutoLoadDir() functionality so the bitness check is omitted on the script level. This way, only the "hard coded" auto-load directories to which the registry entries point will be checked.

Last edited by Groucho2004; 1st September 2017 at 12:38.
Groucho2004 is offline   Reply With Quote
Old 1st September 2017, 13:30   #3568  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 713
Quote:
Originally Posted by fenarinarsa View Post

I looked for a way of having conditionnal loading, but I couldn't find a variable that returns the current environment. Another way would be to add an optional argument to AddAutoLoadDir like "errors=false".

Am I missing something there ?
Sorry for the inconvenience.

From version r2487 there is a new script function:

int GetProcessInfo([int type = 0])
Without parameter or type==0 the current bitness of Avisynth DLL is returned (32 or 64)
With type=1 the function can return a bit more detailed info:
-1: error, can't establish
0: 32 bit DLL on 32 bit OS
1: 32 bit DLL on 64 bit OS (WoW64 process)
2: 64 bit DLL

Usage:
LoadPlugin(GetProcessInfo == 32 ? "This32.dll" : "This64.dll")
pinterf is offline   Reply With Quote
Old 1st September 2017, 13:54   #3569  |  Link
Groucho2004
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Location: Barcelona
Posts: 3,443
Quote:
Originally Posted by pinterf View Post
Usage:
LoadPlugin(GetProcessInfo == 32 ? "This32.dll" : "This64.dll")
I don't think this is exactly what he's looking for, he want's to use auto-load. However, something like this maybe:
Code:
(GetProcessInfo == 32) ? AddAutoLoadDir("32BitplugsDir") : AddAutoLoadDir("64BitplugsDir")
Groucho2004 is offline   Reply With Quote
Old 1st September 2017, 15:05   #3570  |  Link
fenarinarsa
Registered User
 
Join Date: Jun 2015
Posts: 2
Quote:
Originally Posted by Groucho2004 View Post
I don't think this is exactly what he's looking for, he want's to use auto-load. However, something like this maybe:
Code:
(GetProcessInfo == 32) ? AddAutoLoadDir("32BitplugsDir") : AddAutoLoadDir("64BitplugsDir")
Thanks a lot! That's what I was looking for.
I read a few months ago that a function to return the bitness was added, but I couldn't find it in the documentation.

So it works now, time to deploy r2508

BTW I still didn't activate MT because I found some bugs. I suppose I can do bug reports here ? (it usually takes time because I do full reports with sample files)
fenarinarsa is offline   Reply With Quote
Old 1st September 2017, 15:11   #3571  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 713
Yes, we all like well documented bug reports Thanks.
pinterf is offline   Reply With Quote
Old 2nd September 2017, 14:43   #3572  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,214
Last OT posts moved to https://forum.doom9.org/showthread.php?t=174847
__________________
BeHappy, AviSynth audio transcoder, in Doom9 forums. NicAudio, BassAudio, audio decoders.
tebasuna51 is offline   Reply With Quote
Old 3rd September 2017, 17:25   #3573  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 6,192
I must be doing something wrong because I don't see any change with or without Prefetch(8). Speed,number of threads and memory consumption is identical.

script
Code:
#MT
Import("C:\Users\Dave\Documents\Delphi_Projects\RipBot264\_Compiled\Tools\AviSynth plugins\Scripts\MTmodes.avs")

#VideoSource
 
video=DirectShowSource("E:\_Video_Samples\mkv\drive_video_10min.mkv",audio=false).ConvertToYV12(matrix="rec709")

#Crop
video=Crop(video,0,140,-0,-140)


#Denoise
Loadplugin("C:\Users\Dave\Documents\Delphi_Projects\RipBot264\_Compiled\Tools\AviSynth plugins\mvtools\mvtools2.dll")
super=MSuper(video,pel=2)
fv1=MAnalyse(super,isb=false,delta=1,overlap=4)
bv1=MAnalyse(super,isb=true,delta=1,overlap=4)
fv2=MAnalyse(super,isb=false,delta=2,overlap=4)
bv2=MAnalyse(super,isb=true,delta=2,overlap=4)
video=MDegrain2(video,super,bv1,fv1,bv2,fv2,thSAD=400)

return video

prefetch(8)
Code:
AVSMeter 2.2.6 (x86)
AviSynth+ 0.1 (r2508, MT, i386) (0.1.0.0)
Loading script...

Number of frames:                14751
Length (hh:mm:ss.ms):     00:10:15.117
Frame width:                      1920
Frame height:                      800
Framerate:                      23.981 (10000/417)
Colorspace:                       YV12

Frame (current | last):         144 | 14750
FPS (cur | min | max | avg):    1.985 | 1.946 | 4.142 | 2.407
Memory usage (phys | virt):     287 | 336 MiB
Thread count:                   37
CPU usage (current | average):  8% | 6%

Time (elapsed | estimated):     00:01:00.231 | 01:42:07.361
without prefetch

Code:
AVSMeter 2.2.6 (x86)
AviSynth+ 0.1 (r2508, MT, i386) (0.1.0.0)
Loading script...

Number of frames:                14751
Length (hh:mm:ss.ms):     00:10:15.117
Frame width:                      1920
Frame height:                      800
Framerate:                      23.981 (10000/417)
Colorspace:                       YV12

Frame (current | last):         144 | 14750
FPS (cur | min | max | avg):    1.981 | 1.945 | 4.097 | 2.401
Memory usage (phys | virt):     287 | 336 MiB
Thread count:                   37
CPU usage (current | average):  7% | 6%

Time (elapsed | estimated):     00:01:00.384 | 01:42:22.926
Atak_Snajpera is offline   Reply With Quote
Old 3rd September 2017, 17:36   #3574  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 953
You have "return video" above prefetch in the filter chain. I think prefetch actually kinda is a pseudo-filter of its own, so it might matter - not sure though.
TheFluff is offline   Reply With Quote
Old 3rd September 2017, 17:41   #3575  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 6,192
Quote:
I think prefetch actually kinda is a pseudo-filter of its own, so it might matter - not sure though.
Yes! You are right! Prefetch acts like filter so this works now

Code:
#MT
Import("C:\Users\Dave\Documents\Delphi_Projects\RipBot264\_Compiled\Tools\AviSynth plugins\Scripts\MTmodes.avs")

#VideoSource
 
video=DirectShowSource("E:\_Video_Samples\mkv\drive_video_10min.mkv",audio=false).ConvertToYV12(matrix="rec709")

#Crop
video=Crop(video,0,140,-0,-140)


#Denoise
Loadplugin("C:\Users\Dave\Documents\Delphi_Projects\RipBot264\_Compiled\Tools\AviSynth plugins\mvtools\mvtools2.dll")
super=MSuper(video,pel=2)
fv1=MAnalyse(super,isb=false,delta=1,overlap=4)
bv1=MAnalyse(super,isb=true,delta=1,overlap=4)
fv2=MAnalyse(super,isb=false,delta=2,overlap=4)
bv2=MAnalyse(super,isb=true,delta=2,overlap=4)
video=MDegrain2(video,super,bv1,fv1,bv2,fv2,thSAD=400)

video=prefetch(video,8)
return video
Atak_Snajpera is offline   Reply With Quote
Old 4th September 2017, 10:07   #3576  |  Link
Groucho2004
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Location: Barcelona
Posts: 3,443
@Mod
Posts #3576 and onwards should be moved to the fft3dfilter thread.
Groucho2004 is offline   Reply With Quote
Old 4th September 2017, 20:42   #3577  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,214
Posts moved.
__________________
BeHappy, AviSynth audio transcoder, in Doom9 forums. NicAudio, BassAudio, audio decoders.
tebasuna51 is offline   Reply With Quote
Old 5th September 2017, 05:54   #3578  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 1,976
With the latest version of Avisynth+, I'm still unable to open script files names containing international character in MPC-HC; but the same files open fine in VirtualDub.

I thought this had been solved? Here's an example of file name: おどるポンポコリン.mp4
MysteryX is offline   Reply With Quote
Old 5th September 2017, 07:20   #3579  |  Link
Groucho2004
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Location: Barcelona
Posts: 3,443
Quote:
Originally Posted by MysteryX View Post
With the latest version of Avisynth+, I'm still unable to open script files names containing international character in MPC-HC; but the same files open fine in VirtualDub.

I thought this had been solved? Here's an example of file name: おどるポンポコリン.mp4
Not sure why your example has a .mp4 extension but opening a script "おどるポンポコリン.avs" works fine in mpc-hc even without switching the locale to Japanese. This is on XP.
Groucho2004 is offline   Reply With Quote
Old 5th September 2017, 15:20   #3580  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 6,192
Source: 3840x2160 AVC
CPU: E5-2690 (8C/16T)
RAM: 64 GiB
OS: Win7 x64
Avisynth+: r2508 x86
Code:
#MT
Import("C:\Users\Dave\Documents\Delphi_Projects\RipBot264\_Compiled\Tools\AviSynth plugins\Scripts\MTmodes.avs")

#VideoSource
video=DirectShowSource("E:\_Video_Samples\mp4\UHD_0035.MP4",audio=false).ConvertToYV12(matrix="rec709")

#Resize
video=Spline36Resize(video,1920,1080).Sharpen(0.2)

#Denoise
Loadplugin("C:\Users\Dave\Documents\Delphi_Projects\RipBot264\_Compiled\Tools\AviSynth plugins\mvtools\mvtools2.dll")
super=MSuper(video,pel=2)
fv1=MAnalyse(super,isb=false,delta=1,overlap=4)
bv1=MAnalyse(super,isb=true,delta=1,overlap=4)
fv2=MAnalyse(super,isb=false,delta=2,overlap=4)
bv2=MAnalyse(super,isb=true,delta=2,overlap=4)
video=MDegrain2(video,super,bv1,fv1,bv2,fv2,thSAD=400)

#Prefetch
video=Prefetch(video,X)

#Return
return video
I wonder why performance drops so heavily when process uses more than 2000 MiB of memory?

Code:
8 Threads
AVSMeter 2.2.6 (x86)
AviSynth+ 0.1 (r2508, MT, i386) (0.1.0.0)
Loading script...

Number of frames:                  420
Length (hh:mm:ss.ms):     00:00:14.014
Frame width:                      1920
Frame height:                     1080
Framerate:                      29.970 (5000000/166833)
Colorspace:                       YV12

Frames processed:               420 (0 - 419)
FPS (min | max | average):      0.581 | 472300 | 10.53
Memory usage (phys | virt):     1609 | 1800 MiB
Thread count:                   45
CPU usage (average):            52%

Time (elapsed):                 00:00:39.880
-------------------------------------------------------
14 Threads
AVSMeter 2.2.6 (x86)
AviSynth+ 0.1 (r2508, MT, i386) (0.1.0.0)
Loading script...

Number of frames:                  420
Length (hh:mm:ss.ms):     00:00:14.014
Frame width:                      1920
Frame height:                     1080
Framerate:                      29.970 (5000000/166833)
Colorspace:                       YV12

Frames processed:               420 (0 - 419)
FPS (min | max | average):      0.181 | 566759 | 12.38
Memory usage (phys | virt):     1784 | 1984 MiB
Thread count:                   51
CPU usage (average):            89%

Time (elapsed):                 00:00:33.925
-------------------------------------------------------
15 Threads
AVSMeter 2.2.6 (x86)
AviSynth+ 0.1 (r2508, MT, i386) (0.1.0.0)
Loading script...

Number of frames:                  420
Length (hh:mm:ss.ms):     00:00:14.014
Frame width:                      1920
Frame height:                     1080
Framerate:                      29.970 (5000000/166833)
Colorspace:                       YV12

Frames processed:               420 (0 - 419)
FPS (min | max | average):      0.196 | 472300 | 7.495
Memory usage (phys | virt):     1826 | 2016 MiB
Thread count:                   52
CPU usage (average):            57%

Time (elapsed):                 00:00:56.034
-------------------------------------------------------
16 Threads
AVSMeter 2.2.6 (x86)
AviSynth+ 0.1 (r2508, MT, i386) (0.1.0.0)
Loading script...

Number of frames:                  420
Length (hh:mm:ss.ms):     00:00:14.014
Frame width:                      1920
Frame height:                     1080
Framerate:                      29.970 (5000000/166833)
Colorspace:                       YV12

Frames processed:               420 (0 - 419)
FPS (min | max | average):      0.170 | 566760 | 6.253
Memory usage (phys | virt):     1850 | 2045 MiB
Thread count:                   53
CPU usage (average):            39%

Time (elapsed):                 00:01:07.169
Atak_Snajpera 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 01:32.


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