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 29th June 2010, 10:46   #401  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 1,695
Quote:
Originally Posted by Didée View Post
There already is one. (Without SC detection, of course.)
I was talking about MCTD.

Don't know why but my "porting" to x64, disabling Sangnom, is awfully slow.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 29th June 2010, 20:21   #402  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,372
Quote:
Originally Posted by asarian View Post
LaTo, I may not be doing it entirely right yet. :) I'm using this avs script on a 1-minute clip:

Code:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\FFMS2.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\FFT3DFilter.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools-25.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\mvtools2.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrainSSE3.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\TTempSmooth.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\RepairSSE3.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\deblock.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\DctFilter.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\EEDI2.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\SangNom.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\gradfun2db.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\AddGrainC.dll")

video=FFVideoSource("M:\jobs\2010test.mkv").ConvertToYV12()
video=MCTemporalDenoise(video, settings="very high")
video=Crop(video, 0, 142, 0, -142)

return video
Nothing happens for a long while, though. First I get a Windoze error, saying it can't use "mt_masktools-25-x64.dll" (of course it can't: I'm on 32bit; and I didn't ask for it to be run, either). Then x264 keeps hovering around 25% CPU, steadily increasing in memory size (to around 1.4GB). And finally it tells me that 1 minute clip, at 0.00fps, (sic!) will take over 300 hours! Why, that seems a mite extreme. :)

x264 remains at ca. 25% CPU. So, I guess I'm doing something wrong. Any hints?
Anyone? Anyone? Bueller? Bueller? :)

Seriously; I may not have the fastest machine (Q6700 @ 3.6 Ghz); but 300 hours for a 1 minute clip??! That's looking at a ~4 year encode!!

I could probably crop a little more efficiently; like first do 400, -400, so at to still be div 16 (one of the filters was complaining about that), and only then do MCTemporalDenoise, and only then crop an extra 2, -2 afterwards:

Code:
video=FFVideoSource("M:\jobs\2010test.mkv").ConvertToYV12()
video=Crop(video, 0, 140, 0, -140)
video=MCTemporalDenoise(video, settings="very high")
video=Crop(video, 0, 2, 0, -2)
But still, these encoding times seem too long (and unworkable; I mean, who can keep his machine on for 4 years? Hoping it won't reset in the meantime).
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 29th June 2010, 22:36   #403  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,412
Quote:
Originally Posted by asarian View Post
I get a Windoze error, saying it can't use "mt_masktools-25-x64.dll" (of course it can't: I'm on 32bit; and I didn't ask for it to be run, either).
Is mt_masktools-25-x64.dll in your plugins folder (C:\Program Files\AviSynth 2.5\plugins)? If so, it will be loaded automatically by Avisynth, so you want to remove it from there.

For the same reason, all your LoadPlugin commands are unnecessary.
Gavino is offline   Reply With Quote
Old 30th June 2010, 09:51   #404  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,372
Quote:
Originally Posted by Gavino View Post
Is mt_masktools-25-x64.dll in your plugins folder (C:\Program Files\AviSynth 2.5\plugins)? If so, it will be loaded automatically by Avisynth, so you want to remove it from there.

For the same reason, all your LoadPlugin commands are unnecessary.
Yeah, I put mt_masktools-25-x64.dll there recently, as part of upgrading all required tools for MCTemporalDenoise. Didn't realize they all autoload. :)

P.S. Any idea why x264 constantly only takes about 25% CPU for MCTemporalDenoise? That doesn't exactly help encoding times either. :(
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 30th June 2010, 09:54   #405  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Quote:
Originally Posted by asarian View Post
Yeah, I put mt_masktools-25-x64.dll there recently, as part of upgrading all required tools for MCTemporalDenoise. Didn't realize they all autoload.

P.S. Any idea why x264 constantly only takes about 25% CPU for MCTemporalDenoise? That doesn't exactly help encoding times either.
x264 wait a long time after MCTD... Because avisynth isn't multithreaded, MCTD use only one core of your quad (25%).
LaTo is offline   Reply With Quote
Old 30th June 2010, 14:27   #406  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,372
Quote:
Originally Posted by LaTo View Post
x264 wait a long time after MCTD... Because avisynth isn't multithreaded, MCTD use only one core of your quad (25%).
LaTo, you're my new hero!! :)

