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 Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 21st March 2006, 16:12   #281  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
aberforthsgoat : are you using version 0.5 of mt and the included avisynth.dll (and copied to the c:\windows\system32 directory)? And please when using both setmtmode and mt inside the same script try testing of it is actually faster(that is fps not cpu utilization) than not using both because there are some overhead by using both filters together.
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 22nd March 2006, 00:20   #282  |  Link
Mr.Bitey
Guest
 
Posts: n/a
TSP,

I didnt realise you wernt supposed to use setmtmode and mt() - there is a large thread on avsforums about using Limitedsharpenfaster and its become 'assumed' (incorrectly by the sound of it) that people should use both.

So people should use either MT(lsf) or SetMTmode() and not both?

Cheers,
Bitey
  Reply With Quote
Old 22nd March 2006, 01:17   #283  |  Link
aberforthsgoat
Registered User
 
Join Date: Oct 2004
Location: Zürich, Switzerland
Posts: 29
Quote:
Originally Posted by tsp
aberforthsgoat : are you using version 0.5 of mt and the included avisynth.dll (and copied to the c:\windows\system32 directory)? And please when using both setmtmode and mt inside the same script try testing of it is actually faster(that is fps not cpu utilization) than not using both because there are some overhead by using both filters together.
Thanks for the response!

I *do* have the whole 0.5 package installed - I'm dead sure of that. But as far as I can tell, I mt() is making a big difference, but setmtmode is making no difference at all in my scripts.

BTW, it's hard to get much of a read on the fps because the OSD flickers constantly between two numbers - I think I'm seeing 21 and 32. With mt() I get a steady flicker between the two. With setmtmode(2) by itself I seems to stick on the 21 more - and occasionally dip all the way down to 9 or 16 or the like.

Peace,

Mike
aberforthsgoat is offline   Reply With Quote
Old 22nd March 2006, 01:36   #284  |  Link
foxyshadis
Angel of Night
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
According to the first page, there's no SetMTMode(0), so something like this to reduce the overhead isn't possible, am I correct?

SetMTMode(3)
Filter()
SetMTMode(0)
MT("Filter2()")
SetMTMode(2)
...

aber, try avstimer to get accurate readings on the speed on scripts (although I haven't read through this thread to see if it's threadsafe), or just time a complete null render with and without.
foxyshadis is offline   Reply With Quote
Old 22nd March 2006, 07:07   #285  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,733
It used to be possible to disable multithreading where needed by calling SetMTMode(0), don't know if it's been removed.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is online now   Reply With Quote
Old 22nd March 2006, 16:15   #286  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
Mr.Bitey: I don't say you shouldn't use setmtmode with mt. I just say that sometimes it's slower to use both together and that you should always check if the framerate is faster with both setmtmode and mt compaired to using mt alone. Another thing the SetMTmode should be the first line in the script before import("") and this script disables SetMTMode completely because only mode 5 is used:
Code:
#note setmode before import
SetMTMode(5) 
Import("C:\Program Files\AviSynth 2.5\plugins\LimitedSharpenFaster.avs")
MT("HQDN3D(1)")
LanczosResize(1440x960)
MT("LimitedSharpenFaster ss_x=1.0,ss_y=1.0,Smode=3,strength=100,overshoot=7)")
aberforthsgoat: try using virtualdub and take time on how long it takes to process the script.

foxyshadis : There are no mode 0. Use mode 5 or 6 instead. mt 0.5 internaly calls SetMTMode(5) and restores the old mode afterwards so you don't have to add SetMTmode(5) before mt and restore the old mode after.
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 24th March 2006, 00:41   #287  |  Link
Mr.Bitey
Guest
 
Posts: n/a
TSP: Thanks for the clarification. I think i'll go revisit my scripts ;-) I do recall SetMTMode(5) seemed to run quicker when used with MT() in my Limitedsharpenfaster script.. Its going to be a long night I think You also mention SetMTMode() should be the first line - so if im using a .avsi named version of limitedsharpen - I should rename it to .avs and manually include?

Cheers,
Bitey
  Reply With Quote
Old 27th March 2006, 17:28   #288  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
Mr.Bitey
one way to test if it is necesary to rename the avsi is to add this after the first SetMTMode:
Code:
subtitle(string(GetMTMode)))
it should show the current mode. If it is larger than zero the SetMTMode works correct.
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 4th April 2006, 08:41   #289  |  Link
Kador
Registered User
 
