View Full Version : Denoiser results in encoder saturation.
rkr1958
7th January 2007, 16:57
AVISynth script
LoadPlugin(plugin_dir+"DGDecode.dll")
MPEG2Source("I:\Aladdin_and_the_King_of_Thieves\Aladdin_and_the_King_of_Thieves_CAP.d2v").ConverttoYUY2
# De-Interlace
SeparateFields()
# De-Noise
odd=SelectOdd.Crop(16,0,-8,-8).AddBorders(12,4,12,4,color = color_black).Convolution3D(preset="animeLQ")
evn=SelectEven.Crop(16,0,-8,-8).AddBorders(12,4,12,4,color = color_black).Convolution3D(preset="animeLQ")
# Interlace
Interleave(evn,odd).Weave()
Background thread, http://forum.doom9.org/showthread.php?t=119948
Boulder mentioned that I could either sharpen the video or use a different denoiser. Suggestions/Opinions for the above script.
Also, Boulder suggested that I could use a higher bitrate quantization matrix. Suggestions/Opinions on this.
Boulder
7th January 2007, 22:39
Maybe you could try using MVDegrain2 or FFT3DFilter with SeeSaw instead of using Convolution3D.
There's a better way of handling interlaced stuff, smart bobbing. Also are you sure that the video is actually interlaced? If so, ConverttoYUY2() should be ConverttoYUY2(interlaced=true).
Pookie
7th January 2007, 22:54
Post a 10 second clip of your source file somewhere. No sound necessary. If your file can be IVTCed rather than deinterlaced, your end result will be much nicer looking.
Mug Funky
8th January 2007, 02:11
you could always tone down the denoising a bit. animeLQ will be ripping out lots of detail that you'd do better to leave in there.
if it's a clean enough capture, you may not need any denoising at all. it depends on what sort of bitrate you're aiming for (and what codec of course).
rkr1958
9th January 2007, 00:01
Thanks all for your responses and suggestions. I'll give them a go and let you know the results.
Post a 10 second clip of your source file somewhere. No sound necessary. If your file can be IVTCed rather than deinterlaced, your end result will be much nicer looking.
I cut out a short 14-second segment of video only, which ~30 MB, and started to upload but two things scared me off from up loading the video.
1. I haven't ever uploaded anything over 1 MB before and this is beyond the webspace limit that my ISP provides. I did a quick google search and found a site that provides 1-GB of free storage and signed up. However, I don't know if this site is secure & reputable. The site is mydatabus.com, does anyone know if this site is o.k.?
2. Even though it was only 14-seconds of a VHS movie I own ... I was afraid to upload ... am I being too parnoid here?
henryho_hk
9th January 2007, 06:50
If so, ConverttoYUY2() should be ConverttoYUY2(interlaced=true).
Or simply use the "upConv" parameter of mpeg2source().
rkr1958
14th January 2007, 17:53
Thanks for the advice, below is my new filter code. Comments?
# Load Necessary Plugins
loadPlugin(plugin_dir+"DGDecode.dll")
loadplugin(plugin_dir+"fft3dfilter.dll")
# Load Capture Source
MPEG2Source("I:\Aladdin_and_the_King_of_Thieves\Aladdin_and_the_King_of_Thieves_CAP.d2v")
# Crop & Add Borders
Crop(16,0,0,-8)
AddBorders(8,4,8,4, color = color_black)
# Convert to YUY2
ConverttoYUY2(interlaced=true)
# De-Noise
fft3dfilter(sigma=3, plane=4, interlaced=true)
Results - CCE-Basic still saturated and 2 pass VBR took 12 to 15-hours. CCE "predicted" file size (based on 7232 kbps average) was 4,434,421 KB. Actual file size was 3,663,752 KB, which was 770,669 KB or 17% undersized.
Next I ran with no noise filtering, just cropping and adding borders. Here's my script,
# Load Capture Source
MPEG2Source("I:\Aladdin_and_the_King_of_Thieves\Aladdin_and_the_King_of_Thieves_CAP.d2v")
# Crop, Add Borders
Crop(16,0,0,-8)
AddBorders(8,4,8,4, color = color_black)
Results - CCE-Basic encoded much faster. 2-pass VBR took around 2-hours. Also, it appears that the encoder was still saturated but much less so. Again the "expected" file size before encoding was 4,434,421 KB. The actual file size was 4,223,172 KB, which was 211,249 KB or 5% undersized.
Being realistic, on my 19" Sony LCD monitor I couldn't see any differences between the two encodes with respect to each other and even with respect to the source (expect for the cropping and adding borders to clean up the edges).
I viewed all of this as a learning experience. I appericate all your help. I guess the old saying, "If it ain't broke don't fix it" applies to noise filtering too.
One other thing I'd like to look into is if I could IVTC the video. I see that CCE-basic has that option. Would you do it in the encoder or would you use AVISynth to do it? If the latter, suggestions on how I should go about it? Also, suggestions on how, if I did do IVTC, to confirm that I did it correctly? Or is this also unneccesary given my results?
Thanks again.
Boulder
14th January 2007, 21:29
I'd use TFM+TDecimate (in TIVTC) or Telecide+Decimate (in Decomb) to IVTC if it is possible. Both plugins contain a good documentation.
If you undersize even without any denoising, try using SeeSaw to bring up the details.
Or if you don't want to use any filters, use HC encoder to encode to MPEG2 and choose a high-bitrate matrix such as Fox Home Entertainment. CCE Basic probably uses the MPEG standard matrix (the one with the non-flat-16 non-intra matrix) which probably will cause undersizing in your case.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.