I just tried my sample with 'settings=high', and instead of taking 300 hours (for 'very high'), it was done in 30 minutes! :) Which is very reasonable. And the result? Not only does MCTemporalDenoise pass the SC test (whereas TemporalDegrain, on the defaults, failed), but the resulant video is spendid! Beyond belief, so good actually!!

I can't get 'GPU=true' to work yet (GTX 260), though:

Code:
avs [info]: 1920x796p 1:1 @ 24000/1001 fps (cfr)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
x264 [info]: profile High, level 4.1
x264 [error]: malloc of size 6856704 failed/s, eta 19:40:54
x264 [error]: x264_encoder_encode failed
Not sure what that is all about, but, regardless, I'm already happy. :)
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 2nd July 2010, 11:48   #407  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
v1.4.20 - Update 2010/07/02

v1.4.20 :
tweaked some settings
updated QED_Deblock version

LaTo is offline   Reply With Quote
Old 2nd July 2010, 11:55   #408  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 5,049
Thanks

Are you by any chance planning on doing a quick-and-dirty fix for the missing scenechange detection?
__________________
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 2nd July 2010, 13:16   #409  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Quote:
Originally Posted by Boulder View Post
Thanks

Are you by any chance planning on doing a quick-and-dirty fix for the missing scenechange detection?
Yes it's on my todo list!
LaTo is offline   Reply With Quote
Old 5th July 2010, 05:56   #410  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,372
When I run MCTemporalDenoise with 'enhance=true' ("medium"), suddenly a GHOST PORTRAIT appears in one of the frames in my Blade Runner encode. Oops! :) When I add a GradFun2DBmod command after MCTemporalDenoise, the issue is resolved again.

Maybe this needs a little looking into?
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 5th July 2010, 08:01   #411  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Quote:
Originally Posted by asarian View Post
When I run MCTemporalDenoise with 'enhance=true' ("medium"), suddenly a GHOST PORTRAIT appears in one of the frames in my Blade Runner encode. Oops! When I add a GradFun2DBmod command after MCTemporalDenoise, the issue is resolved again.

Maybe this needs a little looking into?
It's not a problem with enhance=true because it's only spatial.
Do you use DirectShowSource() or GPU=true in your script?
LaTo is offline   Reply With Quote
Old 5th July 2010, 08:07   #412  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,372
Quote:
Originally Posted by LaTo View Post
It's not a problem with enhance=true because it's only spatial.
Do you use DirectShowSource() or GPU=true in your script?
No, I always use FFVideoSource for frame consistency.

I did use 'GPU=true', though. How would GPU usage cause just a temporal displacement, though?

EDIT: I *do* stream using avs2yuv now, though, because otherwise x264 would run out of memory. Could using avs2yuv to stream make things frame inconsistent again?
__________________
Gorgeous, delicious, deculture!

Last edited by asarian; 5th July 2010 at 08:12.
asarian is offline   Reply With Quote
Old 5th July 2010, 08:14   #413  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Quote:
Originally Posted by asarian View Post
No, I always use FFVideoSource for frame consistency.

I did use 'GPU=true', though. How would GPU usage cause just a temporal displacement, though?

EDIT: I *do* stream using avs2yuv now, though, because otherwise x264 would run out of memory. Coould using avs2yuv to stream make things frame inconsistent again?
GPU=true causes ghosting when seeking, moreover I have somes issues with HD-1080p.
So GPU=false is the default

For avs2yuv, I don't know... Maybe, I never use it.
LaTo is offline   Reply With Quote
Old 5th July 2010, 08:32   #414  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,372
Quote:
Originally Posted by LaTo View Post
GPU=true causes ghosting when seeking, moreover I have somes issues with HD-1080p.
So GPU=false is the default :D

For avs2yuv, I don't know... Maybe, I never use it.
Well, that's it for "GPU=true" then. :) Wasn't getting a speed improvement out of it anyway; just a memory benefit.

