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 21st August 2012, 16:08   #1  |  Link
VideoFanatic
Registered User
 
Join Date: Sep 2011
Posts: 240
How to Speed Up McTemporalDenoise?

I have an 8 core PC. I'm using Avisynth MT. For the 1st line and number I tried all methods below and above 5 and they were slower. For the 2nd number I tried all numbers above and below 16 and they were slower. Is the 3rd line correct or should I modify it?

Code:
setmtmode(5,16)
Mpeg2Source("J:\2 = New\Raw August 06 2001.d2v", CPU=6)
setmtmode(2,0)
McTemporalDenoise(settings="medium", interlaced=true)
ConvertToYUY2(interlaced=true)
TemporalSoften(4,4,8,15,2)
ConvertToYV12(interlaced=true)
AssumeTFF() # or AssumeBFF() depending on the source

# Deinterlace
Load_Stdcall_plugin("C:\Program Files (x86)\AviSynth 2.5\plugins\yadif.dll")
QTGMC(Preset="Ultra Fast")
Vinverse()

#Re-interlace
SeparateFields()
SelectEvery(4,0,3)
Weave()

RemoveSpots()
LSFMod(strength=50)
AddGrainC(var=1.0,uvar=1.0)
Assuming my code is correct, can anyone please suggest a way to speed up McTemporalDenoise? Here are some speeds I'm getting:
  • McTemporalDenoise on it's own: 10.40 FPS
  • Everything except McTemporalDenoise: 35 FPS
  • Everything & Super Fast for QTGMC (strange how it's quicker than Ultra Fast): 5.50 FPS

So it's McTemporalDenoise that's slowing everything else down.

I'm currently getting 10.40 FPS and it's taking around 5 hours 40 minutes for a 1 hour 40 minute video. I would like to get this down to 4 hours 30 minutes otherwise I can only do 4 videos in 24 hours instead of 5 which will slow my work down.

I'm open to any suggestions. I've got a CUDA VP5 graphics card and I've just bought DGDecNV and I'm waiting on my licence. Do you think that will give a faster FPS than the free version - DGMPGDec?

I think there's a way to enable the GPU for McTemporalDenoise but I don't know how to install it to get it working.

I use Simple X264 Launcher to encode my videos and it just does 1 pass.
VideoFanatic is offline   Reply With Quote
Old 21st August 2012, 16:25   #2  |  Link
Mounir
Registered User
 
Join Date: Nov 2006
Posts: 714
I haven't tried with robust filters (like mtcd) yet but probably with Ripbot you can speed up things and encode on 2 or more computers at the same time see here
Mounir is offline   Reply With Quote
Old 21st August 2012, 16:26   #3  |  Link
VideoFanatic
Registered User
 
Join Date: Sep 2011
Posts: 240
Thanks, but I'm quite happy with Simple x264 Launcher. I'm just looking for ways to speed up the encoding times.

I ran the fft3dgpu0.8.2a.exe installer but it still doesn't work. When I try to encode a video it gives the following error: PROCESS EXITED WITH ERROR CODE: -1073741819
VideoFanatic is offline   Reply With Quote
Old 21st August 2012, 19:25   #4  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 610
FFT3DGPU cannot work in MT mode 2. It should be possible to patch McTemporalDenoise to enclose each call to FFT3DGPU between SetMTMode(5).(...).SetMTMode(2). However I don't know if it really works and if it is efficient.

The best thing you can do is to encoding multiple videos simultaneously to saturate the CPU given a reasonable memory usage. Check the overall FPS, maximizing the CPU load does not necessary means that the frame throughput is optimal.

Another lead is tweaking the MCTD settings to accelerate the whole processing. Or you can remove MCTD and use the QTGMC internal denoiser. BTW I don't really understand what you are trying to achieve with this script and why you are applying RemoveSpots and LSFMod on interlaced material.
__________________
dither 1.27.2 for AviSynth | avstp 1.0.3 for AviSynth development | fmtconv r19 for Vapoursynth | trimx264opt segmented encoding
cretindesalpes is offline   Reply With Quote
Old 21st August 2012, 19:46   #5  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,390
That script is brainlessly insane (temporalsoften(4) between MCTD and QTGMC is a killer), performs wrong processing (LSF after re-interlacing - why is QTGMC used at all??), the colorspace conversion for temporalsoften must be a magic placebo trick, and after all, it's hard to imagine that this script should sucessfully run with 16 threads ....

Regarding DGDecodeNV: good choice to opt for it. It's a really nice and handy source filter. Well ... as long as you don't use MT. DGDecodeNV can cope only with MT-scripts of low complexity. Do any more than "just a little", and it'll break down right before you.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 23rd August 2012, 23:36   #6  |  Link
VideoFanatic
Registered User
 
Join Date: Sep 2011
Posts: 240
Here's the current script I use. I have entered explanations as comments next to each part. If you find something wrong with this script then please tell me.

Code:
setmtmode(5,12)
Mpeg2Source("J:\2 = New\z = Encode\Raw 1996 11 March 47 secs.d2v")
setmtmode(2,0)
Crop(2,0,0,-12)
AddBorders(0,6,2,6)

ColorYUV(off_y=10,gamma_y=-15)
ColorYUV(cont_v=-12)

########## Not sure if I need this

ConvertToYUY2(interlaced=true)
TemporalSoften(4,4,8,15,2)
ConvertToYV12(interlaced=true)

########## Remove Dancing Pixels. AddGrain is needed as it covers up the remaining spots that RemoveSpots can't remove

RemoveSpots()
AddGrainC(var=1.0,uvar=1.0)

########### Denoise

McTemporalDenoise(settings="medium", sigma=5, Chroma=true, useQED=false, DeBlock=true, interlaced=true)

########### De-interlace and Re-interlace. Removes de-interlacing artefacts for crap TV media players that may show them

AssumeTFF() # or AssumeBFF() depending on the source
QTGMC(Preset="Super Fast") # Strangely this is faster than Ultra Fast
Vinverse() # Removes any remaining combing artefacts that QTGMC doesn't remove
SeparateFields()
SelectEvery(4,0,3)
Weave()

########### Sharpening 

LSFMod(strength=50)
VideoFanatic is offline   Reply With Quote
Old 24th August 2012, 02:59   #7  |  Link
librarian
Registered User
 
Join Date: Nov 2011
Posts: 63
Try this:

Code:
bob(0,1)
Crop(2,0,0,-12)
deen("a2d",7,8,20)
awarpsharp(depth=6)
separatefields()
selectevery(4,0,3)
weave()

AddBorders(0,6,2,6)
return last
Roughly same output.
This will save a number of kilowatt and cpu cycles, in addition chroma planes will thank you.
librarian is offline   Reply With Quote
Old 24th August 2012, 19:24   #8  |  Link
matfra
Registered User
 
Join Date: Jul 2009
Posts: 111
I always tought that its better to Deinterlace 1st, Then Denoise, Then Sharpen ? What you recommand for best quality ?
matfra is offline   Reply With Quote
Old 26th August 2012, 14:48   #9  |  Link
LemMotlow
Registered User
 
Join Date: Jul 2011
Location: Tennessee, USA
Posts: 239
d l t d

Last edited by LemMotlow; 1st March 2013 at 11:01.
LemMotlow is offline   Reply With Quote
Old 27th August 2012, 08:04   #10  |  Link
mawen1250
Registered User
 
Join Date: Aug 2011
Posts: 104
Code:
MP_Pipeline("""

Mpeg2Source("J:\2 = New\Raw August 06 2001.d2v", CPU=6)

### prefetch: 64, 32

### ###

AssumeTFF()

QTGMC(Preset="Fast", FPSDivisor=2)

### prefetch: 32, 16

### ###

McTemporalDenoise(settings="medium", radius=2, GPU=true, useMMask=false, protect=true, sharp=false)

### prefetch: 16, 8

### ###

# Other filters

""")

Last edited by mawen1250; 27th August 2012 at 08:07.
mawen1250 is offline   Reply With Quote
Old 4th September 2012, 18:04   #11  |  Link
matfra
Registered User
 
Join Date: Jul 2009
Posts: 111
Hey LemMotlow !
Can you tell me where can I get those please !!
daa3()
RemoveSpots()
DeVCR(20)
FixVHSOversharp(30,14,10)

Thank !
matfra is offline   Reply With Quote
Old 4th September 2012, 18:11   #12  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 5,989
Search works pretty good.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Reply

Tags
fast, mctemporaldenoise, speed

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:36.


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