View Full Version : Denoising before or after resizing
Lele-brz
14th December 2007, 09:21
Hi all,
I would like to ask an advice,
I'm transcoding a noisy video and I'm using DeGrainMedian filter.
When applying a denoise would you suggest to use it before or after resizing filter?
Is there a better denoiser considering that I want to use it to "ease" the x264 encoding with a low bitrate?
Thanks in advance
bye
Dark Shikari
14th December 2007, 09:25
DeGrainMedian is a pretty weak denoiser.
If you want stronger denoising, try fft3dfilter/fft3dpu, or dfttest, or frfun, or mvdegrain. HQDN3D is a very fast filter and can do a decent job sometimes, too.
I'd always do it before resizing, personally.
Lele-brz
14th December 2007, 09:52
Hi, thanks for answering
I'll give it a try with the filters you suggest, trying before and after resizing and evaluating the SSIM and PSNR of the resulting transcode (I'm using x264).
For resizing I use BilinearResize and BicubicResize.
Since the frame rate is quite low (around 500kbs) I have to resize to around 512x384.
The problem is that even with good encoding when playing the clip at full screen the edges are quite smooth.
Is there a better resizing filter consider that I want a sharper image at full screen?
thanks again
Dark Shikari
14th December 2007, 09:55
Hi, thanks for answering
I'll give it a try with the filters you suggest, trying before and after resizing and evaluating the SSIM and PSNR of the resulting transcode (I'm using x264).This is stupid, because SSIM/PSNR are only meaningful as compared to the original clip, not the denoised clip. Removing more noise will quite easily give you higher SSIM/PSNR (relative to the denoised clip) without actually improving subjective quality, simply because the noise is no longer there. If, for example, you used a denoising chain that blurred the clip heavily but completely removed all temporal noise, the SSIM/PSNR would turn out incredibly good--but it would still look like crap.
For resizing I use BilinearResize and BicubicResize.If you want a sharper image, try using a sharper resize function.
Since the frame rate is quite low (around 500kbs)500kbps is a bitrate, not a frame rate. What do you mean, the framerate is quite low?
The problem is that even with good encoding when playing the clip at full screen the edges are quite smooth.
Is there a better resizing filter consider that I want a sharper image at full screen?If you want your image to be sharp, you're not going to be able to do so by shrinking it down. You're also going to want to try a sharpener (e.g. LimitedSharpenFaster).
Lele-brz
14th December 2007, 10:13
yes, using the metrics won't help much. (I tried that with the results you told...)
yes I meant bitrate not frame rate, sorry for the typo.
So, maybe I'll try Lanczos4Resize, some denoiser, and at the end LimitedSharpenFaster.
One thing is not too clear to me, is there an empirical relation between the bitrate I'm using (It has to be so low, unfortunately) and the suggest resized resolution?
I noticed that at a fixed bitrate, if I resize (I'm always downsizing from the HD source) to a small resolution the result when played fullscreen has blurred edges.
If I keep a higher resolution the edges are sharper but there are many artifacts.
Dark Shikari
14th December 2007, 10:29
I noticed that at a fixed bitrate, if I resize (I'm always downsizing from the HD source) to a small resolution the result when played fullscreen has blurred edges.
If I keep a higher resolution the edges are sharper but there are many artifacts.This is normal.
Lower resolution = less detail throughout the image, no matter what the quality of the encoding is.
Higher resolution, but at the same bitrate = less detail in some parts of the image, since the encoder is forced to save bits somehow. Its generally better, IMO, to keep full resolution unless you're going for an insanely low bitrate. If you're trying to avoid all artifacting, thats completely impossible at 500kbps.
What is your x264 commandline?
Lele-brz
14th December 2007, 11:48
At the moment I'm using two different profiles:
I'm looking for a good tradeoff in terms of encoding time
Main:
--pass 1 --progress --bitrate 500 --stats C:\ttt\input.stats --threads auto --subme 1 --analyse none --me dia --ref 1 --output NUL C:\ttt\input.avs
--pass 2 --progress --bitrate 500 --stats C:\ttt\input.stats --threads auto --analyse p8x8,b8x8,i4x4,p4x4 --subme 6 --output C:\ttt\output.mp4 C:\ttt\input.avs
High:
--pass 1 --progress --bitrate 500 --stats C:\ttt\input.stats --threads auto --bframes 3 --b-pyramid --direct auto --filter 1:1 --subme 1 --analyse none --me dia --ref 1 --output NUL C:\ttt\input.avs
--pass 2 --progress --bitrate 500 --stats C:\ttt\input.stats --threads auto --ref 16 --bframes 3 --b-pyramid --weightb --b-rdo --bime --direct auto --filter 1:1 --analyse all --8x8dct --no-fast-pskip --subme 7 --me umh --trellis 2 --mixed-refs --output C:\ttt\output.mp4 C:\ttt\input.avs
and the avs
DirectShowSource("C:/t1.mkv")
BicubicResize(576, 320, 0, 0.5)
ConvertToYV12()
Dark Shikari
14th December 2007, 16:08
I'm looking for a good tradeoff in terms of encoding time
...
--pass 2 --progress --bitrate 500 --stats C:\ttt\input.stats --threads auto --ref 16 --bframes 3 --b-pyramid --weightb --b-rdo --bime --direct auto --filter 1:1 --analyse all --8x8dct --no-fast-pskip --subme 7 --me umh --trellis 2 --mixed-refs --output C:\ttt\output.mp4 C:\ttt\input.avs
Using --ref 16 is a great way to waste encoding time :)
Lele-brz
14th December 2007, 16:23
Ok, and probably it doesn't improve a lot the quality.
For the rest is possible to improve the sharpness of the resulting video?
Dark Shikari
14th December 2007, 16:24
Ok, and probably it doesn't improve a lot the quality.
For the rest is possible to improve the sharpness of the resulting video?Using low --deadzone-intra and --deadzone-inter values instead of Trellis improve sharpness, but at a heavy bit cost; I doubt you'd want to use them at your bitrate.
Your best option is to try to sharpen in your script, but note that sharper videos require more bitrate.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.