View Full Version : Avisynth 2.6 MT
Pages :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[
20]
21
22
l33tmeatwad
15th March 2015, 19:40
The installer works just like the regular AviSynth installer, but it uses the latest MT dll instead of the regular AviSynth.dll
Sent from my SCH-I545 using Tapatalk
LouieChuckyMerry
6th April 2015, 13:16
Hello, and thanks in advance for any help. And an extra thank you for SEt :) . I'm preparing to encode my early seasons Simpsons DVD's, but I'm having trouble with AviSynth 2.6 MT. On my Windows 7 64 bit, hyperthreaded i7 3840QM, 16GB RAM, Intel HD Graphics 4000-NVIDIA NVS 5400M setup, with the absolute minimum of necessary plugins, I can successfully complete the following script:
SetMemoryMax(400)
SetMTMode(3,8)
LoadPlugin("F:\[0]StandAloneApps\MeGUI-2500(core)2443(data)0.3.5(libs)[Portable]\tools\ffms\ffms2.dll")
FFVideoSource("D:\Temp\S1.E1-OriginalVideo[NTSC].mkv", fpsnum=30000, fpsden=1001, threads=1)
### Deinterlace ###
SetMTMode(2)
LoadPlugin("F:\[0]StandAloneApps\MeGUI-2500(core)2443(data)0.3.5(libs)[Portable]\tools\avisynth_plugin\TIVTC.dll")
TFM(Order=0,Slow=2,PP=0).TDecimate(Mode=1)
Vinverse()
### Deshaker ###
Stab(Mirror=15)
### Crop ###
Crop(8,0,-8,0)
### Resize ###
RatioResize(10/11.0,"PAR")
### Gibbs Noise Block ###
Edge=MT_Edge("prewitt",thY1=20,thY2=40).RemoveGrain(17)
Mask=MT_Logic(Edge.MT_Expand().MT_Expand().MT_Expand().MT_Expand(),Edge.MT_Inflate().MT_Inpand(),"xor")
MT_Merge(dfttest(),Mask,Luma=True)
### Overall Temporal Denoise ###
SMDegrain(tr=2,thSAD=600,ContraSharp=True,RefineMotion=True,Plane=0,Lsb_Out=True,PreFilter=2)
### Debanding ###
GradFun3(thR=0.55,Radius=12,Mask=2,SMode=1,Lsb=True,Lsb_In=True, StaticNoise=True,Y=3,U=3,V=3)
DitherPost(Stacked=True,Prot=False,Mode=0)
### Line Darkener And Thinner ###
FastLineDarkenMod(Strength=20,Prot=6,Thinning=0)
aWarpSharp2(Blur=4,Type=1,Depth=3,Chroma=2)
However, using the exact same AviSynth 2.6 MT-MeGUI-absolute minimum necessary plugins combination on my Windows 7 64 bit, hyperthreaded i5 3320M, 8GB RAM, Intel HD Graphics 4000-NVIDIA NVS 5400M setup, every possible dual-core modification to the above script that I've tried fails eventually, some sooner than others ;) . After reading the first page and the last 29 pages of this thread I've tried:
1) SetMemoryMax from disabled to (400) in increments of 100; 100 was slower than non-MT mode, 200 failed after about 40%, 300 failed sooner, 400 failed much sooner, always the failure was relatively gradual with the fps dropping until the time remaining counter started going backwards :( .
2) I've tried the above SetMemoryMax numbers with the initial SetMTMode as SetMTMode(3,4), SetMTMode(3), SetMTMode(5,4), and SetMTMode(5); I've also tried applying SetMTMode(5) for TIVTC and SetMTMode(2) for the rest. All resulted in failure, usually the slow fade to standstill, but occasionally an "avs4x264mod.exe has stopped working" message.
3) I've tried adding Preroll(25) and Preroll(100) to the script, both failed.
I'd very much like to get this script to run in MT mode on my dual-core laptop, but my very limited knowledge has been exhausted, leading me here. Please, does anybody have any suggestions (to make the script work, ha ha)? Thanks for your time.
Groucho2004
6th April 2015, 14:18
1) SetMemoryMax from disabled to (400) in increments of 100; 100 was slower than non-MT mode, 200 failed after about 40%, 300 failed sooner, 400 failed much sooner, always the failure was relatively gradual with the fps dropping until the time remaining counter started going backwards :( .
Just a couple of observations/suggestions:
There is no "disabled" state for SetMemoryMax. If you don't specify it, the default is 512 (MB). Since you're piping on a 64 Bit OS, you should allocate more memory to Avisynth - 1024 for example. You have almost 4GB available exclusive for Avisynth in your scenario.
Your script is very complex, involving a large number of plugins. Try to isolate the problem by adding functions step by step. Start with TFM, then denoise, then De-Band. Don't use megui to test the script. Use AVSMeter for testing which excludes the encoding part.
LouieChuckyMerry
7th April 2015, 01:21
There is no "disabled" state for SetMemoryMax. If you don't specify it, the default is 512 (MB).
I didn't notice this on the first page, thanks for the information.
Since you're piping on a 64 Bit OS, you should allocate more memory to Avisynth - 1024 for example. You have almost 4GB available exclusive for Avisynth in your scenario.
Interesting. It's seemed to me that I've been running out of (using too much) memory, but perhaps I'm not allotting enough? I thought this because on my quad-core laptop "SetMemoryMax(512)" fails but "SetMemoryMax(400) succeeds. :confused:
Your script is very complex, involving a large number of plugins. Try to isolate the problem by adding functions step by step. Start with TFM, then denoise, then De-Band. Don't use megui to test the script. Use AVSMeter for testing which excludes the encoding part.
I've been using MeGUI for testing because I figure if it succeeds I've one less episode to encode :D . I checked AVSMeter out (thanks again, great tool) and understand how to use it, but I'm not sure how to interpret the results. What would I look for?
Thanks for your help, Groucho2004 :) .
Groucho2004
7th April 2015, 09:04
I thought this because on my quad-core laptop "SetMemoryMax(512)" fails but "SetMemoryMax(400) succeeds. :confused:
Yes, that seems odd. You'll just have to experiment with the numbers.
I checked AVSMeter out (thanks again, great tool) and understand how to use it, but I'm not sure how to interpret the results. What would I look for?
Does it slow down and/or stall as it does in megui? If so, at what point in terms of enabled plugins does that happen?
LouieChuckyMerry
7th April 2015, 13:56
Yes, that seems odd. You'll just have to experiment with the numbers.
I think I need to gain a better understanding of virtual memory in windows 7.
Does it slow down and/or stall as it does in megui? If so, at what point in terms of enabled plugins does that happen?
This script:
SetMemoryMax(1024)
SetMTMode(5,4)
LoadPlugin("F:\[0]StandAloneApps\MeGUI-2500(core)2443(data)0.3.5(libs)[Portable]\tools\ffms\ffms2.dll")
FFVideoSource("D:\Temp\[0000]ReEncTemp\TheSimpsons-S1[S][Commentary]{1989-90}[480p][NTSC]\S1.E7-TheCallOfTheSimpsons[S][Commentary][480p]\S1.E7-OriginalVideo,OriginalAudios[NTSC].mkv", fpsnum=30000, fpsden=1001, threads=1)
### Deinterlace ###
SetMTMode(2)
LoadPlugin("F:\[0]StandAloneApps\MeGUI-2500(core)2443(data)0.3.5(libs)[Portable]\tools\avisynth_plugin\TIVTC.dll")
TFM(Order=0,Slow=2,PP=0).TDecimate(Mode=1)
# SetMTMode(2)
Vinverse()
### Deshaker ###
Stab(Mirror=15)
### Crop ###
Crop(8,0,-8,0)
### Resize ###
RatioResize(10/11.0,"PAR")
### Gibbs Noise Block ###
Edge=MT_Edge("prewitt",thY1=20,thY2=40).RemoveGrain(17)
Mask=MT_Logic(Edge.MT_Expand().MT_Expand().MT_Expand().MT_Expand(),Edge.MT_Inflate().MT_Inpand(),"xor")
MT_Merge(dfttest(),Mask,Luma=True)
### Overall Temporal Denoise, Could Probably Be Optimized ###
#SMDegrain(tr=2,thSAD=600,ContraSharp=True,RefineMotion=True,Plane=0,Lsb_Out=True,PreFilter=2)
### Debanding ###
#GradFun3(thR=0.55,Radius=12,Mask=2,SMode=1,Lsb=True,Lsb_In=True, StaticNoise=True,Y=3,U=3,V=3)
#DitherPost(Stacked=True,Prot=False,Mode=0)
### Line Darkener And Thinner ###
#FastLineDarkenMod(Strength=20,Prot=6,Thinning=0)
#aWarpSharp2(Blur=4,Type=1,Depth=3,Chroma=2)
finished successfully with AVSMeter, but when I added the denoising block and tried again it eventually stalled like it's does in MeGUI (I had to kill the process so there's no log). Also, the same script (with the added noise block) but with SetMemoryMax(2048) started very fast but didn't finish. I've run so many tests that I'm becoming (more) confused.
I'm wondering if I need to reboot before every attempt so that the physical and virtual memories are both primed and ready to go, because it seems like each successive test fails sooner than the last. Of course, this could just be what's left of my mind playing tricks on me, ha ha. I need improved organization of failed scripts, maybe I'll hire a secretary ;) , one who can explain virtual memory to me...
Groucho2004
7th April 2015, 14:54
This script:
SetMemoryMax(1024)
SetMTMode(5,4)
LoadPlugin("F:\[0]StandAloneApps\MeGUI-2500(core)2443(data)0.3.5(libs)[Portable]\tools\ffms\ffms2.dll")
FFVideoSource("D:\Temp\[0000]ReEncTemp\TheSimpsons-S1[S][Commentary]{1989-90}[480p][NTSC]\S1.E7-TheCallOfTheSimpsons[S][Commentary][480p]\S1.E7-OriginalVideo,OriginalAudios[NTSC].mkv", fpsnum=30000, fpsden=1001, threads=1)
### Deinterlace ###
SetMTMode(2)
LoadPlugin("F:\[0]StandAloneApps\MeGUI-2500(core)2443(data)0.3.5(libs)[Portable]\tools\avisynth_plugin\TIVTC.dll")
TFM(Order=0,Slow=2,PP=0).TDecimate(Mode=1)
# SetMTMode(2)
Vinverse()
### Deshaker ###
Stab(Mirror=15)
### Crop ###
Crop(8,0,-8,0)
### Resize ###
RatioResize(10/11.0,"PAR")
### Gibbs Noise Block ###
Edge=MT_Edge("prewitt",thY1=20,thY2=40).RemoveGrain(17)
Mask=MT_Logic(Edge.MT_Expand().MT_Expand().MT_Expand().MT_Expand(),Edge.MT_Inflate().MT_Inpand(),"xor")
MT_Merge(dfttest(),Mask,Luma=True)
### Overall Temporal Denoise, Could Probably Be Optimized ###
#SMDegrain(tr=2,thSAD=600,ContraSharp=True,RefineMotion=True,Plane=0,Lsb_Out=True,PreFilter=2)
### Debanding ###
#GradFun3(thR=0.55,Radius=12,Mask=2,SMode=1,Lsb=True,Lsb_In=True, StaticNoise=True,Y=3,U=3,V=3)
#DitherPost(Stacked=True,Prot=False,Mode=0)
### Line Darkener And Thinner ###
#FastLineDarkenMod(Strength=20,Prot=6,Thinning=0)
#aWarpSharp2(Blur=4,Type=1,Depth=3,Chroma=2)
finished successfully with AVSMeter, but when I added the denoising block and tried again it eventually stalled like it's does in MeGUI (I had to kill the process so there's no log). Also, the same script (with the added noise block) but with SetMemoryMax(2048) started very fast but didn't finish.
I don't know SMDegrain so I suggest you address the author about the issue.
I'm wondering if I need to reboot before every attempt so that the physical and virtual memories are both primed and ready to go, because it seems like each successive test fails sooner than the last.
No need to reboot. Once the process finishes (even if killed), all memory is released.
Ajvar
7th April 2015, 17:48
For your kind of work you better try Xvid4PSP 5 (https://code.google.com/p/xvid4psp/). It has built-in Preview if you don't use script view so you don't need to do smth to test, it just tells you what is missing in script if smth goes wrong with it.
There is Avisynth>MT tab where you can set stuff including "Distributor".
LouieChuckyMerry
8th April 2015, 03:46
No need to reboot. Once the process finishes (even if killed), all memory is released.
Thanks for the confirmation, Groucho2004.
Avisynth MT can crash or deadlock if many MT Masktools plugins are in the script. I tried to play with this since 2.5.8 MT, but unsuccessfully. Probably MT Masktools has a bug.
This was in the back of my mind, thanks for dislodging it ;) . I'm currently using TurboPascal7's (http://forum.doom9.org/showthread.php?p=1655989#post1655989) MT mod of Masktools2; I'll check things out with Vit's (http://forum.doom9.org/showpost.php?p=1423459) MT mod and see if things improve.
So I separate processing to different phases to fix this issue.
Also ffms2 runs better with Avisynth MT in 1 thread. Try to change it to LSMASHVideoSource (or LWLibavVideoSource). It works better with MT in my knowledge.
This raises another question I've been meaning to ask: I use FFMS2-Mkv because that's what I happened upon when I began using AviSynth. Would there be an actual speed-stability advantage to DGIndex(NV)-VOB or, as you suggest, LSMASHWorks. Would I use LSMASHWorks with Mkvs or VOBs?
LigH
8th April 2015, 07:45
L-SMASH Source will support single input files better than a group of segments. You may extract a movie PGC from a DVD (with a ripper in Movie/IFO mode or PGCDemux) to a contiguous "PGC VOB", but I doubt it will read a group of max-1-GB VOBs.
LouieChuckyMerry
8th April 2015, 11:35
L-SMASH Source will support single input files better than a group of segments. You may extract a movie PGC from a DVD (with a ripper in Movie/IFO mode or PGCDemux) to a contiguous "PGC VOB", but I doubt it will read a group of max-1-GB VOBs.
Would you be willing to translate that, LigH ;) ? Seriously, I think I understand, but I'm not 100% sure what you mean. Each episode I'm wanting to encode is presently an Mkv file, but I could just as easily revert to the single-episode VIDEO_TS.VOB files if the results would be better. After a day of testing, indexing the Mkv's with LSMASHWorks is proving to be a much more functional option than FFMS2; AviSynth 2.6 MT has been much more stable (and a bit faster) with this method.
LigH
8th April 2015, 11:40
In brief: With FFMS2 or L-SMASH Source, do prefer MKVs. With DG, VOB files will work too (but you should have extracted "the main movie" from a DVD, not simply used them as they were on DVD).
LouieChuckyMerry
8th April 2015, 12:12
In brief: With FFMS2 or L-SMASH Source, do prefer MKVs. With DG, VOB files will work too (but you should have extracted "the main movie" from a DVD, not simply used them as they were on DVD).
I'm dealing with ~23 minute episodes, each of which is a single VOB file, so there's no issue. In your opinion, which is the best approach with AviSynth 2.6 MT: Mkv-FFMS2, Mkv-LSMASH, or VOB-DG?
LouieChuckyMerry, TurboPascal7's MT mod also has this issue. I got deadlocks yesterday. I have many masking to keep quality - so I have many threads for each filter instance - the result: many chance to get fail. I have a top Intel i7 cpu. Not sure that it is your case, but I see your script is very complex.
Where did you get this "deadlocks" mod, hey hey! Share with the rest of us, don't keep it to yourself! ;)
LSMASHVideoSource works with mp4 and mov, but has LWLibavVideoSource in the same dll. It should open any video. To use LSMASHVideoSource if really need, you can rewrap videos to mov using ffmpeg. It is fast. But some videos, i.e. from Sony NEX5 25p, still require DSS2. For speed processing, all non-compatible videos can be extracted to lossless h.264 or utcodec.
LSMASH has been working very well with my Mkv's in MeGUI, actually better than FFMS2, so that's not a problem (thanks again for the suggestion :) ). I'm just wondering, given that LSMASH is superior to FFMS2, which, in your opinion, is better with AviSynth 2.6 MT: LSMASH-Mkv or DG-VOB?
Thank you for your help.
LouieChuckyMerry
8th April 2015, 12:13
PS. L-SMASH Source is compatible with MT mode 2.
Is this good because it would be faster? More stable?
Boulder
8th April 2015, 12:27
For VOBs I definitely recommend DGMPGDec. Just use at least SetMTMode(3) before the source filter.
LouieChuckyMerry
8th April 2015, 12:35
For VOBs I definitely recommend DGMPGDec. Just use at least SetMTMode(3) before the source filter.
Thanks for your input, Boulder (you Animal(s) :) ). Do you think a DG-VOB combination would be a speed-stability improvement over LSMASH-Mkv?
Boulder
8th April 2015, 12:49
It's very stable, I don't think I've ever had it crash, and does support random seeking without any issues. If you have the cash to spare, you can buy a license of DGDecNV and utilize an NVidia GPU to decode MPEG2, VC-1 or H264 streams.
LouieChuckyMerry
8th April 2015, 13:03
I've an NVIDIA GPU, but is the gain worth the money, do you think, for DGDecNV?
Boulder
8th April 2015, 13:23
Not for MPEG2 streams, but if convert Blu-rays with VC-1 or MPEG4 AVC video, it's a good investment. In fact, it's the only thing I've used for those.
LigH
8th April 2015, 13:30
The issue with VOB files is not only if the clip fits in a GByte (the limit of the ISO-9660 file system). There is also an issue when the VOB does not contain the clip only, but more (e.g. pre- and post-stills or even -trailers to enable authoring trickery or annoy paying customers); not to mention advanced authoring features like Multi-Angle or Seamless Branching. Always extract one PGC with one angle so that source plugins which don't interpret IFO files on their own can handle the result.
LouieChuckyMerry
8th April 2015, 13:47
Not for MPEG2 streams, but if convert Blu-rays with VC-1 or MPEG4 AVC video, it's a good investment. In fact, it's the only thing I've used for those.
Thanks for that :) .
The issue with VOB files is not only if the clip fits in a GByte (the limit of the ISO-9660 file system). There is also an issue when the VOB does not contain the clip only, but more (e.g. pre- and post-stills or even -trailers to enable authoring trickery or annoy paying customers); not to mention advanced authoring features like Multi-Angle or Seamless Branching. Always extract one PGC with one angle so that source plugins which don't interpret IFO files on their own can handle the result.
Thanks for the detailed information. Luckily my NTSC DVD's are old and simple ;) .
Seedmanc
8th April 2015, 23:17
I wouldn't be wasting money on daiz. Just my 2c, but you're the boss.
LigH
10th April 2015, 08:00
Older FFMS2 will read only MKV without too many restraints. DGDec{NV|IM} should read MKV too (DGMPGDec not yet).
LouieChuckyMerry
12th April 2015, 08:02
With the help of the kind people here and extensive testing (special thanks to Groucho2004's AVSMeter :) ), I'm now able to run my script in AviSynth 2.6 MT with seeming stability on my dual-core and quad-core laptops (encoding directly to x264, no intermediary). Thank you all for your help! :thanks: In case someone someday finds this information useful, and seeing as how no paper is being wasted:
1) Windows 7 64 bit, hyperthreaded i5 3320M, 8GB RAM setup. The following script successfully runs multiple queued encodes in MeGUI, achieving ~2.65 FPS, a three-times improvement over normal AviSynth's ~0.85 FPS:
SetMemoryMax(256)
SetMTMode(3,3)
LoadPlugin("F:\[0]StandAloneApps\MeGUI-2500(core)2443(data)0.3.5(libs)[Portable]\tools\lsmash\LSMASHSource.dll")
LWLibavVideoSource("D:\Temp\S1.E1-OriginalVideo[NTSC].mkv")
SetMTMode(2)
### Deinterlace ###
LoadPlugin("F:\[0]StandAloneApps\MeGUI-2500(core)2443(data)0.3.5(libs)[Portable]\tools\avisynth_plugin\TIVTC.dll")
TFM(Order=0,Slow=2,PP=0).TDecimate(Mode=1)
Vinverse()
### Deshaker ###
Stab(Mirror=15)
### Crop ###
Crop(8,0,-8,0)
### Resize ###
RatioResize(10/11.0,"PAR")
### Gibbs Noise Block ###
Edge=MT_Edge("prewitt",thY1=20,thY2=40).RemoveGrain(17)
Mask=MT_Logic(Edge.MT_Expand().MT_Expand().MT_Expand().MT_Expand(),Edge.MT_Inflate().MT_Inpand(),"xor")
MT_Merge(dfttest(),Mask,Luma=True)
### Overall Temporal Denoise, Could Probably Be Optimized ###
SMDegrain(tr=2,thSAD=600,ContraSharp=True,RefineMotion=True,Plane=0,Lsb_Out=True,PreFilter=2)
### Debanding ###
GradFun3(thR=0.55,Radius=12,Mask=2,SMode=1,Lsb=True,Lsb_In=True, StaticNoise=True,Y=3,U=3,V=3)
DitherPost(Stacked=True,Prot=False,Mode=0)
### Line Darkener And Thinner ###
FastLineDarkenMod(Strength=20,Prot=6,Thinning=0)
aWarpSharp2(Blur=4,Type=1,Depth=3,Chroma=2)
2) Windows 7 64 bit, hyperthreaded i7 3840QM, 16GB RAM setup. The following script successfully runs multiple queued encodes in MeGUI, achieving ~5.1 FPS, a not-quite two-times improvement over normal AviSynth's ~2.8 FPS:
SetMemoryMax(512)
SetMTMode(3,6)
LoadPlugin("F:\[0]StandAloneApps\MeGUI-2500(core)2443(data)0.3.5(libs)[Portable]\tools\lsmash\LSMASHSource.dll")
LWLibavVideoSource("D:\Temp\S1.E1-OriginalVideo[NTSC].mkv")
SetMTMode(2)
### Deinterlace ###
LoadPlugin("F:\[0]StandAloneApps\MeGUI-2500(core)2443(data)0.3.5(libs)[Portable]\tools\avisynth_plugin\TIVTC.dll")
TFM(Order=0,Slow=2,PP=0).TDecimate(Mode=1)
Vinverse()
### Deshaker ###
Stab(Mirror=15)
### Crop ###
Crop(8,0,-8,0)
### Resize ###
RatioResize(10/11.0,"PAR")
### Gibbs Noise Block ###
Edge=MT_Edge("prewitt",thY1=20,thY2=40).RemoveGrain(17)
Mask=MT_Logic(Edge.MT_Expand().MT_Expand().MT_Expand().MT_Expand(),Edge.MT_Inflate().MT_Inpand(),"xor")
MT_Merge(dfttest(),Mask,Luma=True)
### Overall Temporal Denoise, Could Probably Be Optimized ###
SMDegrain(tr=2,thSAD=600,ContraSharp=True,RefineMotion=True,Plane=0,Lsb_Out=True,PreFilter=2)
### Debanding ###
GradFun3(thR=0.55,Radius=12,Mask=2,SMode=1,Lsb=True,Lsb_In=True, StaticNoise=True,Y=3,U=3,V=3)
DitherPost(Stacked=True,Prot=False,Mode=0)
### Line Darkener And Thinner ###
FastLineDarkenMod(Strength=20,Prot=6,Thinning=0)
aWarpSharp2(Blur=4,Type=1,Depth=3,Chroma=2)
L-SMASHWorks proved to be much more stable than FFMS2, and the final trick was to lower the number of cores by 25%. I'd reckon that these settings could be fine-tuned to squeeze a wee bit more FPS's, especially with the quad-core, but since I'm using the dual-core for these encodes it's OK. Thanks again for all the help, I really appreciate it :) . Now to figure out how to use AviSynth 2.6 MT with QTGMC on the quad-core ;) ...
Boulder
12th April 2015, 09:57
One thing: TDecimate should not be run multithreaded. You'll want to have SetMTMode(5) before that and switch back to SetMTMode(2) afterwards. I'm not sure if SetMTMode(3) works with TDecimate (it didn't on my computer whenever I've tried it).
LouieChuckyMerry
13th April 2015, 04:09
One thing: TDecimate should not be run multithreaded. You'll want to have SetMTMode(5) before that and switch back to SetMTMode(2) afterwards. I'm not sure if SetMTMode(3) works with TDecimate (it didn't on my computer whenever I've tried it).
Thanks for the reminder. As I read through the second half of this thread before posting I saw where you'd mentioned that earlier, and as I ran my tests it's something I tried. It failed, but that was before I lowered the number of threads. I'll try again with the stable settings, but I've already encoded over 20 episodes and not noticed anything wrong with the quality. Really, they look great :confused: .
Edit: I ran two SelectRangeEvery(1000,66)'s on the same episode, one as above and one with SetMTMode(5) for TDecimate. The differences in FPS and output bit rate were nominal, and to my eyes they look the same.
LigH
13th April 2015, 08:59
The problem with IVTC in general is that if an instance of the filter gets to see not every frame, but only a part of the whole video (what multi-threading by separating the clip among several instances may cause), it won't detect the Telecine pattern reliably, and therefore not revert it correctly. I guess the risk will be low because TFM has a large window, nevertheless it is not impossible.
LouieChuckyMerry
13th April 2015, 13:58
The problem with IVTC in general is that if an instance of the filter gets to see not every frame, but only a part of the whole video (what multi-threading by separating the clip among several instances may cause), it won't detect the Telecine pattern reliably, and therefore not revert it correctly. I guess the risk will be low because TFM has a large window, nevertheless it is not impossible.
Thanks for the lucid explanation. I'll edit my script so TDecimate has SetMTMode(5), thus eliminating the possibility.
real.finder
13th April 2015, 20:21
According to what I remember, in 2012 with vfr encoding using tivtc 2pass I had to use SetMTMode(5) or SetMTMode(6) unless it will tell me that frames numbers does not match, but recently I tried use SetMTMode(2) and it work!
tobindac
14th April 2015, 19:03
Any chance for an 64bit version? It seems it could be used in an SVP 64bit version (http://www.svp-team.com/forum/viewtopic.php?pid=48306#p48306).
LigH
15th April 2015, 08:30
The original AviSynth project depends quite a lot on programming tricks which could not easily be ported to 64 bit software without crashing a lot. The 64 bit version of AviSynth 2.x does exist but never developed far. Therefore, plugin developers didn't care much about porting their software either.
AviSynth+ was started as a major rewrite from the kernel on, to be able to support both 32 and 64 bit builds. If you need a 64 bit AviSynth, try the "plus" fork. Or maybe change to VapourSynth, which works differently, but supports many similar features and plugins.
Boulder
24th April 2015, 07:03
Hello. Is there any way to include a MT-non compatible filter (that requires a single instance only) between two plugins, running in MT? This plugin must run in one instance or works incorrectly.
...
SetMTMode(2)
Filter_in_MT()
Filter_without_MT()
Filter_in_MT()
...
Also I would get a solution to change MT threads on different parts.
Just use:
...
SetMTMode(2)
Filter_in_MT()
SetMTMode(5) # or try SetMTMode(3)
Filter_without_MT()
SetMTMode(2)
Filter_in_MT()
...
I do that with TDecimate all the time and it works fine.
Boulder
24th April 2015, 08:04
In such cases, you might be better off using MT_Pipeline: http://forum.doom9.org/showthread.php?t=163281. It could be difficult to combine MT things though.
speedyrazor
29th April 2015, 21:30
Does anyone know which version of the SoundTouch library is being used in this latest MT version, 2015.02.20 ?
I am hoping it's 1.8 as this has multi channel audio support for audio TimeStretch, updated over 1 year ago.
Cheers.
LigH
29th April 2015, 23:01
It would contain the same version as the latest (non-MT) AviSynth release.
The only relevant entry in the readme.txt of AviSynth 2.6.0 RC 3 [150419] (http://netcologne.dl.sourceforge.net/project/avisynth2/AviSynth_Alpha_Releases/AVS%202.6.0%20RC%203%20%5B150419%5D/readme.txt) was: "Updated Soundtouch to 1.31 (2.5.8)" ... not mentioned again since.
foxyshadis
3rd May 2015, 01:26
Another question is to get a better solution to make my own MT-compatible plugin with a huge array in the plugin constructor (>200MB). I have many LUT tables.
It seems when I use it in MT, I get many instances of that plugin, so on Intel i7 with 8 threads it is too big to use on 32-bit system even with 3GB patched host. mt_masktools creates also many LUT tables, so I looking for a solution to fix this issue before we have no 64-bit version of Avisynth. My scripts are very complex, so I have memory problem on 2K sources. Disabling of MT is very sloooooooow. So a workaround I use is 2 threads in Set MT Mode.
Mode 1 is single-instance MT. Be very careful and absolutely certain that your plugin is re-entrant before using it, though. Stick to local variables as much as possible.
speedyrazor
23rd May 2015, 21:10
I want to run 4 separate instances at the same time using Avisynth MT, running in a bespoke application, sending to ffmpeg. Here is the server spec I am using:
Windows Server 2012
Dual Xeon E5-2650 v2 (16 cores, 32 threads)
128 GB Ram
And here is the current code I am using, which I am sending to ffmpeg:
SetMemoryMax(400)
SetMTMode(3)
QTInput("test.mov", quality=100, audio=2)
SetMTMode(2)
ColorMatrix(mode="Rec.709->Rec.601", clamp=0)
SmoothDeinterlace()
Spline36Resize(720, 576)
TimeStretchPlugin(tempo = 25.0/24.0*100.0)
AssumeFPS(25, 1)
Distributor()
Currently the results I am seeing are indifferent, some crashing, instability, etc.
So my question is, is it possible to run 4 separate instances of Avisynth MT, and if so is the above script OK, or should it be tweaked?
Kind regards.
Most important: Whether or not to use Distributor() depends a lot on the situation. Most applications using VfW or the AviSynth API won't need it; I know that scripts inside the ffdshow PP filter may need it.
AviSynth 2.60 went "final".
So, new MT build, please? :)
Ajvar
6th June 2015, 10:40
That would be awesome.
Groucho2004
6th June 2015, 11:21
Guys, don't get your knickers in a twist. The only change in the code for avisynth.dll after the current MT version was posted by SEt is this (http://avisynth2.cvs.sourceforge.net/viewvc/avisynth2/avisynth/src/core/cache.cpp?r1=1.41&r2=1.42).
I'm not sure if this is even relevant since the MT version has it's own cache management.
However, it would give some folks peace of mind, I guess.
LouieChuckyMerry
15th June 2015, 07:04
I was hoping that someone more knowledgeable than I could save me days of testing time by offering experience-based suggestions for "translating" a stable MT AviSynth-FFMSIndex script into a stable MT AviSynth-DGIndex script. That is, any rational ideas for tweaking the MT settings for the following stable script so that it also runs stably with DGIndex would be much appreciated:
# Set DAR in encoder to 6480 : 4739. The following line is for automatic signalling
global MeGUI_darx = 6480
global MeGUI_dary = 4739
SetMemoryMax(256)
SetMTMode(3,3)
LoadPlugin("F:\[0]StandAloneApps\MeGUI-2500(core)2443(data)0.3.5(libs)[Portable]\tools\ffms\ffms2.dll")
FFVideoSource("SourcePath", fpsnum=30000, fpsden=1001, threads=1)
### Deinterlace ###
SetMTMode(5)
LoadPlugin("F:\[0]StandAloneApps\MeGUI-2500(core)2443(data)0.3.5(libs)[Portable]\tools\avisynth_plugin\TIVTC.dll")
TFM(Field=0,Mode=5,PP=1,Slow=2,CThresh=4)
TFM(Field=1,Mode=5,PP=1,Slow=2,CThresh=4)
TFM(Order=-1,Slow=2,CThresh=4)
TDecimate(Mode=1,Cycle=15,CycleR=3)
SetMTMode(2)
Vinverse()
### Deshaker ###
Stab(Mirror=15)
### Crop ###
Crop(8,0,-8,0)
### Resize ###
RatioResize(10/11.0,"PAR")
### Gibbs Noise Block ###
Edge=MT_Edge("prewitt",thY1=20,thY2=40).RemoveGrain(17)
Mask=MT_Logic(Edge.MT_Expand().MT_Expand().MT_Expand().MT_Expand(),Edge.MT_Inflate().MT_Inpand(),"xor")
MT_Merge(dfttest(),Mask,Luma=True)
### Overall Temporal Denoise, Could Probably Be Optimized ###
SMDegrain(tr=2,thSAD=600,ContraSharp=True,RefineMotion=True,Plane=0,Lsb=True,Lsb_Out=True,PreFilter=2)
### Debanding ###
GradFun3(thR=0.55,Radius=12,Mask=2,SMode=1,Lsb=True,Lsb_In=True, StaticNoise=True,Y=3,U=3,V=3)
DitherPost(Stacked=True,Prot=False,Mode=0)
### Line Darkener And Thinner ###
FastLineDarkenMod(Strength=20,Prot=6,Thinning=0)
aWarpSharp2(Blur=4,Type=1,Depth=3,Chroma=2)
Currently if I use the same MT settings with DGIndex the result is a frozen MeGUI (or AVSMeter), but given my lack of knowledge regarding the workings of FFMSIndex and DGIndex, I've no idea where to start tweaking. Thanks for your time :) .
Morte66
17th June 2015, 09:11
I have a feeling this has been asked before, but my google fu has failed me.
I want to use TTempSmoothF on the end of avisynth scripts, after other temporal filters. As best I can tell it is not happy with AvisynthMT, even in mode 5, unless it is the first Temporal filter in the script.
So I can run a script like:
SetMtMode(3)
FFVideoSource(etc)
SetMtMode(5)
#crop, levels, any spatial filters
TTempSmoothF(maxr=7)
... and it's OK but only uses one core
But if I use something like:
SetMtMode(3)
FFVideoSource(etc)
SetMtMode(2)
#crop, levels, any spatial filters
QTGMC() #or other filters/scripts with a temporal radius
SetMtMode(5)
TTempSmoothF(maxr=7)
.... the latter runs, but it sits at about 50% cpu on my quad core and goes pretty slow (about twice as fast as I'd get with regular Avisynth, on four cores). As best I recall (it's been years), this was a known problem with TTempSmooth and AvisynthMT, something to do with blocking maybe.
What I do at the moment is run my main script to lossless, then a second script from the lossless which just does TTempSmooth in mode 5. I run multiple such jobs in parallel to load the cpu, with trim statements to split up a job. I used to use the external filter MT, e.g. MT('TTempsmoothF(maxr=7)',threads=4,overlap=8,splitvertical=true) but MT.dll has gone from 2.6.
So, I wonder, does anybody know...
- Is this a known problem, or am I imagining that?
- Did anybody find a way around it? Can I somehow run e.g. MVTools then TTempSmooth smoothly in AvisynthMT 2.6?
- Is MT.dll really gone and not coming back?
Ajvar
22nd June 2015, 14:33
It's safe to assume that SET is either out of reaching or isn't going to do this. Is anyone else who could make MT patch?
Groucho2004
22nd June 2015, 15:07
It's safe to assume that SET is either out of reaching or isn't going to do this. Is anyone else who could make MT patch?
What problem do you have with the current version?
Keiyakusha
22nd June 2015, 15:53
What problem do you have with the current version?
For example, AVSmeter is NOT saying that the avisynth version is 2.6.0.6 ^__^
Livesms
7th July 2015, 11:02
Do we need to recompile something again or is it a bug:Its issue known, its necessary that should be fixed in mt_masktools_26.dll.
http://forum.doom9.org/showthread.php?p=1589904#post1589904
http://forum.doom9.org/showthread.php?p=1589960#post1589960
http://forum.doom9.org/showthread.php?p=1610927#post1610927
What can I do with CACHE_GETCHILD_CACHE_MODE error ?
As documented several times during the last year: Use a special patched version of mt_masktools26.dll (http://forum.doom9.org/showthread.php?p=1619023#post1619023) (06_taro's fix for Vit's fix) to be compatible with AviSynth MT 2.6 RC4 and newer.
It may be hard to search this error message using the forum search, but Google [ site:forum.doom9.org CACHE_GETCHILD_CACHE_MODE ] returned some matches.
Livesms
7th July 2015, 13:04
As documented several times during the last year: Use a special patched version of mt_masktools26.dll (http://forum.doom9.org/showthread.php?p=1619023#post1619023) (06_taro's fix for Vit's fix) to be compatible with AviSynth MT 2.6 RC4 and newer.
It may be hard to search this error message using the forum search, but Google [ site:forum.doom9.org CACHE_GETCHILD_CACHE_MODE ] returned some matches.
Thanks...
Helped. Also forgot to add "SetMTmode(2)" to the very first line of avs Script ...
Reel.Deel
7th July 2015, 13:09
I would recommend the updated MaskTools b1 (https://github.com/tp7/masktools/releases).
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.