View Full Version : Help improving a bad quality recording
Alxemi
19th October 2006, 01:00
Hi people.
Iīm and old user of avisynth and i used to use it cleaning dvds for XviD compresion. Now i have a completely different job to do, and iīm a little lost :scared:
I recorded some bad quality videos with a digital camera (nikon coolpix 5200) and now im trying to improve the videos as much as i can to make some dvd authoring. I have never dealed with that amount of noise, and the denoisers im used to play to increase compresibility are useless here (or i donīt know how to use them). Iīve read about two "new" awesome filters, fft3dgpu and hdragc, so i try them and thatīs what i got:
source:
LoadPlugin("C:\ARCHIV~1\GORDIA~1\AviSynthPlugins\QTSource.dll")
QTInput("d:\personal\fotos\Boda elena\video\DSCN2531.MOV", color=0)
converttoyv12()
lanczos4resize(720,576)
http://img174.imageshack.us/img174/6017/sourceyu5.png
and filtered:
LoadPlugin("C:\ARCHIV~1\GORDIA~1\AviSynthPlugins\QTSource.dll")
LoadPlugin("C:\ARCHIV~1\GORDIA~1\AviSynthPlugins\AGC.dll")
LoadPlugin("C:\ARCHIV~1\GORDIA~1\AviSynthPlugins\FFT3dGPU.dll")
QTInput("d:\personal\fotos\Boda elena\video\DSCN2531.MOV", color=0)
converttoyv12()
lanczos4resize(720,576)
FFT3DGPU()
hdragc()
http://img81.imageshack.us/img81/5265/filteredga4.png
Other example:
http://img205.imageshack.us/img205/7219/source2lt5.png
http://img98.imageshack.us/img98/8581/filtered2gi1.png
As i said, i tried many different denoisers\smoothers (fluxsmooth, unfilter, undot, convolution3) i was used to, with no results; maybe this is not the way i must follow, or maybe i dont use the filters properly... i gave up
So any ideas about what to do with that video would be really apreciated, iīm sure there are lots of things that can be done with it but i just donīt know what direction follow.
Thanks for the great forum and regards everybody.
Chainmax
19th October 2006, 03:37
I recently did a DVD out of some even crappier clips taken from a Sony S400. I can try to make a script out of the unfiltered screenshot, but a couple of small samples would be much better if you can upload them somewhere.
communist
19th October 2006, 06:51
There is not much point in just adding complex filters like FFT3D / HDRAGC without changing their parameters. For HDRAGC at least set max_gain and max_saturation - the source isnt too dark after all. What it needs is removal of that yellow tint and lowered saturation rather than more brightness.
For partly removal of that yellow tint you can try ColorYUV(autowhite=true) if its changing or if its constant ColorYUV(off_u=0+n,off_v=0-n) (adjust to taste). Autowhite seems is a bit too much on the supplied shots (instead of yellow tint you get blue tint in black tones). There are probably better ways but this should get you started. It looked pretty ok with:
Tweak(sat=0.75)
ColorYUV(off_u=4, off_v=-4)
Blue_MiSfit
19th October 2006, 10:33
definately read the documentation for fft3dpu and its mother, fft3dfilter. That's a filter that needs to be tuned for every source!
Maybe 2 calls, one for luma and one for chroma. Definately adjust the white point and reduce the saturation. Then we can talk about hdragc :)
AVIL
19th October 2006, 12:52
Hi,
My two (euro)cents:
FRFUN7. Fast and good against strong noise. It kills some detail but many times isn't noticeable.
MVDEGRAIN2. Part of the mvtools pack. Same comments.
DEPAN. To stabilize image (due to hand movements, image moves slightly).
If framerate isn't standard (25 frames/s for PAL) there also framerate-changers in mvtools pack.
My personal taste about resize is left to the last position in the chain. And also i prefer fft3dfilter over fft3dgpu.
Good luck
Alxemi
19th October 2006, 13:58
Thanks for your fast answers!
You are right guys about filter tuning. The thing is that i donīt know how to do that fine tuning with that new and complex filters.
I will try anyway the filters AVIL told me and try to upload a sample somewhere for testing.
Thanks again, regards.
communist
19th October 2006, 14:18
Read the docs for the filters and then use AvsP (http://forum.doom9.org/showthread.php?t=115506) - an excellent tool to fine tune your scripts :)
*.mp4 guy
19th October 2006, 22:14
We could probably give you better suggestions if you posted a short clip for people to look at.
Alxemi
20th October 2006, 01:02
Two samples uploaded:
sample 1 (http://rapidshare.de/files/37397156/sample.mov.html)
sample 2 (http://rapidshare.de/files/37398197/sample2.mov.html)
Alxemi
22nd October 2006, 19:34
From scratch, following AVILīs tips, this is my final (by now) script:
LoadPlugin("C:\ARCHIV~1\GORDIA~1\AviSynthPlugins\QTSource.dll")
LoadPlugin("C:\Archivos de Programa\GordianKnot\AviSynthPlugins\frfun7.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\depan.dll")
QTInput("d:\personal\fotos\Boda elena\video\DSCN2537.MOV", color=0)
ConvertToYV12
ChangeFPS=25
mdata = DePanEstimate()
DePanStabilize(data=mdata, dxmax=30, dymax=20)
Crop(16, 8, -12, -12)
lanczos4resize(720,576)
frfun7()
Iīm very happy with the results! depan+crop for stabilizing is amazing! also frfun gives a nice denoising for me, i tried to tweak it but default values do the right job to my eyes. thanks AVIL!
Now iīm going to try some luma\chroma tuning. As usual, any suggestion will be extremely valuable (now you have samples to play with)
thanks to the forum, regards.
Alxemi
23rd October 2006, 01:22
Huge improvement!!
Zemog from the forum sent me this script in a PM:
LoadPlugin("C:\ARCHIV~1\GORDIA~1\AviSynthPlugins\QTSource.dll")
LoadPlugin("C:\ARCHIV~1\GORDIA~1\AviSynthPlugins\AGC.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\depan.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\mvtools.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\RemoveDirt.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\FluxSmooth.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\MaskTools.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\mt_masktools.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\deblock.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\Deen.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\RemoveGrain.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\Repair.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\MaskTools.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\VagueDenoiser.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\RemoveDirtS.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\RemoveDirtSSE2.dll")
LoadPlugin("C:\ARCHIV~1\GORDIA~1\AviSynthPlugins\FFT3dGPU.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\fft3dfilter.dll")
Import("C:\Archivos de programa\GordianKnot\AviSynthPlugins\SeeSaw.avs")
Import("C:\Archivos de programa\GordianKnot\AviSynthPlugins\RemoveNoiseMC.avs")
QTInput("d:\personal\fotos\Boda elena\video\DSCN2531.MOV")
ConvertToYV12()
Tweak(hue=0.0,sat=0.5,bright=0.0,cont=1.0)
vlq_filter_ultimate()
HDRAGC(avg_lum=-128,max_gain=3.0,min_gain=1.0,coef_gain=1.0,max_sat=9.0,min_sat=0.0,coef_sat=1.0,protect=2,passes=4,black_clip=0.0,shift=0,shift_u=0, shift_v=0,corrector=0.8,reducer=0.5,shadows=true,avg_window=25,response=100,debug=0,freezer=-1)
(i include all the dlls for the forum-searchers)
Amazing results:
http://img120.imageshack.us/img120/9088/1fh9.png
http://img236.imageshack.us/img236/3509/2jk6.png
http://img332.imageshack.us/img332/1852/3sd5.png
http://img236.imageshack.us/img236/5767/4ku7.png
http://img66.imageshack.us/img66/8904/7ni1.png
http://img141.imageshack.us/img141/6196/8dz4.png
I will stabilize\resize the image too, but i want to do more tests with DePanStabilize before. I will post the final script and a zip with all that is needed to make it work (took me a while to found everything) so it can be used by others in mi situation without wasting much time.
This is going far beyond mi expectations, thanks Zemog and all the avisynth filters coders!
Pookie
23rd October 2006, 06:10
Looks very good! The combination of Tweak and Hdragc really made a big difference.
halsboss
23rd October 2006, 12:28
Zemog from the forum sent me this script in a PM:
LoadPlugin("C:\ARCHIV~1\GORDIA~1\AviSynthPlugins\QTSource.dll")
LoadPlugin("C:\ARCHIV~1\GORDIA~1\AviSynthPlugins\AGC.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\depan.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\mvtools.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\RemoveDirt.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\FluxSmooth.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\MaskTools.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\mt_masktools.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\deblock.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\Deen.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\RemoveGrain.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\Repair.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\MaskTools.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\VagueDenoiser.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\RemoveDirtS.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\RemoveDirtSSE2.dll")
LoadPlugin("C:\ARCHIV~1\GORDIA~1\AviSynthPlugins\FFT3dGPU.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\fft3dfilter.dll")
Import("C:\Archivos de programa\GordianKnot\AviSynthPlugins\SeeSaw.avs")
Import("C:\Archivos de programa\GordianKnot\AviSynthPlugins\RemoveNoiseMC.avs")
QTInput("d:\personal\fotos\Boda elena\video\DSCN2531.MOV")
ConvertToYV12()
Tweak(hue=0.0,sat=0.5,bright=0.0,cont=1.0)
vlq_filter_ultimate()
HDRAGC(avg_lum=-128,max_gain=3.0,min_gain=1.0,coef_gain=1.0,max_sat=9.0,min_sat=0.0,coef_sat=1.0,protect=2,passes=4,black_clip=0.0,shift=0,shift_u=0, shift_v=0,corrector=0.8,reducer=0.5,shadows=true,avg_window=25,response=100,debug=0,freezer=-1)
Hmmm... what is vlq_filter_ultimate() ?
Thanks
Alxemi
23rd October 2006, 15:47
Hmmm... what is vlq_filter_ultimate() ?
The denoiser, is implemented by RemoveNoiseMC.avs, which is loaded in the script.
Read about it here:
http://forum.doom9.org/showthread.php?t=110078&highlight=RemoveNoiseMC
halsboss
24th October 2006, 12:25
Thanks. Went there and looks good. Wasn't sure about which of the scripts in the thread was the latest, so will take a chance on the 1st post being the latest updated scripts.
http://forum.doom9.org/showthread.php?p=891763#post891763
Chainmax
24th October 2006, 21:23
That's an amazing result zemog accomplished. One thing though: the source is 30fps and if I were you I'd resize to NTSC resolution rather than PAL and adjust audio accordingly. Most standalones should play back PAL and NTSC without issues.
Alxemi
24th October 2006, 23:30
Most standalones should play back PAL and NTSC without issues.
Unfortunately, PAL is mandatory. I have to give many copies of the dvd to my friends and many of them has old dvd-players and tvs, and i cannot take the risk of an incompatibility.
Chainmax
25th October 2006, 18:35
You have to change the framerate then.
DVDIT
26th October 2006, 13:44
[QUOTE=Alxemi;891212]Huge improvement!!
Zemog from the forum sent me this script in a PM:
LoadPlugin("C:\ARCHIV~1\GORDIA~1\AviSynthPlugins\QTSource.dll")
LoadPlugin("C:\ARCHIV~1\GORDIA~1\AviSynthPlugins\AGC.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\depan.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\mvtools.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\RemoveDirt.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\FluxSmooth.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\MaskTools.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\mt_masktools.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\deblock.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\Deen.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\RemoveGrain.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\Repair.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\MaskTools.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\VagueDenoiser.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\RemoveDirtS.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\RemoveDirtSSE2.dll")
LoadPlugin("C:\ARCHIV~1\GORDIA~1\AviSynthPlugins\FFT3dGPU.dll")
LoadPlugin("C:\Archivos de programa\GordianKnot\AviSynthPlugins\fft3dfilter.dll")
Import("C:\Archivos de programa\GordianKnot\AviSynthPlugins\SeeSaw.avs")
Import("C:\Archivos de programa\GordianKnot\AviSynthPlugins\RemoveNoiseMC.avs")
QTInput("d:\personal\fotos\Boda elena\video\DSCN2531.MOV")
ConvertToYV12()
Tweak(hue=0.0,sat=0.5,bright=0.0,cont=1.0)
vlq_filter_ultimate()
HDRAGC(avg_lum=-128,max_gain=3.0,min_gain=1.0,coef_gain=1.0,max_sat=9.0,min_sat=0.0,coef_sat=1.0,protect=2,passes=4,black_clip=0.0,shift=0,shift_u=0, shift_v=0,corrector=0.8,reducer=0.5,shadows=true,avg_window=25,response=100,debug=0,freezer=-1)
I am unable to find out what this is : "AGC.dll". Where can I download this dll?
cobo
26th October 2006, 14:20
AGC is HdrAgc. You can get it here:
http://www.avisynth.org/warpenterprises/
hdragc_25_dll_20050521
mt_masktools is here:
http://manao4.free.fr/
DVDIT
26th October 2006, 14:28
AGC is HdrAgc. You can get it here:
http://www.avisynth.org/warpenterprises/
hdragc_25_dll_20050521
mt_masktools is here:
http://manao4.free.fr/
Thank you, cobo. Can you guys help me with a script to improve image quality of a very low quality video that was downloaded from you tube. The video/image quality is pretty bad, the worst kind you might see on Youtube. I am willing too try any script you might suggest. Thank you for your help.
DVDIT
26th October 2006, 14:39
AGC is HdrAgc. You can get it here:
http://www.avisynth.org/warpenterprises/
hdragc_25_dll_20050521
mt_masktools is here:
http://manao4.free.fr/
cobo, the hdragc I downloded form the link you provided does not contain a AGC.dll. When I run the script I get error message unable to load AGC.dll. I put the hdragc file in the avisynth plugin folder.
cobo
26th October 2006, 15:25
Sorry, I forgot where I got it from. The latest version's here:
http://strony.aster.pl/paviko/hdragc.htm
Thread about it's here:
http://forum.doom9.org/showthread.php?t=93571
DVDIT
26th October 2006, 16:33
LoadPlugin("C:\Program Files\Avisynth 2.5\plugins\AGC.dll")
LoadPlugin("C:\Program Files\Avisynth 2.5\plugins\depan.dll")
LoadPlugin("C:\Program Files\Avisynth 2.5\plugins\mvtools.dll")
LoadPlugin("C:\Program Files\Avisynth 2.5\plugins\RemoveDirt.dll")
LoadPlugin("C:\Program Files\Avisynth 2.5\plugins\FluxSmooth.dll")
LoadPlugin("C:\Program Files\Avisynth 2.5\plugins\MaskTools.dll")
LoadPlugin("C:\Program Files\Avisynth 2.5\plugins\mt_masktools.dll")
LoadPlugin("C:\Program Files\Avisynth 2.5\plugins\deblock.dll")
LoadPlugin("C:\Program Files\Avisynth 2.5\plugins\Deen.dll")
LoadPlugin("C:\Program Files\Avisynth 2.5\plugins\RemoveGrain.dll")
LoadPlugin("C:\Program Files\Avisynth 2.5\plugins\Repair.dll")
LoadPlugin("C:\Program Files\Avisynth 2.5\plugins\MaskTools.dll")
LoadPlugin("C:\Program Files\Avisynth 2.5\plugins\VagueDenoiser.dll")
LoadPlugin("C:\Program Files\Avisynth 2.5\plugins\RemoveDirtS.dll")
LoadPlugin("C:\Program Files\Avisynth 2.5\plugins\RemoveDirtSSE2.dll")
LoadPlugin("C:\Program Files\Avisynth 2.5\plugins\FFT3dGPU.dll")
LoadPlugin("C:\Program Files\Avisynth 2.5\plugins\fft3dfilter.dll")
Import("C:\Program Files\Avisynth 2.5\plugins\SeeSaw.avs")
Import("C:\Program Files\Avisynth 2.5\plugins\RemoveNoiseMC.avs")
AVISource("F:\My Music\H.T_-_Hule_Hule.avi")
ConvertToYV12()
Tweak(hue=0.0,sat=0.5,bright=0.0,cont=1.0)
vlq_filter_ultimate()
HDRAGC(avg_lum=-128,max_gain=3.0,min_gain=1.0,coef_gain=1.0,max_sat=9.0,min_sat=0.0,coef_sat=1.0,protect=2,passes=4,black_clip=0.0,shift=0,shift_u=0, shift_v=0,corrector=0.8,reducer=0.5,shadows=true,avg_window=25,response=100,debug=0,freezer=-1)
The above is the script I copied from this thread and just replaced the path to the plug in and run it in AVSEdit but I am getting an error message that reads there is no function named vlq_filter and HDRAGC. I don't see where I went wrong. Please help!!!
zemog
26th October 2006, 21:53
DVDIT:
vlq_filter_ultimate() function is an example to use de function RemoveHighNoiseMC()
-from Heini011- for high denoise values.
Read threat http://forum.doom9.org/showthread.php?t=110078 (first page, post 10th April 2006 from Heini011).
To use it I suggest you open your file RemoveNoiseMC.avs and verify if RemoveHighNoiseMC() is there. If yes, copy the vlq_filter_ultimate() function in it. If not, copy both RemoveHighNoiseMC() and vlq_filter_ultimate().
Alxemi
27th October 2006, 00:52
DVDIT i understand you, it took me a couple of hours to make it work :D
Here (http://rapidshare.com/files/816197/pack.7z.html) you have a pack with all the dlls and avs needed. test.avs is zemogīs script. final.avs is nothing
Copy all the dlls and the avs to your plugins directory, change the paths if needed and it will work.
Two important things:
You must copy the file fftw3.dll to a directory like windows\system32 which is in the "path" of you operating system.
And:
Thew script will only work if you have a directx9 capable graphics card (because of ff3d).
The script is slow. I have 1 fps in my athlon 3000+, 1gb dual chanel ram and nvidia 5900xt
Zemog nice to see you in here ;)
DVDIT
27th October 2006, 05:13
Zemog & Alexmi, thank you both for your help.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.