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

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 27th March 2017, 14:49   #3181  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
hi Pinterf

ColorYUV not work with float yet

I usually use it with ColorYUV(autogain=true)

and levels="TV->PC"
__________________
See My Avisynth Stuff
real.finder is offline  
Old 27th March 2017, 19:28   #3182  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Yes. This is a lut using filter, which is not available in float. O.k. I will make it work realtime.
Now I'm still working on masktools, finally decided to implement dup and swap in expressions as you have requested.
pinterf is offline  
Old 27th March 2017, 22:43   #3183  |  Link
olex99
Guest
 
Posts: n/a
Quote:
Originally Posted by pinterf View Post
Thanks, I was just wondering whether the processor has AVX or better capabilities (but not, it has only SSE4.2), because Avs+ can report AVX or better CPU flags to plugins, and that may result in a different code path. And if that code path would contain bug that can explain the different.

Another question for olex99, please set SetMemoryMax to 5000, and run the x64 avsmeter64 process to see how much memory is needed actually (it tops at a maximum, I don't expect to reach 5000). Maybe even 3000 is not enough (though you have said that no cache warning was seen in your logs). What are the frame dimensions (and format YV12?) of your clip?

Hi Pinterf, I've finally got back to the computer and managed to run some more tests. I upped the Max Memory to 6000 as at 3000 it was still showing the cache warning (although I'm sure I checked that), and they are definitely much closer to AVS 2.6 MT now. The source clup is 1080i/25 recording, it is reported as YUV in MediaInfo, however Avisynth reports it as YV12 using both DGSource and LWLibAVVideoSource.

Here are my results:

Code:
AviSynth 2.6 x86 (6000 Memory/6 Threads)

AviSynth 2.60, build:Feb 20 2015 [03:16:45] (2.6.0.5)

Number of frames:                 1001
Length (hh:mm:ss.ms):     00:00:40.040
Frame width:                      1920
Frame height:                     1080
Framerate:                      25.000 (25/1)
Colorspace:                       i420
Active MT Mode:                      2
Audio channels:                    n/a
Audio bits/sample:                 n/a
Audio sample rate:                 n/a
Audio samples:                     n/a

Frames processed:               1001 (0 - 1000)
FPS (min | max | average):      0.746 | 54568 | 4.025
Memory usage (phys | virt):     3669 | 3800 MiB
Thread count:                   33
CPU usage (average):            42%

Time (elapsed):                 00:04:08.668

Code:
AviSynth+ x64 (6000 Memory/6 Threads)

AviSynth+ 0.1 (r2455, MT, x86_64) (0.1.0.0)

Number of frames:                 1001
Length (hh:mm:ss.ms):     00:00:40.040
Frame width:                      1920
Frame height:                     1080
Framerate:                      25.000 (25/1)
Colorspace:                       i420
Audio channels:                    n/a
Audio bits/sample:                 n/a
Audio sample rate:                 n/a
Audio samples:                     n/a

Frames processed:               1001 (0 - 1000)
FPS (min | max | average):      0.323 | 33870 | 3.846
Memory usage (phys | virt):     3511 | 3589 MiB
Thread count:                   45
CPU usage (average):            43%

Time (elapsed):                 00:04:20.292
Code:
Avisynth+ x86 (6000 Memory/6 Threads)

AviSynth+ 0.1 (r2455, MT, i386) (0.1.0.0)

Number of frames:                 1001
Length (hh:mm:ss.ms):     00:00:40.040
Frame width:                      1920
Frame height:                     1080
Framerate:                      25.000 (25/1)
Colorspace:                       i420
Audio channels:                    n/a
Audio bits/sample:                 n/a
Audio sample rate:                 n/a
Audio samples:                     n/a

Frames processed:               1001 (0 - 1000)
FPS (min | max | average):      0.371 | 34464 | 4.083
Memory usage (phys | virt):     3536 | 3635 MiB
Thread count:                   45
CPU usage (average):            43%

Time (elapsed):                 00:04:05.167

It seems AviSynth+ is much more susceptible to low memory than AviSynth is so looks like I've just got to give it more to keep it happy, interestingly too AviSynth+ uses 12 more threads than AviSynth.

Is there anything I can do to get the x64 version running faster, even with a SetMaxMemory of 6000, x64 is slower than AVS 2.6MT with a SetMaxMemory of 2000. On the plus side, it is much more stable as I was regularly getting crashes with AVS 2.6MT, most likely due to running out of memory.

