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 Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 19th May 2012, 14:30   #401  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
Quote:
Originally Posted by SEt View Post
If the filter handles non-sequential requests correctly – it'll work exactly as in non-MT mode, but if it doesn't – things will break (note that they will also break in non-MT mode when some filter reorders frames like SelectEven or Trim).
I think in this case you could use tsp's RequestLinear before the filter, am I right?
__________________
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 19th May 2012, 14:33   #402  |  Link
SEt
Registered User
 
Join Date: Aug 2007
Posts: 374
In theory – yes (but after the filer, not before), in practice – RequestLinear doesn't work here.
SEt is offline   Reply With Quote
Old 21st May 2012, 12:03   #403  |  Link
BugiBugBug
Registered User
 
Join Date: Dec 2006
Posts: 10
Thank you both for the information. I think the source of the misunderstanding lays in the filter sequence. I've looked at the Wiki once more, and in combination with your explanation, the problem is that an AVS script is written sequentially from source to finished output, while the actual way of functioning is the other way around. This is a different perspective, and requires a change of thinking.

Hence if I've got two frames and two threads, these are requested at the end of the filter chain, and thus also split first at the end of the filter chain. Within each thread, these frames work just as they would if there was one thread, as the filter works on one frame at the time, and can simply request from the cache(MT) above it any frames it needs to work on that particular frame.

The effectiveness of the filter is thus not affected if the filter can retrieve the frame sequence it requires. The only way MT could thus negatively influence the (quality of the) execution of a temporal filter is if (1) the sequence does not provide all the necessary frames, but more likely: (2) the frames that the filter retrieves from the preceding cache are not in the right order or are not sequential/missing some frames.

Problems would only appear if the cache preceding the temporal filter does not output frames their right sequence (meaning it just gives out an alternating sequence of frames, e.g. 1,3,5,7 to thread 1 and 2,4,6,8 to thread 2 - or even more chaotic combinations).
My guess is this is what primarily constitutes the differences between the SetMTmodes.

A truly spatial filter such as a resizer should, under that logic, function regardless of the mode because it does not matter which frame it gets. Important is that the sequence is kept in tact in the cache that follows the filter execution.

Once again, thank you for clearing this up for me. I hope this will be useful for anyone else not familiar with the subject.

On a side note, as already expected, the increase in speed on my machine (a 5300 Merom) was very small (about 0,1 fps on a typical 11-13fps using AVCHD device preset with -preset-medium). Naturally this is because the AVS script is very simple.
But I did use this script to fprofile my own x264 builds, because it is the predominant way I'll be encoding.

Last edited by BugiBugBug; 21st May 2012 at 12:06.
BugiBugBug is offline   Reply With Quote
Old 21st May 2012, 14:50   #404  |  Link
SEt
Registered User
 
Join Date: Aug 2007
Posts: 374
If "sequence does not provide all the necessary frames" it'll likely would just throw an error, not invent missing data.
All frames are explicitly numbered and requested by number: if you asked for frame n – you can't get some other frame.
SEt is offline   Reply With Quote
Old 23rd May 2012, 18:21   #405  |  Link
ajp_anton
Registered User
 
ajp_anton's Avatar
 
Join Date: Aug 2006
Location: Stockholm/Helsinki
Posts: 805
From RGB24, ConvertToY8 results in a slight shift to the right. Going first to YV12 and then to Y8 works.
ajp_anton is offline   Reply With Quote
Old 27th May 2012, 00:08   #406  |  Link
DVDBob
Registered User
 
Join Date: May 2010
Posts: 120
How should i configure the mt settings for a AMD Phenom II X6 1055T???

So i can use all 6 cores.
DVDBob is offline   Reply With Quote
Old 29th May 2012, 15:36   #407  |  Link
pbristow
Registered User
 
pbristow's Avatar
 
Join Date: Jun 2009
Location: UK
Posts: 263
Quote:
Originally Posted by DVDBob View Post
How should i configure the mt settings for a AMD Phenom II X6 1055T???

So i can use all 6 cores.
AH, here it is folks: The miracle moment. The moment when the baby stares at the five funny stick things poking out of his hand and asks "how do I use these?".

The bad news, DVDBob, is that there's no simple answer to that question. But the good news is that you will be learning lots of new answers to it every day, for the rest of your life.

For a basic "get you started" template script, look at the top post in the following thread:
http://forum.doom9.org/showthread.ph...66#post1312666

