Flickering noise

I think deblocking is helping some with my couch noise.

Here is original noise

pp filter applied

<filter id="0_pp" >
  <property name="mlt_service">avfilter.pp</property>
   <property name="av.subfilters">ac</property>
 <property name="disable">0</property>


<filter id="0_pp7" >
  <property name="mlt_service">avfilter.pp7</property>
  <property name="av.qp">20</property>
  <property name="av.mode">1</property>
   <property name="disable">0</property>


<filter id="0_spp" >
  <property name="mlt_service">avfilter.spp</property>
   <property name="av.quality">5</property>
  <property name="av.qp">10</property>
  <property name="av.mode">hard</property>
  <property name="disable">0</property>


<filter id="0_fspp">
  <property name="mlt_service">avfilter.fspp</property>
  <property name="av.quality">4</property>
  <property name="av.qp">10</property>
  <property name="av.strength">5</property>
  <property name="disable">0</property>

My money are on FSPP at this point :wink:

Still even with FSPP there are those large color blocks noticeable on the couch. Any idea what fspp parameter to tweak to get rid of them?

Shotcut compiles it automatically when restarted.

To my eye, that couch is looking pretty good, or at least complementary to everything else in the scene. Are the blocks more noticeable during playback?

I don’t have an FSPP recommendation because the settings are so tightly bound to the source… I would have to play with it same as you. However, there is another filter called deband that dithers flat color areas, which might create the illusion of more detail.

Nice work!

They are, but I think I figured out how to get rid of the flicker.

The “magic” is FSPP + HQDN3D :joy:

FSPP settings higher than 5/8/8 or 5/10/5 range don’t do much apart from washing out picture. Wavelet didn’t work out on that noise neither. However, HQDN3D Temporal 10% got rid of the temporal flicker. Yey!

Frame doesn’t do justice, but I am pretty happy with

<filter id="0_fspp">
  <property name="mlt_service">avfilter.fspp</property>
  <property name="av.quality">5</property>
  <property name="av.qp">8</property>
  <property name="av.strength">8</property>
  <property name="disable">0</property>
<filter id="0_hqdn" >
  <property name="version">0.1</property>
  <property name="mlt_service">frei0r.hqdn3d</property>
  <property name="0">0.15</property>
  <property name="1">0.1</property>
  <property name="disable">0</property>

In fact it is pretty magical :smile:

Now, before I kick it up a notch with the same problem on 1080i material, what deinterlacer Shotcut uses by default before any other filter?

On 1080i should I use
<profile progressive="0" ... frame_rate_num="30000" frame_rate_den="1001" colorspace="709"/>

and then bring in some deinterlacing filter say yadif and then fspp, etc and render as progressive=1?

Why yadif_cuda is not supported by MLTframework?

Export tab > Advanced > Deinterlacer > [choices]

You should not have to add your own deinterlace filter. I’m pretty sure Shotcut deinterlaces the frame before handing it to the first filter in the chain, then re-interlaces for export if required. I don’t mess with interlaced any more than I absolutely have to, so I could be wrong, but that’s the best I recall.

I am pretty sure Export Tab deinterlacer is applied after frame goes thru filters.

Here is 1080i material I applied same fspp+hqdn3d to combat similar flicker

Interlacing is pretty visible.

I am wondering if fspp would work on interlaced material?

If not, I am thinking to bring in yadif and deal with the flickering noise same as on 1080p60. In that case do I set progressive=“1” in

<profile progressive="1" ... frame_rate_num="30000" frame_rate_den="1001" colorspace="709"/>
and treat timeline as progressive?

That wouldn’t make any sense. Why deinterlace at the end of the pipeline right before re-interlacing it again for export? Also, most filters don’t work on interlaced material.

Is this in the preview window or final export? The preview window is controlled from the menu by Settings > Deinterlacer > One Field or Linear Blend. Neither will look as good as YADIF and will be visible during preview.

If you do bring in YADIF, what about deinterlacing with ffmpeg and bwdif prior to bringing the clip into Shotcut just to make life easy?

The image that I uploaded is Export Frame on
<profile progressive=“0” … frame_rate_num=“30000” frame_rate_den=“1001” colorspace=“709”/>

Setting in MLT
<profile progressive=“1” … frame_rate_num=“30000” frame_rate_den=“1001” colorspace=“709”/>
brings in some deinterlacer built into mltframework. What deinterlacer is it?

For the preview window, it is whatever is defined by menu > Settings > Deinterlacer. So, one field or linear blend.

For final export, it is whatever is defined by Export > Advanced > Video tab > Deinterlacer.

For Export Frame… I have no idea. :rofl:

I don’t believe this is accurate because in my opinion Export Frame being interlaced when MLT is progressive=“0” proves that export deinterlacer is applied at the end. When MLT is progressive=“1” some internal deinterlacer is applied and whatever is set in Export > Advanced > Video tab > Deinterlacer is irrelevant since timeline is Progressive.

Anyway, I think I might have figured out how to deal with the same flickering noise on 1080i material.

As I thought denoisers were tripping because they cannot deal with interlaced material, so most important and first thing to do with 1080i is to deinterlace. It could be done simply by importing 1080i material into 1080p MLT or setting progressive=“1” in profile in MLT.

Then the same FSPP+HQDN3D “magic”. :joy:

