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)"?
27.11.2025, 16:32 (This post was last modified: 27.11.2025, 16:52 by Selur.)
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.
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.
Aside from
grainLevelSetup
postMix
postSigmaC
all are available in the gui.
The Vapoursynth version has this signature:
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.
Wow, that was a really fast reply! 👍🙂
I did not attach debug data at first because I got it working with the Vapoursynth version; but since you seem to have the time to look into this, here comes some documentation ... 😉
I am attaching a video with a short sample of two scenes as well as some Hybrid log outputs; the numbers refer to the various stages of my workflow:
1 - Original AVI source.
2 - Deinterlacing with QTGMC in Hybrid; the log shows that Hybrid aborted, but could be restarted from the WAITING state. This step already removed some of the excessive grain. Using a very high bit rate to minimise quality loss in the many workflow steps.
3 - Creating a sequence of PNG frames using FFMPEG and retouching many of them.
4 - Using FFMPEG again to recombine the retouched PNG frames to the attached MP4.
5 - Applying TemporalDegrain2 in Hybrid to remove the remaining grain without losing too much structure and clarity. The log shows that this did not work at all in the Avisynth version, whereas it worked well in Vapoursynth.
My problem is the loss of detail in larger areas like the road surface, e.g. towards the end, top left. The subsequent MP2 coding for DVD authoring will remove even more small features, creating just a cloudy area without any detail, so I would like to reduce the strength of the degraining even further. Maybe it will be sufficient to use the less aggressive settings listed in the TemporalDegrain2 documentation; if that is not enough, they suggest using outputStage and postMix, but these are not available in the GUI. So I will try your "Custom" suggestions to access those options when I find the time.
About the workflow:
1. ideally use a lossless format, when using x264 in lossy mode, you might want to use 10bit encoding.
2. "Using FFMPEG again to recombine the retouched PNG frames to the attached MP4." you are aware that you can load an image sequence into Hybrid right? (the ffmpeg step seem unnecessary)
Looking at the Avisynth step, the script seems fine:
does seem to be fine too.
I would recommend to change temp-path to something outsice of 'AppData' and direct Windows folders and add an exemption to whatever virus scanner you are using.
According to the debug output the decoder crashes. So it either something with the script, Avisynth Preview should then show an error, or the deocidng call.
Please try:
a. does the Avisynth Preview work?
b. does enabling 'Config->Internals->Avisynth->Prefer FFmpeg as decoder' fix the problem?
If the Avisynth Preview already crashes, it might be a problem with one of the filters and your hardware setup. (I suspect it's fft3dgpu, since it's the only gpu filter that is really used with your settings and it's not used in Vapoursynth since it doesn't exist there.)
Using a similar script (same filters&co, different paths), I have no problems here.
Quote:My problem is the loss of detail in larger areas like the road surface, e.g. towards the end, top left. The subsequent MP2 coding for DVD authoring will remove even more small features, ...
a. for my taste you use too many loss encoding steps.
b. try adding CAS with 0.7 strength before the denoising; maybe even use it after the encoding in the first step,... (you need to adjust the filter order for this)
c. If you want to lower the strength of the degrain use another filter. I would use SMDegrain or MCDegrainSharp instead of TemporalDegrain2 on such a source, for my taste the source is not grainy enough to use TemporalDegrain2.
(personally, I would also use a deblocker and maybe denoise the darker areas a bit)
Quote:they suggest using outputStage and postMix, but these are not available in the GUI.
Personally, I never use outputStage, which is why it's not offered in the gui, since in my experience in those case where it might make sense, usually using another filter is a better approach. For a degrain filter, TemporalDegrain2 is a rather strong filter by design,...
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.