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 5th January 2007, 20:11   #361  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,659
MVTools is still not multithreading friendly. The idx's get all mixed up which will cause problems sooner or later. I think Fizick is considering turning MVTools into multithread-friendly way but I don't know if he's come up with any ideas yet.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 5th January 2007, 20:34   #362  |  Link
Serbianboss
Registered User
 
Serbianboss's Avatar
 
Join Date: Mar 2006
Posts: 232
I try your script for MVtools and cpu usage is 53%. Its slower, i dont know why.

Quote:
mvtools might produce wrong result with setmtmode
Does some users complain about this? I only tested on few minutes of source. It dosnt crash and didnt see anything strange. I will test on 2 hour video to see does have some artifacts or no(if succeed to encode to the end).

For second script- also used limitedsharpen faster (modded version, 29 Oct 2005), 2.5.6 avisynth, new mt_masktools, MT 0.5

That script sometimes work good sometimes work bad. For example now at moment its encode ok one minute test video clip. And when test again that script fall. So its not reliable.

Can you suggest parameters for second script.

@Boulder

What if we dosnt use idx parameter, maybe be better.
Serbianboss is offline   Reply With Quote
Old 5th January 2007, 20:43   #363  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,659
It might or might not work. You could use a metrics comparison (SSIM, PSNR) to check whether the output is exactly the same as without SetMTMode and using idx. Still, if you don't use idx, MVTools is much slower so you might not benefit from multithreading at all.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 5th January 2007, 21:04   #364  |  Link
Serbianboss
Registered User
 
Serbianboss's Avatar
 
Join Date: Mar 2006
Posts: 232
Quote:
you could use a metrics comparison (SSIM, PSNR) to check whether the output is exactly the same as without SetMTMode and using idx
How to do this to be sure?

I now test MVtools script with different parameters. I insert lambda,delta,overlap and script post above have delta pel overlap sharp.

Code:
setmtmode(2)
source = AVISource("C:\Documents and Settings\Nenad\Desktop\vulkani.avi").Trim(11368,12867)

fields=source.AssumeBFF().SeparateFields() 

backward_vec2 = fields.MVAnalyse(isb = true, lambda = 1000, delta = 2,overlap=4,idx=1)
backward_vec1 = fields.MVAnalyse(isb = true, lambda = 1000, delta = 1,overlap=4,idx=1)
forward_vec1 = fields.MVAnalyse(isb = false, lambda = 1000, delta = 1,overlap=4,idx=1)
forward_vec2 = fields.MVAnalyse(isb = false, lambda = 1000, delta = 2,overlap=4,idx=1)
fields.MVDegrain2(backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=800,idx=1)
Weave()
I test this script with and without idx=1 and result are same. Speed was 0.12 in CCE(cpu usage 98-100%) with setmtmode(2) with and without idx=1.
Serbianboss is offline   Reply With Quote
Old 5th January 2007, 21:07   #365  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,659
Find the necessary plugins and read the docs.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 5th January 2007, 21:33   #366  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
serbianboss: Ok got your script to crash. It seems that it is leakkernelbob that are causing it so try this version:
Code:
setmtmode(2)
LoadPlugin("RemoveGrainSSE3.dll")
LoadPlugin("PeachSmoother")
LoadPlugin("LeakKernelDeint.dll")
LoadPlugin("mt_masktools.dll")
import("C:\Program Files\AviSynth 2.5\plugins\limitedsharpenfaster.avs")


avisource("C:\Documents and Settings\Nenad\Desktop\vulkani.avi")
Trim(11368,12867)
crop(8,4,-8,-12)
ConvertToYuY2(interlaced=true)
AssumeBFF()
setmtmode(6)
LeakKernelBob(Order=0,threshold=1)
setmtmode(2)
PeachSmoother(NoiseReduction = 80, Stability = 25, Spatial = 200)
limitedsharpenfaster(strength=100)