FSPP with same settings work on 1080i too

<filter id="0_fspp">
  <property name="mlt_service">avfilter.fspp</property>
  <property name="av.quality">5</property>
  <property name="av.qp">8</property>
  <property name="av.strength">8</property>
  <property name="disable">0</property>

However HQDN3D on 1080i is more sensitive to temporal setting and creates ghost artifacts above 6% and I have to sacrifice more with 20% spatial

<filter id="0_hqdn" >
  <property name="version">0.1</property>
  <property name="mlt_service">frei0r.hqdn3d</property>
  <property name="0">0.2</property>
  <property name="1">0.06</property>
  <property name="disable">0</property>

Overall it is harder with 1080i and I don’t know how to combat this artifact

that doesn’t show in Export Frame

Is 1080i at 29.97 is really 1/4 of information vs. 1080p60?

On another note… fspp slows export about 5 times.

How do I make it faster?

My CPU is utilized 50% and from experience this 50% CPU utilization on 2 threads per core processors is ffmpeg filters thing. I don’t know enough about mltframework relationship with ffmpeg, thus the question - can I make mltframework thread more somehow?

I’m not following the logic. If a deinterlacer was applied at the end, the exported video would be progressive by virtue of being deinterlaced. If a deinterlacer was applied at the end and immediately re-interlaced to meet the output format requirement, the export just did busywork to get back where it already was.

Correct, which means Shotcut uses an internal deinterlacer before handing the frame to the filters. Best I recall (my memory is sketchy on this), Shotcut doesn’t actually re-interlace (separate the fields). It just sets the flags to signal that the content is interlaced.

Shotcut should be doing this internally automatically.

This isn’t necessary to invoke the deinterlacer. All this will do is leave the export format progressive, as opposed to flag it as interlaced for the export.

Technically, half. 1080i is 60 fields per second, which is half a frame, therefore half the information.

Yeah, these are heavy filters and they don’t thread well. MLT is just a wrapper and can’t generally control threading. MLT just hands off to FFmpeg and then FFmpeg does whatever it does at native speed. Are you noticing a command-line FFmpeg transcode going faster than Shotcut UI?

I haven’t tried that nor do I think plain FFmpeg would go faster. My memory is sketchy on this but I have this preconception from years ago that FFmpeg filters or at least some FFmpeg filters just don’t load CPU fully. I was just hoping that over years (over a decade already actually) things got better and it is just my prejudice :wink:

Looking at my notes on [commercial] Red Giant Denoiser that trips on this noise in the first place… fspp+hqdn3d is at least 3-5 to 10 times faster! :+1:

Technically 60 fields are from different frames, so… depending on deinterlacing it could be between 1/2 and 1/4 of the information. That is why I am so curious about Shotcut’s internal deinterlacer that we have misunderstanding about.

I believe when 1080i is brought into 1080p timeline/mlt some internal de-interlacer is applied prior to any other filter and then material is progressive and Export > Advanced > Video tab > Deinterlacer has no effect. Look at this post

The question is what is that


When mlt is progressive=“0”, I believe, based on clearly interlaced Export Frame that I uploaded earlier that included my filters and all, that Export > Advanced > Video tab > Deinterlacer is applied AFTER all filters and before feeding now progressive frame to the encoder.

Do I, may be, explaining the difference more clearly?

In my experience with “my couch noise” there is a big difference between when I have interlaced mlt vs. exactly the same mlt with progressive=“1” in mlt profile.

This selects the deinterlace algorithm that is used by “some internal de-interlacer is applied prior to any other filter”

what is that deinterlace=deinterlace,avdeinterlace

There can multiple filters for the same role (left of equal sign) that are available depending upon the build configuration. This chooses them in priority order based on availability. Nearly every MLT build includes the MLT module that includes the deinterlace filter. avdeinterlace is something really old forked from ffmpeg well before libavfilter. It is not advisable and merely a plan B. The algorithm selection only applies to deinterlace as avdeinterlace is some fixed function.

Export > Advanced > Video tab > Deinterlacer is applied AFTER all filters

Not usually, but this could happen if your project Video Mode is interlace and you change the vertical resolution in export.

Export > Advanced > Video tab > Deinterlacer is put into consumer in render mlt like so

<consumer target="/Users/zander/Test.mp4" f="mp4" pix_fmt="nv12" vpre="medium" aspect="1.77778" channels="2" movflags="+faststart" ar="48000" vb="12M" top_field_first="2" mlt_service="avformat" real_time="-3" g="299" bf="3" rescale="bilinear" progressive="1" preset="medium" threads="3" deinterlace_method="yadif" vcodec="h264_videotoolbox" ab="256k" acodec="aac"/>

Does this consumer resets “some internal de-interlacer”? Is it “guaranteed” that this new de-interlacer (yadif in the example) “is applied prior to any other filter”?

Does Export Frame (that knows nothing about Export > Advanced > Video tab > Deinterlacer) use some other de-interlacer? [and it really doesn’t matter what Export Frame shows since render would use different de-interlacer?]

What would happen if I drop 1080i material on 59.94fps timeline? Would “some internal de-interlacer” split 60 fields properly and create 60 frames or would it create 30 frames and double them up?

I know how bizarre my questions sound, but it makes all the difference for “my couch noise” :wink:

This topic was automatically closed after 90 days. New replies are no longer allowed.