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 8th January 2007, 18:30   #381  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
Zep: I tried your last script:
Code:
SetMTMode(2)
mpeg2source("D:\test.d2v",cpu=0)
Crop(8,8,-8,-12)
Lanczos4Resize(624,352)
and it ran with 90-98% cpu utilization. What version of mpeg2source do you use and does it happen with every source?
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 9th January 2007, 04:03   #382  |  Link
Zep
Registered User
 
Join Date: Jul 2002
Posts: 587
Quote:
Originally Posted by tsp View Post
Zep: I tried your last script:
Code:
SetMTMode(2)
mpeg2source("D:\test.d2v",cpu=0)
Crop(8,8,-8,-12)
Lanczos4Resize(624,352)
and it ran with 90-98% cpu utilization. What version of mpeg2source do you use and does it happen with every source?
i use 1.4.9.beta 7 currently of the DGDecode.dll

yes it happens when I use avisource and directshowsource
on all video formats as well as well as all source indexed sources.

i went back to 2.5.6 and all is fine. Also 2.6 works fine.
(the alpha that IIRC wilbert compiled a few months ago)
Zep is offline   Reply With Quote
Old 9th January 2007, 18:17   #383  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
Zep: Could you try this version.
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 9th January 2007, 19:03   #384  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
That seems to work much better in SetMTMode mode. The first version seemed to have lock contention and offer minimal gain, but this was posted before I could complain.
foxyshadis is offline   Reply With Quote
Old 9th January 2007, 19:55   #385  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
foxyshadis: yes that sound right as I removed the Enter/LeaveCriticalSection that I added in the first 2.5.7MT version in the cache code. It was added in the first place because I overlooked an unprotected relinking of a double-linked list (that moves a frame that are being generated to the front of the list of cached frames when the frame is ready). Turns out it was not really needed(as it is done by the thread that generated the frame) so I removed the relinking in last posted version.
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 9th January 2007, 21:56   #386  |  Link
Zep
Registered User
 
Join Date: Jul 2002
Posts: 587
Quote:
Originally Posted by tsp View Post
Zep: Could you try this version.
better but still not as good as older versions and still getting wild frame rate roller coaster. in fact if i play a preview ( do not encode ) and use assumefps(300) so that it previews at max speed from an avisource xvid using either of the following I get total stalls and stuttering and half the frame rate (if that) compared to turning off MT.

SetMTMode(2)
avisource("d:\test.avi")
Lanczos4Resize(320,240)
AssumeFPS(300)

SetMTMode(6)
avisource("d:\test.avi")
SetMTMode(2)
Lanczos4Resize(320,240)
AssumeFPS(300)



So basically without MT it plays smooth and at 230 FPS with MT on I get wild rates from 0 (stalls out) to 130 and the preview stutters like crazy. granted that is an extreme example. Anyway, without MT I'm only using 70% CPU and with MT it now uses about 90% but FPS tanks and stalls and stutters. On slower FPS and encoding it was so so. much better than version 1 but not as good as 2.5.6 and the 2.6 alpha.


maybe you could try that extreme example above and the problem will show up for you

thanks

Last edited by Zep; 9th January 2007 at 22:40.
Zep is offline   Reply With Quote
Old 9th January 2007, 23:35   #387  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
Zep: Now I can reproduce it with a xvid source(using xvid 1.1 final but not with ffdshows libavcodec) but not with mjpeg encoded files. Seems to be some pretty bad interactions between xvid 1.1 and my latest version.
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 9th January 2007, 23:38   #388  |  Link
Serbianboss
Registered User
 
Serbianboss's Avatar
 
Join Date: Mar 2006
Posts: 232
I now tested on 133738 frames (1 hour 30 minute) and script didnt crash. I am using avisynth 2.57 and first release avisynthMT 2.57(7 januar version)
Just use setmtmode(2) at beginning of script and cpu usage 100%

Does we need to install this avisynthmt.dll
http://forum.doom9.org/showthread.ph...674#post930674
Serbianboss is offline   Reply With Quote
Old 9th January 2007, 23:43   #389  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
Serbianboss: You might want to try it as it should be a little faster.
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 10th January 2007, 08:05   #390  |  Link
Zep
Registered User
 
Join Date: Jul 2002
Posts: 587
Quote:
Originally Posted by tsp View Post
Zep: Now I can reproduce it with a xvid source(using xvid 1.1 final but not with ffdshows libavcodec) but not with mjpeg encoded files. Seems to be some pretty bad interactions between xvid 1.1 and my latest version.
hmmm ok I'm using the Xvid 1.2 SMP build here so the decoding must be about the same as 1.1 since you saw it there as well.

So you are seeing some sort of decoding caching issue or something? I'm just curious to the details of what is going on


thanks
Zep is offline   Reply With Quote
Old 10th January 2007, 08:11   #391  |  Link
Zep
Registered User
 
Join Date: Jul 2002
Posts: 587
Quote:
Originally Posted by Serbianboss View Post
Just use setmtmode(2) at beginning of script and cpu usage 100%
i hate to rain on your parade but you should never go by CPU usage. You should go by FPS/TIME and compare that to a run without MT. I'm just saying increased CPU load does not always equal higher FPS and faster encode times etc...
Zep is offline   Reply With Quote
Old 10th January 2007, 12:39   #392  |  Link
Serbianboss
Registered User
 
Serbianboss's Avatar
 
Join Date: Mar 2006
Posts: 232
Quote:
You might want to try it as it should be a little faster.
I try that version(9 januar) on 5 minutes video and speed was the same like previous avisynthMT.

