Flickering noise

So how does everyone deal with flickering noise due to poor lighting?

I’ve been playing with HQDN3D and it is good at reducing spatial noise without washing picture too much. However I couldn’t clean up flickering. I tried different temporal settings for HQDN3D but I don’t see much difference.

What is everybody else experience and whadya all do about flickering due to poor lighting?

If you mean flickering from fluorescent bulbs that are out of sync with the camera’s shutter speed… I’ve personally been stuck with the flickering. There is a company with something Alchemy in the name (EDIT: Digital Anarchy “Flicker Free” plug-in) that makes a well-reviewed commercial flicker repair tool. Generally, I try to get my shutter correct from the start and avoid the problem, but I realize that isn’t always an option when sourcing from other people. Would be great to hear if someone else had an open source repair option.

If you have low-light footage with high ISO noise, also check out the “Reduce Noise: Wavelet” filter available in the new beta of Shotcut. The built-in presets are a good starting point.

That’s the noise I couldn’t combat with HQDN3D. Low-light High ISO grain flickering from frame to frame.

I was kinda hoping someone would share experience with new “Reduce Noise: Wavelet” filter :wink:

But coming back to good old HQDN3D, could anybody filter out high ISO grain flickering noise with high spatial settings on HQDN3D or there is no “magic”?

I wouldn’t recommend HQDN3D for ISO noise. It smears pixels too much.

Here is the background on the wavelet filter:

Wavelet is SOOOO slow! 8xT on 1080p60 and my CPU is barely loaded.

At least hard setting on Wavelet didn’t fix my flickering noise :frowning_face:

Can you post screenshots of two adjacent frames? I’m having difficulty visualizing what this flicker problem looks like.

Look at the couch, TV screen or my pants…

That color noise flickers

I could smooth it out some with HQDN3D but it still flickers. HQDN3D Temporal above 15% creates “ghost” artifacts. Higher Spatial settings above 25% washes picture out too much.

Wavelet Garrote and Hard methods didn’t do much to this noise (worse than HQDN3D at 25/15). Wavelet Soft washes picture worse than HQDN3D.

I see what you’re talking about now.

It’s a little difficult to determine the cause. In the screenshot, the preview window is in 360p Preview Scaling mode, and the screenshot is JPG rather than PNG. That’s a lot of image deterioration to really know what’s happening. (There is a File > Export Frame option that makes this process easier.) But from what I see, the main issue is not ISO noise. The flicker looks more like inconsistent macroblock artefacts from heavy compression. Neither Wavelet nor HQDN3D are designed to handle this.

FFmpeg has three deblock filters worth trying, although I wouldn’t get my hopes too high as this flicker is unusually severe:

Examples of filter usage and results are here:
https://trac.ffmpeg.org/wiki/Postprocessing

Shotcut does not have UI interfaces to these filters yet, but it’s been on my list to try adding them at some point.

How hard is it to bring in ffmpeg filters into an MLT? I am fine with manually adding ffmpeg filters to MLT without UI if it is possible. Is it?

It’s not too bad. Make a simple MLT with one video clip and one FFmpeg filter applied like “Reduce Noise: Wavelet”. Save the MLT then open it in a text editor. Find the <filter> element and rewrite it to the filter you want. But use the naming conventions of MLT Framework, not direct FFmpeg names. Here are the MLT Framework filter docs:

https://mltframework.org/plugins/PluginsFilters/

Note that the service name would be avfilter.pp7 not just pp7, and the parameters would be named av.mode rather than just mode. I’m pretty sure Shotcut will strip it out if you open and resave in the UI, so try to avoid that.

If Shotcut strips it completely even for export, then try calling qmelt directly on the MLT file.

Well, the root cause if low light and camera’s poor handling of low light conditions.

The camera creates wrong color grains and masks them… when I color correct and fix lighting in post I unmask them :rofl: HQDN3D could smooth those color grains on frame by frame basis, but the camera places those wrong color grains in different places and thus the flickering… I am not technical enough to know if it is “inconsistent macroblock artefacts”, but my leather couches are awesome for this artifact :rofl:

What ffmpeg filter might help the most?

BTW, I tried commercial denoisers on this artifact and say Red Giant Denoiser is a lot worse than HQDN3D and that was my reason switching to Shotcut for rendering.

BTW, what is the difference between melt and qmelt?

I already listed the three filters that have the best chance of fixing it.

My point was that even if you had a camera sensor that worked perfectly in low light, those artefacts would still appear because the compression is so heavy that it’s creating blocks, and the blocks are what is flickering. ISO noise is a much finer grain and doesn’t have color smearing to the extent seen here. That color smear is compression artefact. So, the deblock filters are probably the best shot at fixing it.

Wow. It is easier than what I thought it might be. So just avfilter./av. prefixes and that’s it?
Could I bring in any ffmpeg filter this way?

Any filter listed in the MLT Framework documentation, yes. Not all FFmpeg filters have MLT wrappers. And some are specifically black-listed because they modify the frame rate, which would break the MLT engine.

Note that frei0r and a few other goodies are in the MLT Framework list, too.

Apologies, I may have misinterpreted your question. If you were asking which of the three filters are the best for fixing this video clip, that is unfortunately difficult to say.

Those three filters tackle deblocking in different ways. They each specialize for a different kind of source. Deblocking isn’t a set-it-and-forget-it type of thing and there are no optimized generic settings. It takes a quick test, usually with several parameter sets, to match the filter to the specific type of artefact produced by the camera.

Wish I had a faster solution for you, but I don’t. This is where filter UIs would be very helpful.

HandBrake has an implementation of HQDN3D and NLMeans that is different than the FFmpeg implementation. Maybe try those and see if they offer better results.

Actually, thinking on it some more, NLMeans might be halfway graceful at handling this issue.

http://ffmpeg.org/ffmpeg-all.html#nlmeans-1
https://mltframework.org/plugins/FilterAvfilter-nlmeans/

Most recent beta doesn’t strip those filters out

How hard is it to implement default filter view to allow editing of what is set in MLT? Say for

   <filter id="filter_fspp" >
      <property name="mlt_service">avfilter.fspp</property>
      <property name="av.quality">4</property>
      <property name="av.qp">10</property>
       <property name="disable">1</property>
   </filter>

just have an input field for “av.quality” and “av.qp”, etc?

This is very cool!

It’s pretty straight-forward, especially if using another filter as a start point then customizing it.

If you’re on Windows, look in this folder:

C:\Program Files\Shotcut\share\shotcut\qml\filters\vaguedenoiser

Copy the vaguedenosier folder to a new filter name like fspp then customize the two files inside it.

It is Shotcut.app/Contents/Resources/shotcut/qml/filters/vaguedenoiser on MacOS.

There are two compiled files if the folder. How do I compile qml?