Join Date: Oct 2005
Location: France
Posts: 17
do you have plans to integrate your avisynth.dll in the mail avisynth development (dir the 2.5.7 final for example) ?
Kador is offline   Reply With Quote
Old 4th April 2006, 19:49   #290  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
kador it will be in the 2.6 release. The changes are too big to be included in the 2.5 version.
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 9th April 2006, 14:57   #291  |  Link
Serbianboss
Registered User
 
Serbianboss's Avatar
 
Join Date: Mar 2006
Posts: 232
Today i tested with version 0.5.

Firstly i copy MT.dll in avisynth plugin directory and copy avisynth.dll in system32.

I am using A64 X2 3800+, capturing to DV avi and than with avisynth and CCE i encode to mpeg2 (720x576)

And always use Convolution 3d filter (avisynth filter).

I tested on 15 minute material and took 36 minute in 2-pass CBR in CCE without crash.


This is code:

Code:
SetMTMode(2)
LoadPlugin("Convolution3d.dll")
avisource("D:\CAPTURE\bmw.avi")
ConvertToYuY2(interlaced=true)
SeparateFields()
odd=SelectOdd.Convolution3D (1, 32, 128, 16, 64, 10, 0)
evn=SelectEven.Convolution3D (1, 32, 128, 16, 64, 10, 0)
Interleave(evn,odd)
Weave()
crop(8,4,-8,-12)
AddBorders(8,8,8,8)
With SetMTMode(2) i get 50% speed up in CCE

So i am interesting is OK just to put SetMTMode(2) at begin?

p.s Congratulations to your multithreaded filter.

Last edited by Serbianboss; 9th April 2006 at 18:54.
Serbianboss is offline   Reply With Quote
Old 9th April 2006, 19:46   #292  |  Link
Serbianboss
Registered User
 
Serbianboss's Avatar
 
Join Date: Mar 2006
Posts: 232
Now i have one error.

When encoding begin, few minutes after it sais:

Mux video buffer overflow.




When i use Mainconcept encoder i get this error



When i try without scrip everything is OK. What can be this?

best regard

Last edited by Serbianboss; 9th April 2006 at 20:07.
Serbianboss is offline   Reply With Quote
Old 11th April 2006, 16:05   #293  |  Link
Serbianboss
Registered User
 
Serbianboss's Avatar
 
Join Date: Mar 2006
Posts: 232
I figure what was problem.

Problem was in CCE. When i use option CBR-system then show me "Mux video buffer overflow". In other case everything as OK.

New results: I encoded 2 hours movie in 2-pass without crach using MT 0.5. It was 40% faster.

TSP, excellent filter.
Serbianboss is offline   Reply With Quote
Old 11th April 2006, 23:41   #294  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
Serbianboss: It's okay to use that script with setmtmode(2) in the first line. Try watching a minute or so for artifacts that might appear if the filters used is not thread safe.
Good you figured out the error with CCE.
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 12th April 2006, 09:14   #295  |  Link
Serbianboss
Registered User
 
Serbianboss's Avatar
 
Join Date: Mar 2006
Posts: 232
What kind of artifacts you mean?

I encoded two hours and i thing that there no have artifacts.
Serbianboss is offline   Reply With Quote
Old 12th April 2006, 09:54   #296  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,733
Compare the output in VirtualDub, one script with SetMTMode and one without it.

I've noticed that sometimes MVTools-related functions require SetMTMode(5), with SetMTMode(2) there are occasional artifacts - they appear as white/grey horizontal stripes.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is online now   Reply With Quote
Old 12th April 2006, 10:11   #297  |  Link
Serbianboss
Registered User
 
Serbianboss's Avatar
 
Join Date: Mar 2006
Posts: 232
I didnt see any artifacts in virtual dub (tested on minute source).
But when in virtual dub go left or right with slider, virtual dub has cloused.

One more thing: With SetMTMode (5) i dont have any increase in speed.
Serbianboss is offline   Reply With Quote
Old 12th April 2006, 12:20   #298  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
that is because setmtmode(5) disables multithreading for the filters below it.
The artifacts is different from filter to filter. Like using blur and sharpen in the same filter using an older version of avisynth.dll caused excessive blur or sharpen in some of the frames.
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 12th April 2006, 12:38   #299  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,733
Is the documentation incorrect then? It says that modes 1-6 are available and that mode 5 is a rather safe one.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is online now   Reply With Quote
Old 12th April 2006, 13:20   #300  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
it is rather safe because only one thread is used so it makes no sense only to use mode 5 alone but it should be used for only part of the script that doesn't work with lower modes like mvtools.
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 16:09.


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