Here is my log for the AVS 2.6MT at SetMaxMemory 2000

Code:
AviSynth 2.60, build:Feb 20 2015 [03:16:45] (2.6.0.5)

Number of frames:                 1001
Length (hh:mm:ss.ms):     00:00:40.040
Frame width:                      1920
Frame height:                     1080
Framerate:                      25.000 (25/1)
Colorspace:                       i420
Active MT Mode:                      2
Audio channels:                    n/a
Audio bits/sample:                 n/a
Audio sample rate:                 n/a
Audio samples:                     n/a

Frames processed:               1001 (0 - 1000)
FPS (min | max | average):      0.717 | 60444 | 4.093
Memory usage (phys | virt):     2620 | 2715 MiB
Thread count:                   33
CPU usage (average):            43%

Time (elapsed):                 00:04:04.555
Thanks for your help
 
Old 29th March 2017, 04:16   #3184  |  Link
tuanden0
Registered User
 
Join Date: Oct 2016
Posts: 111
I'm using this chain here to upscale my 576p video to 720p and change some filter.
Here's my script:
Quote:
SetMemoryMax(8000)
SetFilterMtMode("MP_Pipeline", MT_SPECIAL_MT)
MP_Pipeline("""
### platform: win64
LWLibavVideoSource("E:\Download\test.mkv")
AssumeFPS(24000, 1001)
### ###
### platform: win32
Toon()
### ###
### platform: win64
Deblock(quant=33)
FluxSmoothST()
Spline64ResizeMT(1536,864)
### ###
### platform: win32
aWarpSharp(depth=12,blurlevel=4,thresh=0.3,cm=1)
LSFmod(edgemode=1,strength=200)
### ###
### platform: win64
FFT3dFilter(sigma=3.2, bt=1, ncpu=4)
### ###
### platform: win32
Dehalo_alpha()
### ###
### platform: win64
Spline64ResizeMT(1280,720)
### ###
""")
Then, Can someone help me to put Prefetch(4) to this script?
I tried to put it into my script but it crashed.
tuanden0 is offline  
Old 29th March 2017, 12:18   #3185  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
mp_pipeline has it's own prefetch function, see example here: https://forum.doom9.org/showthread.php?t=163281

btw aWarpSharp, dehalo_alpha and probably some other filters are x64 compatible...
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline  
Old 31st March 2017, 19:01   #3186  |  Link
djonline
Registered User
 
Join Date: Mar 2011
Posts: 40
I also have problem with deshaker on second pass, both x32 and x64. AvisynthPlus-r2455-MT.
1. If I simple call deshaker plugin, there is only one repeated frame in final video.
00114.MTS-pass2-64.avs
Code:
SetMemoryMax(3000) 
vid="00114.MTS"
o=DirectShowSource(vid).ConvertToRgb32(matrix="Rec709")
o+o.Trim(0,29) 
LoadVirtualDubPlugin ("c:\Program Files\Vdub\vdub64\plugins\Deshaker_64.vdf", "deshaker",0) 
deshaker ("18|2|30|4|1|0|1|0|640|480|1|2|1000|1000|2000|2000|4|0|0|2|8|30|300|3|00114.MTS.0.1000.1000.2000.2000.log|0|0|0|0|0|0|0|0|0|0|0|0|0|1|70|70|10|30|1|1|30|30|0|0|0|0|1|0|1|10|1000|1|88|1|0|20|5000|100|20|1")
If I call SetMemoryMax(6000), there is only blank screen.

If I call this avs from another avs to trim first 30 frames, vdub is crashed.
DirectShowSource("00114.MTS-pass2-64.avs").Trim(30,0)

UPDATE: Sorry, I forgot that MTS in avisynth not work with LAV splitter, so I install Haali media splitter and now all work ok, both x32 and x64 Deshaker in Avisynth+. Benchamark at https://forum.doom9.org/showpost.php...postcount=3192

Last edited by djonline; 2nd April 2017 at 16:16.
djonline is offline  
Old 1st April 2017, 00:05   #3187  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
@ djonline

I have a very OLD version of Deshaker, and it is version 19 [first arg in your list is 18].

Why do you think that you need SetMemoryMax(3000) with that script, [god forbid SetMemoryMax(6000)] ?
Script as given would not work (something like "Script does not return a clip" would be issued).
Where is the rest of the script ? (aint nobody gonna be able to help unless they see the script).

