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
Groucho2004
8th October 2013, 15:27
Yes..
Works for me. Check if you have some old DLLs in the auto-load directory.
06_taro
8th October 2013, 16:04
http://www.nmm-hd.org/upload/get~ytQx5-3uVdE/alpha5mt.jpg
Works for me.
How can I re-produce it?
CarlPig
8th October 2013, 16:05
I have found out it works for some files and not for other files.
It does not work with this:
General
Unique ID : 175099253835760043288826361198420018304 (0x83BAE3BE268212C4A92F46E85D5DC480)
Complete name : R:\Test1.mkv
Format : Matroska
Format version : Version 2
File size : 2.29 GiB
Duration : 1h 47mn
Overall bit rate : 3 052 Kbps
Encoded date : UTC 2012-07-02 06:16:20
Writing application : mkvmerge v4.1.1 ('Bouncin' Back') built on Jul 3 2010 22:54:08
Writing library : libebml v1.0.0 + libmatroska v1.0.0
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.1
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 1h 47mn
Bit rate : 3 000 Kbps
Width : 1 024 pixels
Height : 720 pixels
Display aspect ratio : 1.422
Frame rate mode : Constant
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.170
Stream size : 2.19 GiB (96%)
Writing library : x264 core 115 r1995kMod c1e60b9
Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x13 / me=umh / subme=7 / psy=1 / fade_compensate=0.00 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=2 / sliced_threads=1 / slices=2 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc=abr / mbtree=0 / bitrate=3000 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Default : Yes
Forced : No
Audio
ID : 2
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Format settings, Endianness : Big
Muxing mode : Header stripping
Codec ID : A_AC3
Duration : 1h 47mn
Bit rate mode : Constant
Bit rate : 64.0 Kbps
Channel(s) : 1 channel
Channel positions : Front: C
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 49.1 MiB (2%)
Language : Danish
Default : Yes
Forced : No
But it works with this:
General
Unique ID : 181167790535246177777077846563243667618 (0x884BA5B3D0FF8AF93D7534787643B0A2)
Complete name : R:\Test2.mkv
Format : Matroska
Format version : Version 2
File size : 1.66 GiB
Duration : 29mn 3s
Overall bit rate : 8 201 Kbps
Encoded date : UTC 2013-07-20 22:07:44
Writing application : MakeMKV v1.8.4 win(x64-release)
Writing library : libmakemkv v1.8.4 (1.2.0/1.1.0) win(x64-release)
Video
ID : 1
Format : MPEG Video
Format version : Version 2
Format profile : Main@Main
Format settings, BVOP : No
Format settings, Matrix : Custom
Codec ID : V_MPEG2
Codec ID/Info : MPEG 1 or 2 Video
Duration : 29mn 3s
Bit rate : 7 846 Kbps
Maximum bit rate : 8 000 Kbps
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 25.000 fps
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Top Field First
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.757
Time code of first frame : 00:02:00:00
Time code source : Group of pictures header
Stream size : 1.59 GiB (96%)
Language : English
Default : No
Forced : No
Color primaries : BT.601 PAL
Transfer characteristics : BT.470 System B, BT.470 System G
Matrix coefficients : BT.601
Audio
ID : 2
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Format settings, Endianness : Big
Codec ID : A_AC3
Duration : 29mn 3s
Bit rate mode : Constant
Bit rate : 192 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 39.9 MiB (2%)
Title : 2/0
Language : Danish
Default : Yes
Forced : No
Text
ID : 3
Format : VobSub
Codec ID : S_VOBSUB
Codec ID/Info : The same subtitle format used on DVDs
Language : Danish
Default : Yes
Forced : No
Menu
00:00:00.000 : en:Chapter 01
00:10:28.320 : en:Chapter 02
00:19:00.960 : en:Chapter 03
CarlPig
8th October 2013, 16:08
http://www.nmm-hd.org/upload/get~ytQx5-3uVdE/alpha5mt.jpg
Works for me.
How can I re-produce it?
I have try with this simple command: LSFmod()
It works with Test2 but not with Test1.
06_taro
8th October 2013, 16:26
Tried:Version().ConvertToYV12
BilinearResize(1024, 720)
AssumeFPS(24000, 1001).Loop(10000)
AudioDub(BlankClip(audio_rate=48000))
LSFmod()
Info
But still couldn't catch any error. Don't know any clip properties that would cause such a cache problem. Could you please make sure that there's exactly only one mt_masktools-*.dll in you computer and try again?
Groucho2004
8th October 2013, 16:29
I have try with this simple command: LSFmod()
It works with Test2 but not with Test1.
If it works for one source and not the other, I suspect you don't have the correct decoder.
Posting your script might be useful. :rolleyes:
CarlPig
8th October 2013, 17:02
Here:
SetMemoryMax(512)
SetMTMode(3)
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\dgindexnv\DGDecodeNV.dll")
DGSource("D:\Test1.dgi",fieldop=0)
SetMTMode(2)
Spline64Resize(768,576) # Spline64 (Sharp)
LSFmod()
And
SetMemoryMax(512)
SetMTMode(3)
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\dgindexnv\DGDecodeNV.dll")
DGSource("D:\Test2.dgi",fieldop=0, deinterlace=1)
SetMTMode(2)
crop(24, 2, -10, -6)
Spline64Resize(768,576) # Spline64 (Sharp)
LSFmod()
CarlPig
8th October 2013, 17:33
Tried:Version().ConvertToYV12
BilinearResize(1024, 720)
AssumeFPS(24000, 1001).Loop(10000)
AudioDub(BlankClip(audio_rate=48000))
LSFmod()
Info
But still couldn't catch any error. Don't know any clip properties that would cause such a cache problem. Could you please make sure that there's exactly only one mt_masktools-*.dll in you computer and try again?
You have right, there was a old mt build in my dir.
Sorry for all post due a old build.
martin53
13th October 2013, 17:46
My apologies if I report something that is already known:
With V2.60, I observe some black stripes with AviSource() that I consider to be a multi threading issue, please find attached examples. DirectShowSource does not produce these stripes. Both AviFileSource and OpenDMLSource produce them, always at the same place and with same length (I think), but not always all three, and not in a reproduceable manner when navigating through the clip.
My version is AviSynth 2.60 (CVS 20130425, ICL10). I think I observed it also with 2.6a4.
Groucho2004
13th October 2013, 18:31
I observe some black stripes with AviSource() that I consider to be a multi threading issue
My version is AviSynth 2.60 (CVS 20130425, ICL10). I think I observed it also with 2.6a4.
Neither of those are MT versions.
bxyhxyh
15th October 2013, 14:29
Mode 5 is the slowest, right?
So why this code is faster in Mode5
DirectShowSource("00067-1.m2ts", audio = false, fps = 24.0/1.001, convertfps = true)
Mode 2 - 22.73 fps
Mode 3 - 57.14 fps
Mode 4 - 16.28 fps
Mode 5 - 73.19 fps
Mode 6 - 81.14 fps
LigH
15th October 2013, 14:41
A more urgent question back: Why DirectShowSource(convertfps=true)? Did all better ways fail?
bxyhxyh
15th October 2013, 14:45
A more urgent question back: Why DirectShowSource(convertfps=true)? Did all better ways fail?
Audio did not synced.
Edit:
I've 2 choices to rip this bluray.
1. DGAVCIndex
2. DirectShowSource
FFVideoSource and dss2 are not working properly for this video.
So I'm testing that which one is the fastest.
LigH
15th October 2013, 15:00
Well, as you proved, mode 5 will not always be the slowest "per-se". In your case, there will be reasons that it gets faster, possibly because it buffers more to avoid forth-and-back-jumping in the source harder? I am not the expert about the theory, but your practical example proved an exception.
I believe there is room for improvement by using Prefetch or LinearRequest. And possibly even more if you use an AviSynth native source filter (possibly after transmultiplexing the MTS to MKV first) and synchronizing functions of AviSynth. But that is a matter of the specific source, hard to help without more details.
Qualitywise, using DirectShow framerate conversion is probably the worst. There may be only one reason to need it, for variable framerate; but Blu-ray and MTS doesn't support VFR, so that won't be the reason.
FFMS2 doesn't support MTS well, you would have to convert it to MKV first. L-SMASH Source (LWLibavVideoSource / LWLibavAudioSource) may support it better. Still, a conversion to MKV first may solve many issues a priori.
Groucho2004
15th October 2013, 16:03
DirectShowSource("00067-1.m2ts", audio = false, fps = 24.0/1.001, convertfps = true)
Is that your entire script? What filters are you planning to use?
bxyhxyh
15th October 2013, 18:20
Is that your entire script?
For this test to choose fastest possible source filter, Yes
What filters are you planning to use?
I'm going to use prefiltered smdegrain and lsfmod
pre = last.fft3dfilter(sigma = 10, bw = 16, bh = 16, ow = 8, oh = 8, plane = 4).Gradfun3()
smdegrain(overlap = 16, blksize = 8, thsad = 500, lsb = false, pel = 2, refinemotion = true, chroma = true, truemotion = false, tr = 3, prefilter = pre, plane = 4)
lsfmod(strength = 150)
martin53
16th October 2013, 21:02
Neither of those are MT versions.
Hi,
please advise where I should post better, feel it might go unnoticed. EDIT this is not not say I insist it's related to multi-threading. I just know of no other V2.60 thread and I never saw that when I still used V2.58.
Groucho2004
16th October 2013, 21:57
Hi,
please advise where I should post better, feel it might go unnoticed.
I don't know what makes you think your problem is related to multi-threading considering that you are using a Avisynth DLL that does not support it.
You should probably post here (http://forum.doom9.org/forumdisplay.php?f=33).
IanB
16th October 2013, 22:38
@martin53,
Yes you should create your own thread in the Avisynth Usage (http://forum.doom9.org/forumdisplay.php?f=33) forum.
This is probably going to be a codec/decoder problem. So documenting which format and what codec's are involved is probably going to be helpful.
AviSource uses only VFW codecs, DirectShowSource uses the DirectShow infrastructure.
Octo-puss
25th October 2013, 20:23
I can't seem to get this mod to work.
I can't load any script, and am getting "there is no function named setmtmode" error.
I did replace the main dll in syswow64 folder.
Any help appreciated.
Groucho2004
25th October 2013, 20:55
I can't seem to get this mod to work.
I can't load any script, and am getting "there is no function named setmtmode" error.
I did replace the main dll in syswow64 folder.
Any help appreciated.
The error message means that you're not using the MT DLL. You probably have some old Avisynth DLL sitting in a folder to which the path environment variable points. Just search your local drives for avisynth.dll and delete all but the one you want to use.
Octo-puss
25th October 2013, 22:14
You were right. I missed one instance in main MEGui folder, probably left there from ages ago. It works fine now.
andybkma
9th November 2013, 04:03
Greets, Win7 64bit SP1, i7-3610QM, newest 2.6 MT 20130928
Is there a trick (config setting) to prevent the media player (in my case Zoom Player) from crashing when using the multi-threading of this avisynth.dll? 5 out of 10 times when starting a vid being real-time postprocessed with a sharpener (LSFMod for SD or FineSharp for HD) it crashes the media player. I never had this problem (ever) when not using the multi-threaded version. Using mt-masktools-26 2.0.48.0, RemoveGrain SSE3, Repair SSE3. Thanks ;-)
My settings for SD:
SetMemoryMax(512)
SetMTMode(2,4)
ffdshow_source()
SetMTMode(2)
LSFMod(defaults="fast",ss_x=1.5,ss_y=1.5,preblur="on")
SetMTMode(1)
GetMTMode(false) > 0 ? distributor() : last
My settings for HD:
SetMemoryMax(512)
SetMTMode(2,4)
ffdshow_source()
SetMTMode(2)
FineSharp()
SetMTMode(1)
GetMTMode(false) > 0 ? distributor() : last
andybkma
9th November 2013, 07:43
Try using mode 3 or mode 5 on source filter instead of mode 2.
Thanks, are you talking about changing SetMTMode(2,4) to SetMTMode(3or5,4)? I did that but same problem. Actually made the crashing worse ugh
ryrynz
9th November 2013, 08:21
Thanks, are you talking about changing SetMTMode(2,4) to SetMTMode(3or5,4)? I did that but same problem. Actually made the crashing worse ugh
Use SetMTMode(3) instead of SetMTMode(2,4)
turbojet
9th November 2013, 09:13
This goes back a year or more now but I vaguely remember FineSharp() randomly crashing on anything but SetMTmode(5) and not using MTmode was less cpu.
Also lower setmemorymax reduced the occurrences, think I settled with 128.
andybkma
9th November 2013, 10:46
This goes back a year or more now but I vaguely remember FineSharp() randomly crashing on anything but SetMTmode(5) and not using MTmode was less cpu.
Cheers for the tips, would like to try out to use this version of avisynth.dll in non-MT with FineSharp to compare but having problems with what code to use in ffdshow raw to get FineSharp to actually run in non-multithread mode. The first page doesn't say how to use scripts in non-MT mode with this version DLL. I put the same code in ffdshow raw that I had used with the original non-MT version of Avisynth but it didn't work. Could you perhaps please tell me what to put there in ffdshow for that? Cheers...
andybkma
9th November 2013, 10:53
Use SetMTMode(3) instead of SetMTMode(2,4)
Thanks for the tip, so I am assuming that SetMTMode(3) would be the same as SetMTMode(3,0) in that the default number of threads would be used (in my case 8). Am I correct in this? One side effect I am seeing by setting it to just (3) or (2) is that the videos take much longer to start playing than by setting it to (3,4) or (2,4). Am wondering if this is because 8 threads is just too much for this purpose and 4 makes it faster....
ryrynz
9th November 2013, 11:05
Correct. SEt states that MTmode 3 should be used before ffdshow_source(), I do wonder if this is the cause of your problems.
What you could also do it dropping the SetMTMode(2) if it still causes issues, that way you're in mode 3 through the whole process except for the end.
If you have no joy with that then I'd try the other suggestions above (Soothe=false and Maxmem setting, maybe mode 5)
So you want to try this:
SetMemoryMax(512)
SetMTMode(3)
ffdshow_source()
SetMTMode(2)
FineSharp()
SetMTMode(1)
GetMTMode(false) > 0 ? distributor() : last
and
SetMemoryMax(512)
SetMTMode(3)
ffdshow_source()
FineSharp()
SetMTMode(1)
GetMTMode(false) > 0 ? distributor() : last
Groucho2004
9th November 2013, 11:22
would like to try out to use this version of avisynth.dll in non-MT with FineSharp to compare but having problems with what code to use in ffdshow
Simply omit the *MTMode() statements.
andybkma
9th November 2013, 12:04
Simply omit the *MTMode() statements.
Thanks, I tried that which leaves me with this code:
SetMemoryMax(128)
ffdshow_source()
FineSharp()
or LSFMod()
But then I get error "Cache: Filter returned invalid response to CACHE_GETCHILD_CACHE_MODE.
If I replace the MT avisynth.dll back to the original (non-MT) one in the SysWow64 folder then all is fine with the above code. So something is not right with the above code with the MT version of avisynth.dll to make it run in non-MT...
Groucho2004
9th November 2013, 12:07
But then I get error "Cache: Filter returned invalid response to CACHE_GETCHILD_CACHE_MODE.
Try with this version (http://forum.doom9.org/showpost.php?p=1619023&postcount=649) of Masktools.
andybkma
9th November 2013, 12:28
Try with this version (http://forum.doom9.org/showpost.php?p=1619023&postcount=649) of Masktools.
Thank you kindly, that did it
andybkma
9th November 2013, 12:33
Correct. SEt states that MTmode 3 should be used before ffdshow_source(), I do wonder if this is the cause of your problems.
What you could also do it dropping the SetMTMode(2) if it still causes issues, that way you're in mode 3 through the whole process except for the end.
If you have no joy with that then I'd try the other suggestions above (Soothe=false and Maxmem setting, maybe mode 5)
So you want to try this:
SetMemoryMax(512)
SetMTMode(3)
ffdshow_source()
SetMTMode(2)
FineSharp()
SetMTMode(1)
GetMTMode(false) > 0 ? distributor() : last
and
SetMemoryMax(512)
SetMTMode(3)
ffdshow_source()
FineSharp()
SetMTMode(1)
GetMTMode(false) > 0 ? distributor() : last
Thank you all for trying to help this noob to MTavisynth out. So lowering the SetMemoryMax to (128) from (512) seemed to have helped out my crashing ZoomPlayer at video start. So I went ahead and compared CPU usage and the rendering stats with mVR using the MT and the non-MT orig version and to be honest I don't see a bit of difference with either FineSharp() or LSFMod(). So am wondering if this MT avisynth version is for much heavier scripts than these two sharpeners or perhaps when combining multiple scripts?
Groucho2004
9th November 2013, 12:39
So am wondering if this MT avisynth version is for much heavier scripts than these two sharpeners or perhaps when combining multiple scripts?
Pretty much, yes. QTGMC() or some heavy de-noising functions do benefit from multi-threading.
If you want to experiment further, you might want to use this (http://forum.doom9.org/showthread.php?t=165528) to test scripts.
real.finder
11th November 2013, 07:35
about crashing, in the last version (2013.09.28), became occur randomly and without an appointment
and if it occurred, and after the re-run encoding again even without modifications, may work without crashing, or it occurred in other frame
that a side, for me, almost every filter work fine with mode 2, even Lsfmod
Overdrive80
29th November 2013, 17:41
Hi, actually I am getting random BSOD when encoding using Avisynt MT after updating operating system to windows blue. I have tried encoding without MT and system is stable. Excuse me but I'm not sure if it could be related. Would be it?
Boulder
29th November 2013, 17:45
You could try debugging the dump, but I would first try testing the system stability with stuff like Prime95 or LinX.
SEt
29th November 2013, 20:10
User mode apps must not even have rights to crash your system. So anything but Avisynth is to blame here (drivers? OS? hardware?). It's quite trivial that without MT your system is more stable: because way less system resources are used.
As already suggested, test system stability with apps like LinX and Prime95. Heavy modern games are also good for load tests (if you are not extremely GPU-bound there).
Overdrive80
29th November 2013, 20:38
You could try debugging the dump, but I would first try testing the system stability with stuff like Prime95 or LinX.
I have seen minidumps and are caused by different reasons. Here minidumps (https://dl.dropboxusercontent.com/u/19135067/Minidumps.7z)
User mode apps must not even have rights to crash your system. So anything but Avisynth is to blame here (drivers? OS? hardware?). It's quite trivial that without MT your system is more stable: because way less system resources are used.
As already suggested, test system stability with apps like LinX and Prime95. Heavy modern games are also good for load tests (if you are not extremely GPU-bound there).
I have tested system with LinX without BSOD.
http://img833.imageshack.us/img833/9652/8m5x.png
I apologize because I dont want to turn the thread into offtopic but only happens to me if I run with MT.
EDIT: All drivers is updated.
Groucho2004
29th November 2013, 21:08
I have tested system with LinX without BSOD.
LinX also doesn't produce BSODs.
Boulder
29th November 2013, 21:22
Did you give LinX the maximum amount of memory available? And you should also run it for several hours, I've seen it calculate an incorrect result after it had already been running the whole previous night.
real.finder
30th November 2013, 11:43
Hi, actually I am getting random BSOD when encoding using Avisynt MT after updating operating system to windows blue. I have tried encoding without MT and system is stable. Excuse me but I'm not sure if it could be related. Would be it?
use 2013.03.09 build instead of 2013.09.28
I also had stability problems in latest version
Overdrive80
30th November 2013, 11:59
Did you give LinX the maximum amount of memory available? And you should also run it for several hours, I've seen it calculate an incorrect result after it had already been running the whole previous night.
After of 14 hours I didnt get any error (https://dl.dropboxusercontent.com/u/19135067/LinX%2029-11-2013%2021-43-10.log).
use 2013.03.09 build instead of 2013.09.28
I also had stability problems in latest version
Thanks, I will test it.
EDIT: I can confirm that real.finder said, my system has become stable with previous version of MT.
Overdrive80
22nd January 2014, 19:41
Excuse me, I hope that you can help me. Since days ago I get errors with avisynth like this:
http://imagizer.imageshack.us/v2/800x600q90/268/y7ws.png
I use windows 7 x64, I dont undertand why show "C\Windows\system32\avisynth.dll" if this *.dll is in syswow64.
I attach script. I would attach crash file of vdub if is required. Thanks.
Guest
22nd January 2014, 20:39
When you have a complex script like that, you have to strip it down and then add stuff back step by step to see what causes the crash.
ultim
22nd January 2014, 20:48
http://imagizer.imageshack.us/v2/800x600q90/268/y7ws.png
Based on the casing of the DLL (AviSynth.dll vs. avisynth.dll) I think you have AviSynth+. In this case please post to the AviSynth+ thread instead of here next time.
Overdrive80
22nd January 2014, 21:22
When you have a complex script like that, you have to strip it down and then add stuff back step by step to see what causes the crash.
Ok, I will do. Is curious, I dont get this error if I remove the line: SetMTMode(x,y). O_O.
For you say, I understand that maybe some filter is looking for avisynth in wrong directory, dont it?
Thanks.
Based on the casing of the DLL (AviSynth.dll vs. avisynth.dll) I think you have AviSynth+. In this case please post to the AviSynth+ thread instead of here next time.
Nop, I use avisynth MT of SEt. But thanks for your interest.
Guest
22nd January 2014, 21:24
MT is a hit or miss kind of thing. I never use it so can't help you, but others that use it may weigh in.
TheSkiller
22nd January 2014, 21:55
I get this error (access violation) too, using the latest AviSynth 2.6 alpha 5 and SEt's MT. It didn't ever happen before.
To me the error seems to occur quite randomly upon loading scripts. Sometimes I reload the script in VirtualDub (F2 Key) and get the error, then I reload again and it works... Sometimes it's there 10 times in a row. Sometimes it won't stop. I cannot nail it down to a specific script line.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.