For further info, see this page, starting about halfway down (under "ed avisynth MT 2.5.7.5 ")
http://avisynth.org/mediawiki/MT

Have fun!
pbristow is offline   Reply With Quote
Old 31st May 2012, 12:24   #408  |  Link
Rat Killer
Registered User
 
Join Date: Mar 2004
Location: Houston
Posts: 112
Need a hand. MeGUI seems to have done some updates including DGindexNV and now when attempting to index a file DGIndexNV.exe gives the following error:

The procedure entry point cuStreamDestroy_v2 could not be located in the dynamic link library nvcuda.dll

I have an Nvidia NVS 4200M running on a Dell laptop under Windows XP if it matters. Nvidia driver version 268.83 which is the latest from Dell.

Thanks for any suggestions on how to get this working again.
Rat Killer is offline   Reply With Quote
Old 31st May 2012, 12:51   #409  |  Link
golagoda
Registered User
 
Join Date: Aug 2011
Posts: 98
Quote:
Originally Posted by Rat Killer View Post
Need a hand. MeGUI seems to have done some updates including DGindexNV and now when attempting to index a file DGIndexNV.exe gives the following error:

The procedure entry point cuStreamDestroy_v2 could not be located in the dynamic link library nvcuda.dll

I have an Nvidia NVS 4200M running on a Dell laptop under Windows XP if it matters. Nvidia driver version 268.83 which is the latest from Dell.

Thanks for any suggestions on how to get this working again.
Uninstall that driver and try this one: http://www.nvidia.com/object/quadro-...ql-driver.html (used the nvidia drivers search)
golagoda is offline   Reply With Quote
Old 31st May 2012, 13:24   #410  |  Link
Rat Killer
Registered User
 
Join Date: Mar 2004
Location: Houston
Posts: 112
Thanks!

Updating to the version 295 driver fixed it up.
Rat Killer is offline   Reply With Quote
Old 7th June 2012, 13:01   #411  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,806
Avisynth 2.6 MT installer (2012.05.16) -> http://www.mediafire.com/?prfoy9wfj4gtnnw
Installer source files -> http://www.mediafire.com/?308aa5d3r4nszwz
Atak_Snajpera is offline   Reply With Quote
Old 7th June 2012, 13:25   #412  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 443
Thanks!
SubJunk is offline   Reply With Quote
Old 10th June 2012, 14:41   #413  |  Link
defalopii
Registered User
 
Join Date: Feb 2011
Posts: 70
Encoding x264 on 32 Cores with Avisynth 2.6 MT

I have tried this Avisynth 2.6 MT
Replacing the old avisynth.dll with Avisynth 2.6 MT
But the result make me disappointed

Please see the screenshot





* My system is Dual AMD Opteron 6272 with Total 32 Cores (My campus server, used for math calculations)
* RAM 16GB
* I am using MeGUI 2112
* x264 v2164

Avisynth Script
Code:
SetMTMode(3)
AVISource("C:\Documents and Settings\Administrator\My Documents\Downloads\Video\Sample.548673.avi", audio=false).AssumeFPS(24000,1001)
SetMTMode(2)
#deinterlace
#crop
LanczosResize(608,320) # Lanczos (Sharp)
LoadPlugin("C:\Program Files\MeGUI\tools\avisynth_plugin\Convolution3DYV12.dll")
Convolution3D("movielq") # Heavy Noise

LoadPlugin("C:\Program Files\MeGUI\tools\avisynth_plugin\VSFilter.dll")
TextSub("C:\Documents and Settings\Administrator\My Documents\Downloads\Documents\Watermark\watermark.srt", 1)
x264 profile
Code:
program --preset fast --pass 2 --bitrate 5000 --stats ".stats" --deblock -1:-1 --b-adapt 2 --ref 3 --weightp 2 --qpmin 10 --qpmax 51 --chroma-qp-offset -2 --rc-lookahead 60 --merange 32 --me umh --direct auto --subme 9 --trellis 2 --psy-rd 0.00:0 --no-fast-pskip --output "output" "input"
My Home PC with i7 2600 (Only 4 cores) even 6x more faster encoding, same encoding profile, same Avisynth script, and same video source but with No Avisynth 2.6 MT

So guys, can you explain to me what is wrong ??
defalopii is offline   Reply With Quote
Old 10th June 2012, 15:41   #414  |  Link
SEt
Registered User
 