EDIT: https://forum.doom9.org/newreply.php...eply&p=1645218
Quote:
Originally Posted by IanB View Post
And the SetMemoryMax(2048) is a ridiculous value. As I keep telling people setting the size of the Avisynth frame cache bigger than what the current script needs is a waste.
EDIT: Also, on XP32 with 4GB, SetMemoryMax(2000) can sometime run out of memory (seldom), [or SetMemoryMax(1000), or SetMemoryMax(500)]
strangely, on P4 XP32 with 1GB, I've never once had an OMEM, ever (with defaulted memory max, EDIT: Unless down to eg plugin bug).

EDIT: At the very least you need a return o at end of script, also, good idea to wrap your script in CODE tags, click Advanced, select the script, click on hash (#).

EDIT: Just noticed this

Quote:
If I call this avs from another avs to trim first 30 frames, vdub is crashed.
DirectShowSource("00114.MTS-pass2-64.avs").Trim(30,0)
Dont think you would have too much luck loading an Avisynth script via DirectShowSource, Try Import() instead.
Also, you add 30 frames to END of original clip with o+trim(0,29)
and then DirectShowSource("00114.MTS-pass2-64.avs").Trim(30,0) which trims off the FIRST 30 frames, is that intentional ?
__________________
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; 1st April 2017 at 12:46.
StainlessS is offline  
Old 2nd April 2017, 12:42   #3188  |  Link
djonline
Registered User
 
Join Date: Mar 2011
Posts: 40
There is last Deshaker 3.1. I think first argument, 18 or 19, is not used.
Of course I try with and without SetMemoryMax.
This is full script, no any other lines. May be you don't have 00114.MTS.0.1000.1000.2000.2000.log on this second pass when you try it.
I have windows 10.
vdub.vcf
Code:
VirtualDub.Open("00114.MTS-loader.avs", 0, 0);
 VirtualDub.audio.SetSource("00114.MTS.ac3");
VirtualDub.audio.SetMode(0); 
VirtualDub.audio.SetClipMode(1, 1); 
VirtualDub.audio.SetConversion(0, 0, 0, 0, 0); 
VirtualDub.audio.SetVolume(); 
VirtualDub.audio.SetCompression(); 
VirtualDub.audio.EnableFilterGraph(0); 
VirtualDub.audio.filters.Clear();
VirtualDub.audio.SetInterleave(1, 500, 1, 0, 0); 
VirtualDub.video.SetDepth(24, 24); 
VirtualDub.video.SetOutputFormat(0); 
VirtualDub.video.SetMode(1); 
VirtualDub.video.SetFrameRate2(0,0,1); 
VirtualDub.video.SetIVTC(0, 0, -1, 0);     
VirtualDub.video.SetCompression(0x7967616d,0,10000,0);
VirtualDub.video.SetCompData(68,"CAAAAAgAAAABAAAABAAAAAIAAAD/////AAAAAAIAAABpAAAAAAAAABkAAAAJAAAAAQAAAAEAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAABAAAA"); 
VirtualDub.video.filters.Clear(); VirtualDub.SaveAVI("00114.MTS-deshaked.1.2000.2000.2000.2000.avi"); 
VirtualDub.Close();
00114.MTS-loader.avs
Code:
DirectShowSource("00114.MTS-pass2-64.avs").Trim(30,0)
I use option "Use previous and future frames to fill in borders", so I must trim first 30 frames and add last 30 frames. But there is no way to do this in ony avs script, Deshaker always add first 30 empty frames, even I if add Trim(30,0) after Deshaker call, so I must use another script named 'loader'.
Vdub crush info in attach.
Attached Files
File Type: txt crashinfo.txt (8.3 KB, 27 views)

Last edited by djonline; 2nd April 2017 at 12:57.
djonline is offline  
Old 2nd April 2017, 13:02   #3189  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
So you use VirtualDub to load an AviSynth script that loads another AviSynth script via DirectShowSource...
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline  
Old 2nd April 2017, 13:33   #3190  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
There is last Deshaker 3.1. I think first argument, 18 or 19, is not used.
The version number tells Deshaker what version script it is, so it will complain if wrong version, it should be for the version that you use,
which apparently is version 18 (not latest for sure).

Suggest that you change
Code:
DirectShowSource("00114.MTS-pass2-64.avs").Trim(30,0)
to
Code:
Import("00114.MTS-pass2-64.avs").Trim(30,0)
We still dont know what is in that 00114.MTS-pass2-64.avs script, if it is a Deshaker pass 1 script, it aint gonna work,
because pass 1 create Deshaker log for 2nd pass of Deshaker, and is not available until pass 1 has completed.

Also, note, if you have
Code:
o=DirectShowSource(vid).ConvertToRgb32(matrix="Rec709")
o+o.Trim(0,29)
in your first pass, and then use add a Trim(30,0) to end first pass before doing 2nd pass, then you Deshaker log will be 30 frames in error
and deshaker will dehake almost everything wrongly (as its using deshaker data for the wrong frames).

EDIT: Sorry, you said that this is the script,
Code:
SetMemoryMax(3000)
vid="00114.MTS"
o=DirectShowSource(vid).ConvertToRgb32(matrix="Rec709")
o+o.Trim(0,29)
LoadVirtualDubPlugin ("c:\Program Files\Vdub\vdub32\plugins32\Deshaker.vdf", "deshaker",0) deshaker
 ("18|2|30|4|1|0|1|0|640|480|1|2|1000|1000|2000|2000|4|0|0|2|8|30|300|3|00114.MTS.0.1000.1000.2000.2000.log"
"|0|0|0|0|0|0|0|0|0|0|0|0|0|1|70|70|10|30|1|1|30|30|0|0|0|0|1|0|1|10|1000|1|88|1|0|20|5000|100|20|1")
NOTE, That is a PASS 2 Script.

EDIT: Can you just state in words what it is that you are trying to do.

EDIT: OK, re-read everything, think I understand. Just Load the script above into VirtualDub and forget altogether about the "00114.MTS-loader.avs" script (But reduce the massive SetMemoryMax thing)
__________________
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 April 2017 at 13:57.
StainlessS is offline  
Old 2nd April 2017, 16:13   #3191  |  Link
djonline
Registered User
 
Join Date: Mar 2011
Posts: 40
Sorry, I forgot that MTS in avisynth not work with LAV splitter, so I install Haali media splitter and now all work ok, both x32 and x64 Deshaker in Avisynth+.
So now I can post my benchmarks of x32 and x64 Deshaker:
1 pass: x32 - 36s, x64 - 21s, speedup 71%
2 pass :x32 - 30s, x64 - 20s, speedup 50%

Source 1080/60p from Sony RX100 28mbit, 8s length, output to MagicYUV 4:2:0 lossless.

Last edited by djonline; 2nd April 2017 at 16:39.
djonline is offline  
Old 2nd April 2017, 19:26   #3192  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
I get error like this https://forum.doom9.org/showpost.php...postcount=2372

with TDecimate and MT, is this bug didn't fixed yet?
__________________
See My Avisynth Stuff
real.finder is offline  
Old 2nd April 2017, 19:37   #3193  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 377
I confirm that.
As a temporary solution I do tfm/tdecimate filtering via x86 avs+ and w/o Prefetch, transmit output with TCPDeliver, process anything else with x64 avs+ (and Prefetch).
DJATOM is offline  
Old 2nd April 2017, 19:39   #3194  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by DJATOM View Post
I confirm that.
As a temporary solution I do tfm/tdecimate filtering via x86 avs+ and w/o Prefetch, transmit output with TCPDeliver, process anything else with x64 avs+ (and Prefetch).
I am do same thing but with mp_pipeline
__________________
See My Avisynth Stuff
real.finder is offline  
Old 3rd April 2017, 09:25   #3195  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
Hi bit conversion

Hi all!
I am new in high bit conversion, advice how convert from avs+ 16 bit to Avisynth 16 bit hack (for use inside KNLMeansCL plugin) and back. I could use dither or last avs+ make this by self?
yup.
yup is offline  
Old 3rd April 2017, 11:58   #3196  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 377
Do your 16bit native filtering
Converttostacked()
Do stacked filtering
Convertfromstacked()
Do another HBD native filtering

It's simple as that.
DJATOM is offline  
Old 3rd April 2017, 12:19   #3197  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
DJATOM! yup.
yup is offline  
Old 4th April 2017, 14:27   #3198  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
Hi all!
Advice also easy way for import hi bit image to Avisynth+.
yup.
yup is offline  
Old 4th April 2017, 14:38   #3199  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
You mean, reading a (sequence of) 48 bit PNG/TIFF as source (like raw footage of Blender render movies)?
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline  
Old 4th April 2017, 15:19   #3200  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
LigH!
Yes! For starting point I want filtering film scanned grey scale 16 bit image using non local means filter.
yup.

Last edited by yup; 5th April 2017 at 09:03.
yup is offline  
Closed Thread

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 00:44.


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