AssumeBFF()
SeparateFields()
SelectEvery(4,0,3)
Weave() 
AddBorders(8,8,8,8)
[edit]
The above script still crashes so you will have to use another bober or setting threshold=0 as it looks like the code that produces the motion mask in leakkerneldeint causes the crashes.
[/edit]
The other script that I posted might be slower due to the overhead of changing mt mode from 2 to 5 in the script
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/

Last edited by tsp; 5th January 2007 at 22:28.
tsp is offline   Reply With Quote
Old 6th January 2007, 01:13   #367  |  Link
Serbianboss
Registered User
 
Serbianboss's Avatar
 
Join Date: Mar 2006
Posts: 232
That script also crash evan if set thresold=0. Main reason is leakkernelbob.

I now try this script. I am using Tdeint(mode=1).

Code:
setmtmode(2)
LoadPlugin("RemoveGrainSSE3.dll")
LoadPlugin("PeachSmoother")
LoadPlugin("mt_masktools.dll")
import("C:\Program Files\AviSynth 2.5\plugins\limitedsharpenfaster.avs")

avisource("C:\Documents and Settings\Nenad\Desktop\vulkani.avi")
Trim(11368,12867)
crop(8,4,-8,-12)
#ConvertToYuY2(interlaced=true)
AssumeBFF()

TDeint(mode=1)
DeGrainMedian (limitY=5,limitUV=7,mode=1)
VagueDenoiser(threshold=4, method=1, nsteps=6)

limitedsharpenfaster(smode=4,strength=100)

AssumeBFF()
SeparateFields()
SelectEvery(4,0,3)
Weave() 
AddBorders(8,8,8,8)
I tried this script and didnt crached(test 1 minute video). Must to try more material to be shure that is threadafe. It seems that tdeint dosnt have threshold parameter.

Its slower(because tdeint is slow) but need to test more.

Script with MVtools is ok just to stay Setmtmode(2) at beginning of script?

@boulder

I find SSIM plugin on wanterprise site but didnt find any documentation. And didnt find PSNR plugin.

So if you know where can find PSNR and documentation for SSIM it would be helpful.
Serbianboss is offline   Reply With Quote
Old 6th January 2007, 10:33   #368  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,659
Quote:
Originally Posted by Serbianboss View Post
It seems that tdeint dosnt have threshold parameter.
You should really learn how to read the docs..
Quote:
I find SSIM plugin on wanterprise site but didnt find any documentation.
A simple search for "ssim" would have shown you this thread : http://forum.doom9.org/showthread.ph...highlight=ssim
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 6th January 2007, 13:16   #369  |  Link
Serbianboss
Registered User
 
Serbianboss's Avatar
 
Join Date: Mar 2006
Posts: 232
Quote:
A simple search for "ssim" would have shown you this thread
searched but didnt showed on list.

@tsp

Script with tdeint crashed. Similar like likekernelbob, sometimes crash sometimes work.
Serbianboss is offline   Reply With Quote
Old 7th January 2007, 00:02   #370  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
Serbianboss: I'm trying to track down what is happening but as usual it is rather hard to figure out this bugs.
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 7th January 2007, 02:38   #371  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
hmm I think I found the bug. I created a new version multithreaded version of avisynth (based on 2.5.7 RC3) that contains the fix. It can be downloaded here. It might also fix the rare CCE crash although I haven't tested that.
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 7th January 2007, 03:02   #372  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,436
Ah, so all this time all we needed to get an updated MT was to find a bug! (I know, RC3 is probably going to be the final.)
__________________
There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order.
foxyshadis is offline   Reply With Quote
Old 7th January 2007, 10:27   #373  |  Link
Serbianboss
Registered User
 
Serbianboss's Avatar
 
Join Date: Mar 2006
Posts: 232
I am still using 2.56. Can this be used with that version or need to install new version

Last edited by Serbianboss; 7th January 2007 at 10:47.
Serbianboss is offline   Reply With Quote
Old 7th January 2007, 12:40   #374  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
I think you can use it without installing 2.57 but as it just went final I would recommend you to install it first
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 7th January 2007, 19:22   #375  |  Link
Serbianboss
Registered User
 
