Avidemux Forum

Participate => Documentation & Tips => Topic started by: adlerhn on December 28, 2017, 07:53:02 PM

Title: Cleaning static background
Post by: adlerhn on December 28, 2017, 07:53:02 PM
Hi, I have a 30-minute video taken with a static camera with a couple of people talking and not moving much, and a static background behind.

Unfortunately, the camera I used added some grain and compression noise, especially noticeable in the static background, so I would like to clean the video.

I am planning to compress into x265, but am open to other formats if better suited.

I have tried adding a Mplayer Denoise 3D HQ temporal filter, but it also adds some ghosting to the people, e.g. when they move their arms or hair. If I lower the filtering, yes, there is less noise and no noticeable ghosting, but I still don't get a fully static background; there is some blur and the noise reappears in every key frame.

On the x265 configuration, I've also tried to raise the Nosie Reduction Inter parameter of the Analysis tab, but I also don't get good results.

Any tip to which configuration could I try to clean the background while avoiding any flicker on key frames?
Title: Re: Cleaning static background
Post by: Jan Gruuthuse on December 29, 2017, 01:49:35 PM
3D is for 3D video only, hence ghosting on 2D video.
see below message from dosdan
Title: Re: Cleaning static background
Post by: dosdan on December 29, 2017, 09:09:17 PM
Quote from: Jan Gruuthuse on December 29, 2017, 01:49:35 PM
3D is for 3D video only, hence ghosting on 2D video.

"3D" NR in video cameras was in use a long time before 3D videos came along.   

2DNR is spatial NR i.e. the scope of the NR is limited to within each frame (intra-frame) like the NR used in a single photo.  The two dimensions are height & width.

3DNR is spatio-temporal NR. The three dimensions are height, width & time  So, as well as spatial NR, NR is performed using differences between frames (inter-frame). The inter-frame part of it works well for static elements in the frames, (like the NR you get from stacking a bunch of photos of a static subject), but less well for the moving portions.

The "Mplayer Denoise 3D HQ temporal filter" is probably misnamed. As I understand it, a true temporal NR filter is just 1D, and the sole dimension is time. A Temporal NR filter would be using the random/uncorrelated differences (noise) between the current frame and the ones before & after it. Therefore it will not be considering spatial differences within each frame i.e. the random difference between a pixel and its nearby surrounding pixels in the frame.

But if this filter is really performing "3DNR", it will be a spatio-temporal filter.

Dan.
Title: Re: Cleaning static background
Post by: Jan Gruuthuse on December 30, 2017, 04:57:28 AM
@Dosdan thanks for explaining this, if it is like you're  saying, then the filter name would be misleading for a noise reduction filter spread over multiple frames with the same static components.
Title: Re: Cleaning static background
Post by: adlerhn on January 03, 2018, 02:05:21 AM
Thanks for your insight.

So is there any other filter that would fit?

What I have in my head is something like the "smart blur" filter in 2D, but in 1D (time), averaging pixels across time only if their differences are below a threshold. Alternatively, I could see this achieved also by tweaking some quantization parameters of the video codec.