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 27th August 2008, 23:52   #941  |  Link
Bexley
Registered User
 
Join Date: Mar 2005
Posts: 64
Quote:
Originally Posted by Merlin7777 View Post
What codec are you encoding with?
MPEG-2. This is for DVD.

I'm not encoding with VDub, just using it to test the script.
Bexley is offline   Reply With Quote
Old 28th August 2008, 00:06   #942  |  Link
Adub
Fighting spam with a fish
 
Adub's Avatar
 
Join Date: Sep 2005
Posts: 2,699
Hmm...Virtualdub can be a little awkward when showing processor usage.

Actually, showing processor usage of Avisynth scripts in general is a little weird. I find the best way to know processor usage is by dragging and dropping the script into Media Player Classic, and look at the cpu usage there. If it still says 25%, then that is an issue and we can work to solve that.

However, it it racks up and starts using ~80% or more, and you are only getting 1-2fps, then there is nothing you can do about it. (except overclock or get a better processor.)
__________________
FAQs:Bond's AVC/H.264 FAQ
Site:Adubvideo
Adub is offline   Reply With Quote
Old 28th August 2008, 01:07   #943  |  Link
Bexley
Registered User
 
Join Date: Mar 2005
Posts: 64
No, it's really 25%. I've checked it in XP with Performance Monitor and in Wine with Gnome System Monitor. Performance is also the same whether I have the SetMTMode() command or not. It looks like it's really only using 1 core.

2FPS is only marginally better than I was getting with my old single-core Athlon64 3500+.
Bexley is offline   Reply With Quote
Old 28th August 2008, 01:54   #944  |  Link
thetoof
Sleepy overworked fellow
 