Serbianboss's Avatar
 
Join Date: Mar 2006
Posts: 232
I will install new avisynth and test.
Did you test with new avisynth, did crash or no?
Serbianboss is offline   Reply With Quote
Old 7th January 2007, 19:36   #376  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
I played about 45000 frames with no crash with your script using the old version of avisynthMT it crashed or locked up after about 45-4000 frames.
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 8th January 2007, 02:25   #377  |  Link
Serbianboss
Registered User
 
Serbianboss's Avatar
 
Join Date: Mar 2006
Posts: 232
I install avisynth 2.57 (31 dec version) and then copy your avisynth dll(7 januar version).

Test on 1500 frames in CCE, two pass and script didnt crash.

Using this script, just with setmtmode(2) CPU was all time 100%

Code:
setmtmode(2)

LoadPlugin("RemoveGrainSSE3.dll")
LoadPlugin("LeakKernelDeint.dll")
LoadPlugin("mt_masktools.dll")
import("C:\Program Files\AviSynth 2.5\plugins\limitedsharpenfaster.avs")

avisource("C:\Documents and Settings\Nenad\Desktop\vulkani.avi")
Trim(11368,12867)
crop(8,4,-8,-12)
#ConvertToYuY2(interlaced=true)
AssumeBFF()

LeakKernelBob(Order=0,threshold=2)
DeGrainMedian (limitY=5,limitUV=7,mode=1)
VagueDenoiser(threshold=4, method=1, nsteps=6)


limitedsharpenfaster(strength=100)

AssumeBFF()
SeparateFields()
SelectEvery(4,0,3)
Weave() 
AddBorders(8,8,8,8)
Quote:
I played about 45000 frames with no crash with your script using the old version of avisynth
You mean avisynth 2.56. MT is still 0.5 version

Last edited by Serbianboss; 8th January 2007 at 02:28.
Serbianboss is offline   Reply With Quote
Old 8th January 2007, 07:32   #378  |  Link
pyrates
Registered User
 
Join Date: Jan 2006
Posts: 101
Now that AviSynth 2.5.7 has been released, is there going to be a new release of the MT plugin made for it? Like there was one made for 2.5.6a.
pyrates is offline   Reply With Quote
Old 8th January 2007, 07:50   #379  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
pyrates: Yes you can get in in this post (RC3=final). I will make more official announcement later.
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 8th January 2007, 10:52   #380  |  Link
Zep
Registered User
 
Join Date: Jul 2002
Posts: 587
Quote:
Originally Posted by tsp View Post
pyrates: Yes you can get in in this post (RC3=final). I will make more official announcement later.
hi tsp,

AMD 64 X2 (dual core)

just tried it and something is wrong. A super simple script from HDTV TS source encoding to Xvid. The first I get 68 FPS and total CPU at 71% the second i get a wild roller coaster constantly the whole way from 4 (feels like it is stalling) to 80 fps with an average of just 33 FPS and Total CPU only hitting 50% ( each core at 50% give or take so total CPU = 50%) The old version 2.5.6 from your site i got 99% total CPU and 87FPS as each core would hit 99%. The older version really helps the Lanczos4Resize call big time.

#SetMTMode(6)
mpeg2source("D:\test.d2v",cpu=0)
Crop(8,8,-8,-12)
#SetMTMode(2)
Lanczos4Resize(624,352)

SetMTMode(6)
mpeg2source("D:\test.d2v",cpu=0)
Crop(8,8,-8,-12)
SetMTMode(2)
Lanczos4Resize(624,352)


doing this makes it even slower and a more jerky FPS

SetMTMode(2)
mpeg2source("D:\test.d2v",cpu=0)
Crop(8,8,-8,-12)
Lanczos4Resize(624,352)


Thoughts?

Thanks

Last edited by Zep; 8th January 2007 at 10:54.
Zep 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 19:16.


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