Log in

View Full Version : denoise,brighten noisy,dim PAL clip


halsboss
25th January 2007, 06:04
Greetings. Seeking improved script to denoise and brighten this noisy and generally dim clip. Source is odd - an xvid PAL 4x3 768x576(?) 25fps 4Mb.
http://rapidshare.com/files/13266299/source07.avi.html
image snipped
Final Target is DVD. Have this script so far (hopefully avoiding TV overscan too).

AviSource("D:\Source\NiceSource\source07.avi", audio=false)
AssumeFPS(25)
ConvertToYUY2(interlaced=FALSE)
Convolution3D(0, 6, 10, 6, 8, 2.8, 0)
Pixiedust(limit=5,output="YUY2")
bx = 4*8
by = 3*8
rx = 720 - (2 * bx)
ry = 576 - (2 * by)
LimitedSharpenFaster(smode=4, dest_x=rx, dest_y=ry)
Addborders(bx,by,bx,by)
Converttoyv12()
HDRAGC(coef_gain=0.7, max_gain=1.05, max_sat=6)
#comment out the above line and uncomment the ones below for boxed comparison 720x576
#L1 = last
#L2 = L1.HDRAGC(coef_gain=0.7, max_gain=1.05, max_sat=6)
#TL3=L1.Crop(0, 0, -360, -288, true)
#TR3=L2.Crop(360, 0, -0, -288, true)
#BL3=L2.Crop(0, 288, -360, -0, true)
#BR3=L1.Crop(360, 288, -0, -0, true)
#L3 = StackVertical(StackHorizontal(TL3,TR3), StackHorizontal(BL3,BR3)).ScriptClip("""subtitle("HDRAGC after coef_gain=0.7, max_gain=1.05, max_sat=5 " + string(current_frame) ,size=20,x=25,y=35)""")
#L4 = L1.ScriptClip("""subtitle("cleaned " + string(current_frame) ,size=20,x=25,y=35)""")
#L5 = L2.ScriptClip("""subtitle("HDRAGC after coef_gain=0.7, max_gain=1.05, max_sat=5 " + string(current_frame) ,size=20,x=25,y=35)""")
#return L3 ++ L4 ++ L5

Hope that the script/result can be improved. Test result 6.2Mb 720x576 xvid http://rapidshare.com/files/13266914/source07-result.avi.html.
Any suggestions ?

cwk
26th January 2007, 00:25
I'm not very adept at brightness adjustments, but I'll take a swing at the denoising. Your clip is very blocky, particularly true in motion frames. This worked for me:


AVISource("source07.avi")

Deblock_QED(quant1=20, quant2=50, uv=1) #helps wipe out the blocks
FFT3DFilter(sigma=5, plane=3, bt=4) #heavy chroma cleaning
FFT3DFilter(sigma=1.5, plane=0, bt=4) #lighter luma cleaning

halsboss
26th January 2007, 02:38
Thanks cwk, will try that and post comparative results. Did you see http://forum.doom9.org/showthread.php?t=121303 asking about quant1/quant2 ( hoping... :) ).

BTW, any suggestions on favourite tool(s) to take a .JPG snapshots of a specific frame before (the xvi .avi) and after (the .mpv from HC) ? Can't figure out how to do it in Vdub-mpeg2.

cwk
26th January 2007, 18:54
Howdy halsboss,

Thank you for posting the link to the Deblock_QED threads. I have learned something today.:)

In regards to your question about taking snapshot jpegs, you should be able to do that in vdub. If you index the m2v with DGIndex you can use mpeg2source in your avs script. The "DVD2AVI / DGIndex" threads have plenty of pointers on how to do this.

Once your files are opened in vdub, bracket the frames you want to export with the "Set Selection Start" (home key) and "Set Selection End" (end key). Then select Save Image Sequence from the File menu. I have not tried that from within VDub-Mpeg2, but it is available from within standard VDub.

Hope this helps!!

halsboss
27th January 2007, 10:43
GoodOh cwk. That got me a result in terms of usable images ! :) Thought I'd start with deblocking 1st ... see Deblock_QED_MT2 results in related post http://forum.doom9.org/showthread.php?p=944940#post944940 ... maybe I'll have a go with Deblock() (Fizick's plugin) unless you have other suggestions.