View Full Version : I made a mt 2.5.8 avisynth.dll and mt.dll
leeperry
30th June 2009, 01:19
I fail to understand why(as I had tried lot of files already), but some x264+AC3 files crash ffdshow instantly w/ your 2.58 avisynth.dll and work fine w/ 2.57(they are 1280*720 or 1920*1080, so no funky mod2 or anything)...maybe some of my scripts don't like 2.58, or indeed some compiling problem :o
There are some threading problems in posted builds that i've fixed already. Will post it a bit later (need to sleep too >_>). I've also modified ffdshow to be somewhat usable with SetMTMode (still crashes sometimes on shutdown).
Can't say that everything is fixed, so post the files and actions to reproduce the crashes if you want them to be fixed by someone.
leeperry
30th June 2009, 03:25
ok, sounds great! you got PM :)
lych_necross
30th June 2009, 07:13
There are some threading problems in posted builds that i've fixed already. Will post it a bit later (need to sleep too >_>). I've also modified ffdshow to be somewhat usable with SetMTMode (still crashes sometimes on shutdown).
Can't say that everything is fixed, so post the files and actions to reproduce the crashes if you want them to be fixed by someone.
Thats cool. Maybe once some bugs are squashed, the changes can be submitted to the svn!
Jeremy Duncan
2nd July 2009, 10:55
I updated the first post with new dll's: avisynth.dll and mt.dll.
I used Set's src, but made it in visual studio 2008 with totally different settings.
:D
Runs like a champ. Try them out. Don't use avisynth.dll without using the mt.dll I made though.
The src is visual studio 2008 compliant now.
Efenstor
2nd July 2009, 13:50
Thanks, Jeremy! This is blazing cool!
Gavino
2nd July 2009, 13:50
Jeremy, What is the purpose of this release when we already have SEt's version? :confused:
What 'added value' does it bring?
Perhaps the answer is in the changed settings you mention. If so, could you please explain what effect these have and under what circumstances I should use your version instead of SEt's?
The src is tricky, you build a dll then test it and it runs awful, tehn you build it again and test it and it runs beautifully.
So if you build it and it runs awful, just delete your build and startup visual studio without messing around with the src and build another one.
keep doing this rebuilding until you get a good one.
it's weird I know, but now you know what to do if you build it and it's ugly. :)
Hmm, does this not suggest that you might be doing something wrong?
I know you mean well, but can we really have confidence in software you release in these conditions?
I don't see see the point of rebuilding too - as i said earlier, i use the same 2008 compiler for building so of course sources are already 2008 compliant. Converting project 2005<->2008 is trivial - just open .sln and .vcproj in notepad and change version.
As for practical use - you can use either version. There is no difference other that my version is smaller and doesn't require installing VS runtime. The speed is the same too (could be said that my version is faster, but the difference is so small that you can see it only in profiler).
Jeremy Duncan, your first post is misleading - your build doesn't interact with msvcp71 or msvcr71.dll at all, so if something requires them (or crashes as you write) - it's probably external filters, not the avisynth.dll/mt.dll themselves. Also, if it's not for viruses or serious hardware problems rebuilding the same source always produce the same binary no matter how many times you build or reopen VS (files will be different only in some bytes in header that represent time of the build and aren't used anywhere).
Jeremy Duncan
2nd July 2009, 20:55
Jeremy, What is the purpose of this release when we already have SEt's version? :confused:
What 'added value' does it bring?
Set's version crashed mpc. I use ffdshow in mpc, both clsid's version.
When I got mpc to open the audio and video were all garbled.
When I tried again (as I just kept closing mpc and reopening it), it worked.
Many different times I opened Set's avisynth.dll and mt and the video and audio were all messed up.
Mind you, I play the movie from the disk so I have to get to the root menu.
Now, with my build using set's src I have no garbled screen or audio when I open the movie using mpc.
_____________________________________
And as to why one build is different than the other.
Yes, the size is the same, but one build is different than the other.
Why is this? I don't know.
The os was a clean build just for that day to build the dll's, so no malware.
_____________________________________
Set,
I never read you switched the scr to be visual studio 2008 compliant. In fact the MT was not able to be made using your src settings for mt. I had to munkey around and got it to go. :D
______________________________________
"Jeremy Duncan, your first post is misleading - your build doesn't interact with msvcp71 or msvcr71.dll at all"
I haven't tested if I did or didn't need them yet.
I used different project settings, I told you this already.
Ew, i'm changing my option from "either version can be used" to "better not use Jeremy Duncan's version" as it seems you have serious problems with your system stability (again, possibly hardware related).
Jeremy Duncan
3rd July 2009, 00:06
Ew, i'm changing my option from "either version can be used" to "better not use Jeremy Duncan's version" as it seems you have serious problems with your system stability (again, possibly hardware related).
:D
Ok man.
But if you want to read more I will oblige.
When I said it was different I meant it worked like your avisynth.dll and mt.dll. meaning the picture was all garbled and audio was choppy.
Remaking it did away with this.
To be honest I wondered if this was a trick in the src to make one dll compile good and another like yours. Sort of like a....what do you call it. A "Puzzle", that's it. I wondered if the src was designed as a puzzle so one compile runs smooth and another runs like yours.
There is nothing wrong with my hw or sw. I had no maleware either. So, no offense to you or anybody. I just couldn't advise others ot use your compile when I had such problems with it so I made my own and one that worked for me, and others i hope.
Thank you for the src Mr.SEt. :)
Efenstor
3rd July 2009, 08:18
Installed all DLL's and redistributables and getting the error with the new build (with VirtualDub 1.9.2): An application has made an attempt to load the C runtime library incorrectly.
Jeremy Duncan
3rd July 2009, 15:59
Installed all DLL's and redistributables and getting the error with the new build (with VirtualDub 1.9.2): An application has made an attempt to load the C runtime library incorrectly.
I made new avisynth and mt dll's. They are in the first post.
I reformated my pc then installed vista 32 bit home again.
I then got all my updates for windows os.
I got all the newest drivers: soundcard, videocard, nic, mobo
After all this and there was no more updates i then installed visual studio 2008 pro trial and the sdk.
I tell you there was no possibility for any type of malware to be installed.
Then I made the dll using the src in the first post and one build operated differently than the other.
Meaning one played smooth, the other choppy, the dll's I made i mean.
So I made sure to grab the ones that played with no problem and saved the src and uploaded them and here I am talking to yuo right now. :D
I am sure nothing is wrong with my pc. However I am sure some pc guru would know for sure, but I do not. I am not a pc hw guru. :)
Have fun trying out my new mt and avisynth bulds.
Gavino
3rd July 2009, 16:53
can we really have confidence in software you release in these conditions?
Then I made the dll using the src in the first post and one build operated differently than the other.
Meaning one played smooth, the other choppy, the dll's I made i mean.
I think that answers my question. Thank you.
Jeremy Duncan
3rd July 2009, 17:06
gavino,
I wonder if people will try it out and report their results? No problems then maybe you can put more confidence in it.
Myself, i'm waiting for this. I keep checking the site to see what new results people report. I hope nobody makes false reports though.
Inparticular I'm waiting for leeparry to tell me how it did. :)
leeperry
3rd July 2009, 19:02
Inparticular I'm waiting for leeparry to tell me how it did. :)
lol the name is leeperry :D
well, honestly, man I really appreciate your efforts! I really do :cool:
but SEt's build works fine so far for me, if I start getting pixelated garbage like you did...I'll drop him a PM w/ a sample, my script and the hope that at some point he will have time to look into it :)
and, unlike some others here, I can't blame you for being a Didée fanboy...his scripts have completely blown up my HTPC experience up in the sky! :eek:
Jeremy Duncan
6th July 2009, 02:36
I updated the first post yesterday. I found that the problem I was having with the dlls was not in compiling them, but in putting them into their folder.
If I dragged and dropped them into either the system32 or plugins folder there was a chance the video and audio may be ugly.
If I dragged them out from the system32 and plugins folder, then put them back into those folders the audio video problem would go away.
Also if the audio and video was ugly after the plugins were put into the system32 folder or plugins folder, simply rebooting fixed the problem with my just leaving the plugins in those folders.
So all this time I thought it was a compiling problem but it wasn't. Sorry for the confusion.
Edit,
I tried to unregister and delete the msvcp71 and msvcr71 dll's but I don't know how so I can't say if they are needed or not.
Efenstor
6th July 2009, 15:58
Yes, the new build works OK.:D
Jeremy Duncan
9th July 2009, 11:06
I updated the mt and avisynth dll's and added a link to the ffdshow.ax SEt made.
I updated the notes in the first post as well. :D
Version dated july 9, 2009 works great! Thank you, Jeremy!
But what's about ffdshow? I don't understand.
Jeremy Duncan
9th July 2009, 22:44
Version dated july 9, 2009 works great! Thank you, Jeremy!
But what's about ffdshow? I don't understand.
SEt fixed the timestamps I think he called it, in ffdshow.ax.
So if you use the regular ffdshow without adding SEt's ffdshow.ax, skipping to different parts of the video results in a stuck frame with new audio of the part you skipped too. This is using the mvtools2 frame interpolation.
hajj_3
10th July 2009, 09:44
an interesting thread indeed:)
what kind of speed up will people see when using with xvid 1.2.2 or x264 when using a quadcore and 4gb ram?
I hope lots of you programmers can help him out, a stable multithreaded avisynth would be great.
Jeremy Duncan
12th July 2009, 09:48
an interesting thread indeed:)
what kind of speed up will people see when using with xvid 1.2.2 or x264 when using a quadcore and 4gb ram?
I hope lots of you programmers can help him out, a stable multithreaded avisynth would be great.
I'm sorry it took me a few days to respond. I was busy and made a new avisynth and mt which I just put in the first post.
below is my tests done:
___________________________
july 12 archived version (my mt and avisynth builds)
13 minutes 26 seconds
Size of encoded video
Size: 71,027,906
Size on disk: 71,028,736
Frames per second
First pass: 7.29
Second pass: 1.77
____________________________________________
july 12 custom version (my mt and avisynth builds)
13 minutes 24 seconds
Size of encoded video
Size: 71,039,639
Size on disk: 71,041,024
Frames per second
First pass: 7.15
Second pass: 1.78
____________________________________________
SEt's July 12 version (SEt's mt and avisynth builds)
13 minutes 23 seconds
Size of encoded video
Size: 71,032,981
Size on disk: 71,036,928
Frames per second
First pass: 7.24
Second pass: 1.78
_________________________________
Tsp's version (Tsp's mt and avisynth builds)
13 minutes 24 seconds
Size of encoded video
Size: 71,045,371 bytes
Size on disk: 71,049,216
Frames per second
First pass: 7.24
Second pass: 1.77
_________________________________
video sample used
http://www.mediafire.com/?ywjmlttweuy
dgindex, used to index the mpv file
http://neuron2.net/dgmpgdec/dgmpgdec155.zip
megui, used to encode
http://sourceforge.net/project/downloading.php?group_id=156112&filename=megui-0_3_1_1028.exe&a=55118057
avs file used for mine and SEt's:
loadplugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
mpeg2source("C:\Documents and Settings\Eyaaw\Desktop\Kiss of the Dragon\Kiss of the Dragon.d2v")
assumefps(24000,1001)
Spline64Resize(1920,1072)
avsfile used for Tsp's:
loadplugin("C:\Program Files\AviSynth 2.5\plugins\newresize.dll")
loadplugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
mpeg2source("C:\Documents and Settings\Eyaaw\Desktop\Kiss of the Dragon\Kiss of the Dragon.d2v")
assumefps(24000,1001)
Spline64Resize(1920,1072)
__________________________________
When I took the picture of the taskmanager I played the unprocessed mpv sample with the settings below.
FFDshow settings used
Codecs tab
Set Mpeg2 to Libmpeg2, and check "DVD decoding".
Set Avisynth to Avisynth, Raw video to All supported
Subtitles tab, Unchecked
Uncheck "Decode closed captions"
Uncheck "Accept embedded subs"
Uncheck "Accept SSA, ASS, ASS2 Subtitle (experimental)
Vobsub subpage, uncheck Vobsub Enable.
Avisynth tab checked
YV12 checked,
Add FFdshow Video source Unchecked,
3:2 Pulldown box: Ignore Pulldown checked,
check Buffer back/Ahead: 9, 9
setmtmode(5)
Last=ffdshow_source()
setmtmode(2)
LimitedSharpenFaster(strength=11)
LimitedSharpenFaster(strength=11)
distributor()
Queue & Output tab
Queue output samples checked
Output tab
rgb32 checked
high quality yv12 to rgb conversion checked
rgb conversion tab
ycbcr: itu-bt 601
high quality yv12 to rgb conversion checked
Dithering checked
contrast: standard
Output levels: Tv/Projector
__________________________________
MPC clsid, newest version
vmr9 renderless
ffdshow audio and video decoders.
__________________________________
http://thumbnails9.imagebam.com/4186/c1905941854223.gif (http://www.imagebam.com/image/c1905941854223)
http://thumbnails16.imagebam.com/4186/af6ddb41854227.gif (http://www.imagebam.com/image/af6ddb41854227)
Link to see pictures of the stats. In case the picture host is too slow or goes kaput. (http://www.mediafire.com/?miv4dndzim2)
edit,
I'm using a stock speed E6600 cpu with 2 Gb ram, ddr2 I think.
alph@
12th July 2009, 14:02
Jeremy,thanks for rectification of the link
Jeremy Duncan
23rd July 2009, 15:07
src (http://www.mediafire.com/?djz11jcinjj)
dlls (http://www.mediafire.com/?mi1wrmynvw1)
\\\\ What is different about these dll's than the other SEt builds you munkeyed around with?: July 22, 2009
This is second build on July 22. No, now it's july 23 2009.
What did I do?
I found much to my surprise the project wasn't calling all the files in the src folders. So I added those then spent some time optimizing the project settings, making sure mt.dll was made right and then posted them here.
I was going to use upx.exe to shrink the dlls but it didn't work like before, so I didn't shrink the file size this time.
Works pretty good though. :)
SEt's src has missing files in the src project as well so just to let you know.
For instance mt.h isn't in his src project but it's in the src core folder. I think it was mt.h anyway?
Some files in the include libs wern't there either.
I dunno how they weren't there, all this time since I started on making this dll way back when I din't check the project to make sure and now I find this out and I'm gobsmacked stupified.
Anyway it's fine now though. :cool:
G_M_C
6th August 2009, 09:52
So, not beeing an expert at all, i just ask this (probably dumb) question;
How do i migrate to you MT version?
- I download the stuff in the first post of this thread (duh)
But;
- Do I uninstall my previous version of avisynth and install yours (i'm not on 2.5.8 yet) ? Or do i install regular Avisynth 2.5.8 first, and then replace the avisynth.dll with yours ?
- Where do i put MT.dll exactly ? The normal plugin directory ?
- am i then set to use it ? Or do i need the other patches to (like the directshow-patch) ?
buzzqw
6th August 2009, 12:47
afaik
install 2.5.8
substitute the avisynth dll in windows\system32 folder
ADD the mt.dll in windows\system32 folder
done.
BHH
BigDid
6th August 2009, 18:31
afaik
install 2.5.8
substitute the avisynth dll in windows\system32 folder
ADD the mt.dll in windows\system32 folder
BHH
Hi,
MT.dll is an avisynth dll and goes with others in the avisynth "plugin" folder. Other infos from Buzz are ok :)
Jeremy Duncan made a quick troubleshoot guide on 1st page but the install infos could also be usefully added, see:
http://forum.doom9.org/showthread.php?p=1246719#post1246719
Did
Jeremy Duncan
7th August 2009, 05:42
Jeremy Duncan made a quick troubleshoot guide on 1st page but the install infos could also be usefully added, see:
http://forum.doom9.org/showthread.php?p=1246719#post1246719
Did
Ok, all done.
G_M_C
7th August 2009, 16:41
Thanks all :)
Will do the upgrade (from 2.5.6) this weekend !
leeperry
11th August 2009, 12:20
Will do the upgrade (from 2.5.6) this weekend !
be warned that your plugins have to be recompiled w/ the new 2.5.8 avisynth code...otherwise it will crash randomly. I'm back on 2.57.
Gavino
11th August 2009, 13:43
be warned that your plugins have to be recompiled w/ the new 2.5.8 avisynth code...otherwise it will crash randomly. I'm back on 2.57.
Where did you read this?
If it's true, it's a serious error in the production of 2.5.8 MT.
It should never be necessary to recompile plugins unless there is a major change in the interface. That's the whole point of plugins.
SEt
11th August 2009, 13:53
Due to not thread-safe code in avisynth.h plugins indeed should be recompiled if you want stability with MTMode, but it affects Avisynth 2.5.7 just as bad as 2.5.8.
Gavino
11th August 2009, 14:00
Ah, OK, so it's not that an incompatibility has been introduced, it is actually fixing a bug that was in 2.5.7 MT?
SEt
11th August 2009, 14:29
Bug that was in all versions of avisynth.h because no one thought about threading at the time it was written. That means that all existing plugins are potentially unstable with MTMode until recompiled.
I'd say it's serious design error to put logic in avisynth.h if we want extensibility with simple to maintain backward compatibility.
leeperry
11th August 2009, 16:49
oh ok...well my scripts(LSF/GrainFactory3/rgb3dlut) work perfectly fine in 2.57, and crash randomly in 2.58 :(
tedkunich
11th August 2009, 17:32
oh ok...well my scripts(LSF/GrainFactory3/rgb3dlut) work perfectly fine in 2.57, and crash randomly in 2.58 :(
Do your sources contain an audio stream? I found that having an audio stream cause many random crashes with all flavors of MT. Evoking KillAudio() on the source took care of almost all of my crashes.
T
leeperry
11th August 2009, 18:10
I use it only in ffdshow video in MT("___",4) mode, does it matter :confused:
tedkunich
11th August 2009, 23:29
I use it only in ffdshow video in MT("___",4) mode, does it matter :confused:
Couldn't tell you - I have never used ffdshow. You could test the audio theory by adding the KillAudio() function at the beginning of the script (before the first MT call) and see if it resolves your issues. For me, I process video offline, so I can work around the audio issue.
T
leeperry
12th August 2009, 01:47
ok thanks for the tip, I might try it someday.
but 2.57 works fine actually....I might run some benchmarks in VDUB to see whether 2.58 is slighty faster :)
Gavino
12th August 2009, 09:48
Couldn't tell you - I have never used ffdshow. You could test the audio theory by adding the KillAudio() function at the beginning of the script (before the first MT call) and see if it resolves your issues.
As I understand it, when using the Avisynth filter in ffdshow, the audio is not processed by the script anyway, only the video.
Tom Keller
16th August 2009, 06:28
Hmmm... for me this mt avisynth.dll has some problems with DVDRebuilder Pro. In one click mode the encoding wont start... and when starting the encoding process manually, DVDRebuilder crashes after a while with the "old":
Run-time error '9': Subscript out of range.
... error. And i didn't use any MTMode setting at all :( ...
After going back to the regular avisynth.dll, everything worked fine again.
Jeremy Duncan
17th August 2009, 07:48
leeperry,
I deleted the line that might have been causing the incompatibility you were experiencing. Try the new dll's I made today and see if that works with the code you want to use in ffdshow now. And Gavino is right about the audio in ffdshow avisynth.
Tom Keller,
I read your post and made some new dll's you can try. They are in the first post.
Revgen
17th August 2009, 09:31
One thing TSP always did with me when he was developing it was to give me a debug version that created a text file after every process. I would send him the text file after I experienced the bug and he'd make changes.
Jeremy Duncan
17th August 2009, 09:45
I remade the avisynth.dll I wrote about in post #193. All I changed was I shrunk it using upx.exe. The src is the same, I have re-uploaded the src and dlls in the first post. :)
Tom Keller
18th August 2009, 22:15
Thanks for taking the time!
Sadly the problems with DVDRebuilder are still there. But now (after i had some time for testing) it seems, like they are related to only one combination of a particular disc + avisynth mt + last DVDRebuilder version :confused: . If i change one part of that combination, everything works fine:
i tried two different dvds + avisynth mt + last DVDRebuilder => no problem
i tried the "bad" disc + regular avisynth + last DVDRebuilder => no problem
i tried the "bad" disc + avisynth mt + old DVDRebuilder => no problem
So (luckily) it's obviously not a common problem related to your avisynth.dll, but more of a bad fluke...
Atak_Snajpera
1st September 2009, 23:12
tiny request:
could you add MT after Avisynth?
http://img15.imageshack.us/img15/2255/captureltr.png
This would allow me to easly detect if user has regular or multithreaded version of avisynth
Gavino
2nd September 2009, 00:01
tiny request:
could you add MT after Avisynth?
This would allow me to easly detect if user has regular or multithreaded version of avisynth
It's a good idea, but you would still have to allow for version 2.57 MT, which is already out there without this distinguishing mark.
IanB
2nd September 2009, 08:42
Unofficial versions like this probably should have the "SpecialBuild" or "PrivateBuild" fields of the "StringFileInfo" resource filled out. These fields are for just such a purpose.
Gavino
2nd September 2009, 10:31
@Atak_Snajpera
If you are using Avisynth as a library (via the API), you can detect if it is the MT version by checking whether the SetMTMode function exists:
if (env->FunctionExists("SetMTMode")) ...
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.