Join Date: Aug 2007
Posts: 374
With so many cores you sure hitting 32-bit address space limits with default number of threads. Try manually specifying different number of used threads in first SetMTMode call. Next, pipe output of Avisynth to x264 (you can also use 64 bit x264 this way) to free some more address space.
And if some other Avisynth MT version worked better at your setup - do post in case we have regression here.
SEt is offline   Reply With Quote
Old 10th June 2012, 15:58   #415  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,806
also don't forget to update x264 to r2200. btw why do use only fast profile on such beast????
Atak_Snajpera is offline   Reply With Quote
Old 10th June 2012, 16:46   #416  |  Link
defalopii
Registered User
 
Join Date: Feb 2011
Posts: 70
Quote:
Originally Posted by SEt View Post
With so many cores you sure hitting 32-bit address space limits with default number of threads. Try manually specifying different number of used threads in first SetMTMode call. Next, pipe output of Avisynth to x264 (you can also use 64 bit x264 this way) to free some more address space.
And if some other Avisynth MT version worked better at your setup - do post in case we have regression here.
Sory i dont understand, i am very new with this
Please give me the complete sample script, what should i do with SetMTMode(3) ?? change it to 5 or anything else ??
and why there is two SetMTMode, before and after the video source ??

Quote:
Originally Posted by Atak_Snajpera View Post
also don't forget to update x264 to r2200. btw why do use only fast profile on such beast????
will try to use that x264 r2200
yeah its modified fast profile. i am not sure with this but the result is better than slow profile
defalopii is offline   Reply With Quote
Old 10th June 2012, 17:53   #417  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,806
especially with disabled psy visual optimalization. Take my advise and stick to presets created by developers. your settings are not good.

Last edited by Atak_Snajpera; 10th June 2012 at 18:01.
Atak_Snajpera is offline   Reply With Quote
Old 11th June 2012, 01:33   #418  |  Link
defalopii
Registered User
 
Join Date: Feb 2011
Posts: 70
Because i can not make Avisynth 2.6 MT works, so tried to split the video into 8 parts and than encode it simultaneously.

What i used:
* Dual AMD Opteron 6272 (Total 32 Cores)
* Video Source 1080p (1920x1040)
* MeGUI 2112
* x264 r2200
* Avisynth v2.5.8 rev. 2

On 8 simultaneous encoding the 1st pass only take 50% of CPU Usage, and the 2nd pass take the makximum 100% of CPU usage

Here is the screenshot


Used very simple Avisynth Script.
Code:
DirectShowSource("C:\Documents and Settings\Administrator\My Documents\Downloads\Video\Sample.548612-defa.mkv", fps=23.976, audio=false, convertfps=true).AssumeFPS(24000,1001)
#deinterlace
#crop
#resize
#denoise

LoadPlugin("C:\Program Files\MeGUI\tools\avisynth_plugin\VSFilter.dll")
TextSub("C:\Documents and Settings\Administrator\My Documents\Downloads\Documents\Watermark\watermark.srt", 1)
I used this profile. I dont know what is the best x264 Profile, please tell me..
Code:
program --preset fast --pass 2 --bitrate 5000 --stats ".stats" --threads 16 --deblock -1:-1 --b-adapt 2 --ref 3 --weightp 2 --qpmin 10 --qpmax 51 --chroma-qp-offset -2 --rc-lookahead 60 --merange 32 --me umh --direct auto --subme 9 --trellis 2 --psy-rd 0.00:0 --no-fast-pskip --output "output" "input"
So..what do You think about this ??
I hope i can make Avisynth 2.6 MT works to optimizing the all 32 cores, but i dont know how, will keep trying. Any suggestion please tell me very detail and clearly bcoz i am very new with this

Last edited by defalopii; 11th June 2012 at 01:42.
defalopii is offline   Reply With Quote
Old 11th June 2012, 01:40   #419  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 443
Just change the first line in the script from:

SetMTMode(3)

to:

SetMTMode(3, 32)

It's normal for SetMTMode to only use 50% of CPU on some hardware unless you specify the number of cores.
SubJunk is offline   Reply With Quote
Old 11th June 2012, 04:29   #420  |  Link
defalopii
Registered User
 
Join Date: Feb 2011
Posts: 70
Quote:
Originally Posted by SubJunk View Post
Just change the first line in the script from:

SetMTMode(3)

to:

SetMTMode(3, 32)

It's normal for SetMTMode to only use 50% of CPU on some hardware unless you specify the number of cores.
Still not work, there is no different between using MT or not
defalopii 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:55.


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