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.

Accessing parameters of TemporalDegrain2 in Hybrid
#1
Hi,

I am new to this forum, but I have played around with Hybrid for a while. Since I find it very tiresome and error-prone to use software like AviSynth from the command line, I am happy to have tools like StaxRip or Hybrid. For my particular project (description following below) I have found that Hybrid performs about 10 times faster than StaxRip, so I would like to optimize my use of Hybrid; but I would need a bit more information how to do use it properly.

Many years ago I had some Super 8 movies transferred in very good quality to digital video, on miniDV tape cassettes, i.e. D1 AVI, 720x576, 25fps interlaced. There is no need for a higher resolution, because the film grain of the Super 8 material determines and limits the sharpness and Full HD would not improve it.

However, interlacing is the problem because in the interlaced material I cannot access individual frames to retouch artefacts like dust or hairs, so one of the many steps in my workflow it deinterlacing with QTGMC (in Hybrid), converting interlaced AVI to progressive MP4. Hybrid always aborts this process in the first attempt, but the job sits in the queue with the status WAITING, can be started from there and will complete without any further issues, so this is not my actual problem.

The problem comes at a later stage, once I have completed my single-frame retouching and try to degrain the cleaned MP4 video using TemporalDegrain2 in Hybrid. Hybrid aborts the process consistently when I try using the AviSynth version, so I have to resort to the Vapoursynth version; and as discussed in this thread by Lipomo, the two versions are different. The TemporalDegrain2 documentation lists only 11 parameters that may be used to control the results:
  • degrainTR
  • grainLevel
  • grainLevelSetup
  • postFFT
  • postSigma
  • postDither
  • degrainPlane
  • outputStage
  • postMix
  • fftThreads
  • postSigmaC
No other parameters should be touched.

However, the parameter sets that are made available in the Hybrid GUI under (a) x264 > Filtering > Avisynth > Grain > TemporalDegrain 2 and (b) x264 > Filtering > Vapoursynth > DeGrain > TemporalDegrain2, are different from each other and do not correspond to those 11 parameters, as shown in these screenshots (green: parameter identified; red: parameter not identified).

   
   

I would need to access some of the parameters that are not included in this GUI. So here is my question: As a workaround, is it possible to specify the TemporalDegrain2 filter for Vapoursynth in Hybrid directly, i.e. by replacing the automatic call with in Hybrid with something like "TemporalDegrain2 (degrainTR=1, grainLevel=0, postFFT=1, postSigma=0, outputStage=1, postMix=25)"?

Thank you! 

ThoM
Reply
#2
Quote:Hybrid aborts the process consistently when I try using the AviSynth version,
You didn't care to share a debug output or the error message the Avisynth Preview produces, so nothing I can say about that.

Quote: The TemporalDegrain2 documentation lists only 11 parameters that may be used to control the results: ... No other parameters should be touched.
*gig* That is the beauty of it. Personally, I don't use most of these, but those that should not be touched. Smile


The Avisynth TemporalDegrain2 version that Hybrid uses has this signature:
function TemporalDegrain2 ( clip input, int "degrainTR", int "grainLevel", bool "grainLevelSetup", int "degrainPlane", int "postFFT", float "postSigma", int "postDither", int "fftThreads", int "postTR", int "postMix", int "postPlane", int "postBlkSz", int "meAlg", int "meAlgPar", int "meSubpel", int "meBlksz", bool "meTM", bool "meChroma", int "limitFFT", float "limitSigma", int "limitBlksz", int "devId", float "ppSAD1", float "ppSAD2", float "ppSCD1", int "thSCD2", int "DCT", float "gaussParam", bool "extraSharp", int "outputStage", bool "debug", bool "CUDA", string "dftsfile", int "postFFTc", float "postSigmaC", bool "degrainChromaTwoStep", bool "degrainAvoidChromaShift")
see: Hybrid/64bit/TemporalDegrain2.avsi on your system.
So all your options are present. Smile
Aside from
  • grainLevelSetup
  • postMix
  • postSigmaC
all are available in the gui.
The Vapoursynth version has this signature:
Quote:def TemporalDegrain2(clip, degrainTR=1, degrainPlane=4, grainLevel=2, grainLevelSetup=False, meAlg=4, meAlgPar=None, meSubpel=None, meBlksz=None, meTM=False,
limitSigma=None, limitBlksz=None, fftThreads=None, postFFT=0, postTR=1, postSigma=1, postMix=0, postBlkSize=None, knlDevId=0, ppSAD1=None, ppSAD2=None,
ppSCD1=None, thSCD2=128, DCT=0, SubPelInterp=2, SrchClipPP=None, GlobalMotion=True, ChromaMotion=True, rec=False, extraSharp=False, outputStage=2, neo=True)

Vapoursynth version does not have 'postDither', 'postMix', 'postSigmaC' options and 'outputStage' is not supported in the gui. (hope I didn't miss anything)
If you know a better port of TemporalDegrain2 to Vapoursynth let me know and I may add support for it in Hybrid.


Quote: As a workaround, is it possible to specify the TemporalDegrain2 filter for Vapoursynth in Hybrid directly, i.e. by replacing the automatic call with in Hybrid with something like "TemporalDegrain2 (degrainTR=1, grainLevel=0, postFFT=1, postSigma=0, outputStage=1, postMix=25)"?
No. You can't replace or modify the generated code. I might could add a 'additions'-option or something like that, which would allow you to add additional parameters, some time in the future.
You can however:
a. use the 'Custom'-section to add your own code where you could call TemporalDegrain2 with whatever paramters you like.
b. you could add your own 'Custom script/filter additions' to the gui. read: Custom script/filter additions? and look inside the Hybrid/CustomSynthScripts for some examples that are included this way in the gui.

Cu Selur

Ps.: If you want help to fix the Avisynth issue, read the sticky and provide a debug output of you calling Avisynth Preview with your settings, this should produce an error and include the script in the debug output.
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)