Join Date: Feb 2008
Location: Maple syrup's homeland
Posts: 933
iirc, setmtmode must be the very first line of your script... and if the filters are not compatible with SetMTMode(2,0), make several calls of SetMTMode by changing the mode.
Also, I recommend testing increasing the # of thread since you can use more threads than the # of CPU you have to make it run faster... it all depends on your filterchain.
__________________
AnimeIVTC() - v2.00
-http://boinc.berkeley.edu/-
Let all geeks use their incredibly powerful comps for the greater good (no, no, it won't slow your filtering/encoding :p)
thetoof is offline   Reply With Quote
Old 28th August 2008, 04:48   #945  |  Link
Bexley
Registered User
 
Join Date: Mar 2005
Posts: 64
That got it. I moved SetMTMode to the first line and not much happened. But then I increased the number of threads to 8 and CPU usage shot up to 75%. At 12 threads it hit 100% and I'm getting 6-8fps. That'll do nicely.

Thanks for the assist.

HOWEVER,

I understood from my searching not to use SetMTMode before Telecide().Decimate() because it splits the frame up and telecide needs the whole frame intact to do its combing detection. That's why I had SetMTMode after telecide in my script. Is this not right, or have I misunderstood something?
Bexley is offline   Reply With Quote
Old 28th August 2008, 06:06   #946  |  Link
squid_80
Registered User
 
Join Date: Dec 2004
Location: Melbourne, AU
Posts: 1,963
SetMTMode does not split frames for processing. MT() does.
squid_80 is offline   Reply With Quote
Old 13th September 2008, 07:52   #947  |  Link
lych_necross
ZZZzzzz...
 
lych_necross's Avatar
 
Join Date: Jan 2007
Location: USA
Posts: 303
I was wondering, is there any plan to update MT to support Avisynth 2.58 when it goes final?
lych_necross is offline   Reply With Quote
Old 13th September 2008, 08:19   #948  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
Yes, such plan was existed. http://forum.doom9.org/showthread.ph...22#post1063222
but tsp is absent since jan2008.

may be you will do it?
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 13th September 2008, 09:22   #949  |  Link
lych_necross
ZZZzzzz...
 
lych_necross's Avatar
 
Join Date: Jan 2007
Location: USA
Posts: 303
I would love to do it; however, I don't know how. Maybe one of the Avisynth devs could undertake the update or maybe merge MT with 2.58 when it goes final.
lych_necross is offline   Reply With Quote
Old 13th September 2008, 10:41   #950  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
The official support of MT is planned by Avisynth dev in Avisynth 2.6.0
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 14th September 2008, 05:47   #951  |  Link
halsboss
likes to tinker
 
Join Date: Jan 2004
Location: girt by sea
Posts: 635
tsp's last post was 4 April 2008 http://forum.doom9.org/showthread.ph...40#post1121340

I hope like Crikey tsp's OK and stays around, or I'll be with the older MT version until 2.6.0 ... I'd suggest lots of people now depend on MT for significantly increased throughput since multi-cores have become ubiquitous
halsboss is offline   Reply With Quote
Old 14th September 2008, 06:16   #952  |  Link
cyberbeing
Broadband Junkie
 
Join Date: Oct 2005
Posts: 1,859
Quote:
Originally Posted by halsboss View Post
tsp's last post was 4 April 2008 http://forum.doom9.org/showthread.ph...40#post1121340

I hope like Crikey tsp's OK and stays around, or I'll be with the older MT version until 2.6.0 ... I'd suggest lots of people now depend on MT for significantly increased throughput since multi-cores have become ubiquitous
TSP is still around, he probably is just waiting for 2.5.8 final to be released before making a new MT version.

Quote:
Originally Posted by TSP's profile
Last Activity: 11th September 2008 13:21
cyberbeing is offline   Reply With Quote
Old 15th September 2008, 07:11   #953  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
Quote:
Originally Posted by Fizick View Post
The official support of MT is planned by Avisynth dev in Avisynth 2.6.0
Or more precisely: Whenever IanB obtains a dual-core processor.
foxyshadis is offline   Reply With Quote
Old 15th September 2008, 12:09   #954  |  Link
Leak
ffdshow/AviSynth wrangler
 
Leak's Avatar
 
Join Date: Feb 2003
Location: Austria
Posts: 2,441
Quote:
Originally Posted by foxyshadis View Post
Or more precisely: Whenever IanB obtains a dual-core processor.
Good god - the cheapest dual-core celerys go for 38 EUR around here, with cheap mainboards at around the same price...

Anybody for setting up an "get IanB a dual-core machine" fund?
__________________
now playing: [artist] - [track] ([album])
Leak is offline   Reply With Quote
Old 15th September 2008, 13:21   #955  |  Link
halsboss
likes to tinker
 
Join Date: Jan 2004
Location: girt by sea
Posts: 635
If we could paypal it, I'm in for au$10.
halsboss is offline   Reply With Quote
Old 16th September 2008, 04:33   #956  |  Link
Zep
Registered User
 
Join Date: Jul 2002
Posts: 587
Quote:
Originally Posted by halsboss View Post
If we could paypal it, I'm in for au$10.
me too


I would really love to get MT at the IanB level lol as well as a file read/decode to MEGA cache that can read WAY ahead and use as much ram as I throw at it. (ram disk is just not as good since it would have to be 20+ gigs to fit my .TS file on it lol)

SetDecodeCacheSize(2048)

etc...

I wonder if that could be made as a separate process so those using 32 bit OS could use more than 2 gigs?
Zep is offline   Reply With Quote
Old 16th September 2008, 05:24   #957  |  Link
Quark.Fusion
Registered User
 
Quark.Fusion's Avatar
 
Join Date: Jun 2008
Posts: 177
Quote:
Originally Posted by tsp View Post
MTsource
MTSource(string filter,int delta,int threads,int max_fetch)

All parameters are named. Function parameters:

filter string = No default
source filter to run multithreaded. Currently only internal and external source filters are supported (like DirectShowSource, Avisource, MPEG2Source) . You can use an avs defined filter or a non-source filter but it might crash or produce frame corruption.

delta int = 1
this is how many frames there are between each frame request so if you are only going to read every second frame set it to 2 or if you are reading the frames backwards set it to -1. More complex frame access pattern like SelectEvery(10,3,6,7) are not supported (but might work anyway as the requested frames are in the cache, there will just be some waisted memory from non requested frame in the cache)

threads int = 2
number of threads to run. Set this to the number of threads your computer is able to run concurrently.

max_fetch int = 30
This is the maximum number of frames ahead of the currently requested frame that MTsource will fetch. Setting it to low will leaving the threads idle for most of the time and setting it to high will waste to much memory.
Just use last parameter, that not in size, but you usually don't know how much memory avisynth will use before running test pass. Use Width()*Height()*1.5*frames for cache size for YV12.
Quark.Fusion is offline   Reply With Quote
Old 16th September 2008, 05:25   #958  |  Link
Quark.Fusion
Registered User
 
Quark.Fusion's Avatar
 
Join Date: Jun 2008
Posts: 177
For separate process you can use TCPserver/TCPsource, but they will eat some CPU time. And you still need 64-bit OS to use >3.5GB of memory.

Last edited by Quark.Fusion; 16th September 2008 at 05:28.
Quark.Fusion is offline   Reply With Quote
Old 16th September 2008, 06:42   #959  |  Link
saint-francis
too much lurking
 
saint-francis's Avatar
 
Join Date: Sep 2006
Location: Valhalla
Posts: 668
Quote:
Originally Posted by foxyshadis View Post
Or more precisely: Whenever IanB obtains a dual-core processor.
That's nuts. We'll buy him one. I'm in for some cash too.
saint-francis is offline   Reply With Quote
Old 16th September 2008, 06:58   #960  |  Link
lych_necross
ZZZzzzz...
 
lych_necross's Avatar
 
Join Date: Jan 2007
Location: USA
Posts: 303
I don't think that its the lack of a dual-core processor thats stopping IanB (or anyone else). They're pretty cheap now a days. I think its a lack of interest thats preventing further development. Or maybe severe procrastination.
lych_necross 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 09:54.


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