This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[HELP] Processing speed
#1
Can I do anything to speed up the processing of files which are around 5 - 10 minutes long, and are taking over 2 hours each to process? Is there anything in the filter order which I can change to speed up the processing?


Quote:# Imports
import os
import sys
import vapoursynth as vs
# getting Vapoursynth core
core = vs.core
# Import scripts folder
scriptPath = '/Applications/Hybrid.app/Contents/MacOS/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# Import scripts
import edi_rpow2
import mvsfunc
import mcdegrainsharp
import havsfunc
# source: '/Volumes/Drobo/Project/PROJECT 01/Finished Intros - HDV/Final 39/Expose Intro updated.mov'
# current color space: YUV420P8, bit depth: 8, resolution: 1440x1080, fps: 25, color matrix: 709, yuv luminance scale: limited, scanorder: top field first
# Loading /Volumes/Drobo/Project/PROJECT 01/Finished Intros - HDV/Final 39/Expose Intro updated.mov using LWLibavSource
clip = core.lsmas.LWLibavSource(source="/Volumes/Drobo/Project/PROJECT 01/Finished Intros - HDV/Final 39/Expose Intro updated.mov", format="YUV420P8", cache=0, fpsnum=25, prefer_hw=0)
# Setting color matrix to 709.
clip = core.std.SetFrameProps(clip, _Matrix=1)
clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=1)
clip = clip if not core.text.FrameProps(clip,'_Primaries') else core.std.SetFrameProps(clip, _Primaries=1)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# making sure frame rate is set to 25
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# setting field order to what QTGMC should assume (top field first)
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=2)
# Deinterlacing using QTGMC
clip = havsfunc.QTGMC(Input=clip, Preset="Fast", TFF=True) # new fps: 50
# make sure content is preceived as frame based
clip = core.std.SetFieldBased(clip, 0)
# adjusting frame count and rate with sRestore
clip = havsfunc.srestore(source=clip, frate=25.0000, omode=6, speed=9, thresh=16, mode=2)
# removing grain using MCDegrain
clip = mcdegrainsharp.mcdegrainsharp(clip=clip, frames=1)
# deringing using HQDeringmod
clip = havsfunc.HQDeringmod(clip, nrmode=2, darkthr=3.0)
# resizing using ZNEDI3
clip = edi_rpow2.nnedi3_rpow2(clip=clip, rfactor=2) # 2880x2160
# adjusting resizing
clip = core.fmtc.resample(clip=clip, w=1920, h=1080, kernel="lanczos", interlaced=False, interlacedd=False)
# adjusting output color from: YUV420P16 to YUV422P10 for ProResModel
clip = core.resize.Bicubic(clip=clip, format=vs.YUV422P10, range_s="limited")
# set output frame rate to 25.000fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Output
clip.set_output()
Reply
#2
Quote:Can I do anything to speed up the processing of files which are around 5 - 10 minutes long, and are taking over 2 hours each to process?
Using a faster system.
  • Not totally sure whether it works on MacOS, but on Windows I would say try sending some of the work to the GPU, by:
    • changing: "Filtering->Vapoursynth->Misc->Source->Libav hardware decoding mode"
    • enabling "Filtering->Vapoursynth->Frame->Resize->NNEDI3->GPU"
  • moving the denoising and degrain above sRestore might speed it up.
Also I would not recommend using NNEDI3 when you are just resizing horizontally, since it seems like a waste of time.
With NNEDI3 you are resizing your input 1440x1080 to 2880x2160 and then to 1920x1080.
I doubt there is much of a gain using NNEDI3 in this scenario.


Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#3
Thanks - removing NNEDI3 has cut 2 hours from the processing time.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)