Quote:
i hate to rain on your parade but you should never go by CPU usage. You should go by FPS/TIME and compare that to a run without MT. I'm just saying increased CPU load does not always equal higher FPS and faster encode times etc...
Its importan cpu usage, because when i always have 100% or 80% cpu usage i have almost double speed in CCE.
For example, with reinterlance script instead 8 hour to encode, with 100% cpu usage i have double speed and need 4 hour to encode complete video.
Serbianboss is offline   Reply With Quote
Old 10th January 2007, 12:53   #393  |  Link
MacAddict
XviD User
 
Join Date: Oct 2004
Location: Ky
Posts: 190
Quote:
Originally Posted by Serbianboss View Post
Its importan cpu usage, because when i always have 100% or 80% cpu usage i have almost double speed in CCE.
For example, with reinterlance script instead 8 hour to encode, with 100% cpu usage i have double speed and need 4 hour to encode complete video.
Think what Zep was saying is that you shouldn't trust the CPU usage entirely when judging the MT plugin builds. You might see both of your CPU graphs using 95-100% at all times yet your encode is 50% slower because of a possible bug somewhere. Time tests seems to be the only accurate and sure way to judge the effectiveness.
__________________
DFI NF4 SLI Expert | Opteron 165 CCBBE 0616 XPMW (9x325HTT=2.9Ghz) | 2x1GB G.Skill HZ (3-4-4-8-12-16-2T) | LG 62L DVD/CD | Geforce 7300GT | All SATA | Antec 650 Trio PSU | XP SP2
MacAddict is offline   Reply With Quote
Old 11th January 2007, 02:59   #394  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
Firetrucks are red.
Your car is red.
Therefore your car is a firetruck!


100% CPU means no idle time. It does not mean that the work is 100% useful. Dumb code running around in a hard loop waiting for the other thread to release a resource will be 100% busy but do no usefull work!

Idle CPU time simply means the CPU is not the bottleneck! Something else is at 100% i.e. disk, PCI bus, Memory Bus, Cache or etc
IanB is offline   Reply With Quote
Old 17th January 2007, 18:20   #395  |  Link
pelle412
Pinhead
 
pelle412's Avatar
 
Join Date: Sep 2002
Location: Twin Cities, MN, USA
Posts: 158
Hi, I just started play with this recently to see if I could get a RemoveDustMC script to run a bit faster. I am using the latest version of MT.dll and the version of avisynth.dll that was updated from RC3 of 2.5.7.

The script runs fine and quite a bit faster but after maybe half an hour it just stops. I tried both VirtualDub and avs2avi and they just stop progressing after a while. I haven't really experimented much with different modes. Would that be a reason it hangs after a while?

Quote:
SetWorkingDir("E:\AviSynth\")
LoadPlugin("MT.dll")
SetMTMode(2,0)
LoadPlugin("DGDecode.dll")
LoadPlugin("Decomb.dll")
LoadPlugin("RemoveDirt.dll")
LoadPlugin("RemoveGrain.dll")
LoadPlugin("ColorMatrix.dll")
LoadPlugin("Repair.dll")
LoadPlugin("SSETools.dll")
LoadPlugin("mvtools.dll")
LoadPlugin("MaskTools.dll")
LoadPlugin("mt_masktools.dll")
LoadPlugin("VagueDenoiser.dll")
Import("E:\AviSynth\RemoveNoiseMC.avs")
mpeg2source("E:\Movie\a\x.d2v",info=3).ColorMatrix(hints=true,interlaced=true)
AssumeTFF()
Telecide(guide=1,post=4,hints=true).Decimate(mode=3,quality=3)
MT("RemoveNoiseMC()",2)
pelle412 is offline   Reply With Quote
Old 17th January 2007, 18:26   #396  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
You can't use any MVTools-related stuff with MT or SetMTMode. Besides, you shouldn't use both at the same time.
__________________
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 18th January 2007, 16:30   #397  |  Link
henryho_hk
Registered User
 
Join Date: Mar 2004
Posts: 889
Is there a MT version of avisynth.dll for AVISynth 2.5.7 release?

Edit: Oops ~~~ Thanks kurt & Serbianboss.

Last edited by henryho_hk; 18th January 2007 at 17:00.
henryho_hk is offline   Reply With Quote
Old 18th January 2007, 16:44   #398  |  Link
kurt
sidekick
 
kurt's Avatar
 
Join Date: Apr 2004
Location: old Europe
Posts: 610
http://forum.doom9.org/showthread.ph...674#post930674
__________________
greets, kurt.
Pioneer PDP-427 XA | Popcorn Hour NMT C-200 | Sony STR-DB 840 QS | Canton Ergo 91 DC
kurt is offline   Reply With Quote
Old 18th January 2007, 16:46   #399  |  Link
Serbianboss
Registered User
 
Serbianboss's Avatar
 
Join Date: Mar 2006
Posts: 232
Read posts!

http://forum.doom9.org/showthread.ph...674#post930674
Serbianboss is offline   Reply With Quote
Old 21st January 2007, 02:38   #400  |  Link
J-Wo
Registered User
 
Join Date: Jan 2003
Posts: 213
Hey, decided to give the new MT avisynth.dll for 2.5.7 a try. I'm doing a 2-pass VBR encode with CCE and while my CPU usage started around 95-98%, after 30 minutes it's dropped down to 77-83%. Encoding speed has likewise dropped down from 3.60x to 3.33x. Not sure if that is meaningful at all, just thought I'd post here tho. Here's my script:
Code:
setmtmode(2)
loadplugin("D:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")

mpeg2source("E:\MOVIE\VTS_01_1.d2v",idct=6)
Lanczos4Resize(720, 464, 0, 12, 720, 552)
AddBorders(0, 8, 0, 8)
AssumeFPS(23.976, true)
LetterBox(0, 0, 8, 8)
ConvertToYUY2()
J-Wo 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 07:28.


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