The avs2yuv frame consistency matter has got me worried a bit (if it is, indeed, an issue). Maybe someone else knows?
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 6th July 2010, 02:11   #415  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,372
Okay, some very weird stuff going on. I used this following line for x264 on this Total Recall TEST SCENE:

"C:\x264\avs2yuv.exe" "M:\jobs\trecalltest.avs" -o - | "C:\x264\x264.exe" - --demuxer y4m --crf 14 --sar 1:1 --aud --nal-hrd none --level 4.1 --preset placebo --vbv-bufsize 70000 --vbv-maxrate 60000 --bframes 8 --merange 32 --aq-mode 2 --ref 4 --tune grain --output "C:\video\trecalltest.264"

And the AVS scripts is as follows:

FFVideoSource("M:\jobs\trecalltest.mkv").ConvertToYV12()
Crop(0, 4, 0, -4)
MCTemporalDenoise(settings="medium", enhance=true)
Crop(0, 20, 0, -20)

The ghosting/misplaced frames in the RESULT are numerous. :( What the heck is going on!? The weird part is, that I can get this to work properly when I vary CRF and qpmin some. For instance, CRF = 10 + QPMIN = 10 gives me a flawless encode. This faulting file, however (CRF = 14 + QPMIN = 10) totally flips out. You'd think that makes it a x264 problem; but not so! If I run just the AVS script alone, and watch the output in GOM Player (very slowly, of course), I get some frame mess-ups too.

So, it seems to be a timing problem of some sort rather (in which x264 settings, only indirectly, play a role). Could someone test the above clean sample with the same x24 settings I used, please? Very mysterious things going on. :)
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 6th July 2010, 08:44   #416  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,372
Quote:
Originally Posted by LaTo View Post
It's not a problem with enhance=true because it's only spatial.
LaTo, I'm really thinking it may be 'enhance=true' after all. When I remove the enhance option from the MCTemporalDenoise line, and export it simply as a second post-filter, everything goes well again!

FFVideoSource("M:\jobs\trecalltest.mkv").ConvertToYV12()
Crop(0, 4, 0, -4)
MCTemporalDenoise(settings="medium")
GradFun2DBmod(thr=1.4,thrC=1.0,mode=0,str=1.2,strC=0.0,temp=50,adapt=64,mask=false,show=false)
Crop(0, 20, 0, -20)

This script, contrary to the other, yields a perfect encode, under any conditions! So, maybe the 'in-house' enhance feature from MCTemporalDenoise corrupts something internally on occasion (like a buffer accidentally being overwritten? Or some variables maybe?). Whatever the case may be, doing GradFun2DBmod seperately definitely solves the issue, on every test I've run so far.
__________________
Gorgeous, delicious, deculture!

Last edited by asarian; 6th July 2010 at 08:49. Reason: Typo desu
asarian is offline   Reply With Quote
Old 6th July 2010, 09:21   #417  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
And with temp=-1 ..?

Which version of avisynth do you use?
LaTo is offline   Reply With Quote
Old 6th July 2010, 10:33   #418  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,372
Quote:
Originally Posted by LaTo View Post
And with temp=-1 ..?
No, that makes no difference: same messed-up output.

Quote:
Which version of avisynth do you use?
I'm using regular AviSynth version 2.5.8 (non-MT!). Why? You think it's a threads issue somehow?

Anyway, thanks for looking into it.
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 6th July 2010, 10:35   #419  |  Link
LaTo
LaTo INV.
 
LaTo's Avatar
 
Join Date: Jun 2007
Location: France
Posts: 701
Really strange.... I will try with your sample+script.
LaTo is offline   Reply With Quote
Old 6th July 2010, 10:42   #420  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,372
Quote:
Originally Posted by LaTo View Post
Really strange.... I will try with your sample+script.
Thanks, appreciate it. :)

In the meantime at least I can start a 'sane' encode again, using GradFun2DBmod on a separate line.
__________________
Gorgeous, delicious, deculture!
asarian 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 17:01.


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