View Full Version : Help processing recorded video
RCL0000ZK
13th January 2010, 14:59
I want to process this video which I recorded using my TV Tuner card.
The first step is denoising.
I'm new to denoising and have no experience on that front.
I used this (http://forum.doom9.org/showthread.php?p=1121332#post1121332) post as a guide and came up with the following script. But, I'm not satisfied with it because I get this 'outline ghosting' kind of artifact.
MPEG2Source("Station 21-2008-06-29_17-29-29h.d2v", cpu=6, iPP=true)
FFT3DFilter(sigma=16, plane=3, bw=32, bh=32, bt=4, ow=16, oh=16,interlaced=true)
FFT3DFilter(sigma2=16, sigma3=6, sigma4=12, plane=0, bw=32, bh=32, bt=4, ow=16, oh=16,interlaced=true)
#~ Trim(80,-1) ++ Trim(18000,-1) ++ Trim(24350,-1)
#~ a=last
#~ Histogram(mode="color")
#~ Interleave(a,last)
Please Help.
Here (http://cid-3deabc5c7f57077b.skydrive.live.com/self.aspx/.Public/Video%20Edit/Sample.mpg) is the sample which I made using Video Edit Master
thetoof
13th January 2010, 21:04
This filter chain was only meant as a reference clip for temporaldegrain, so the full script should be something like this.
source=MPEG2Source("Station 21-2008-06-29_17-29-29h.d2v", cpu=6, iPP=true).deinterlacing (like tgmc)
source.FFT3DFilter(sigma=16, plane=3, bw=32, bh=32, bt=4, ow=16, oh=16)
predenoised=FFT3DFilter(sigma2=16, sigma3=6, sigma4=12, plane=0, bw=32, bh=32, bt=4, ow=16, oh=16)
temporaldegrain(source,predenoised, other settings)
I strongly recommend that you deinterlace before denoising (unless you want to output as interlaced). I'll post a way to use td with interlaced material if you absolutely need it.
RCL0000ZK
15th January 2010, 09:15
Some info about the video obtained:
Satellite broadcast -> DTH receiver -> interlaced video -> coaxial cable (30-40feet) -> interlaced capture on TV tuner card on PC.
The noise is induced due to long coaxial cable from the DTH receiver to the TVTunerCard.
Using the above data, is this algorithm correct:
MPEG2Source
Deinterlace
Denoise
Sharpening
Color correction/enhancement
Logo Removal
Final video
This filter chain was only meant as a reference clip for temporaldegrain, so the full script should be something like this.
source=MPEG2Source("Station 21-2008-06-29_17-29-29h.d2v", cpu=6, iPP=true).deinterlacing (like tgmc)
source.FFT3DFilter(sigma=16, plane=3, bw=32, bh=32, bt=4, ow=16, oh=16)
predenoised=FFT3DFilter(sigma2=16, sigma3=6, sigma4=12, plane=0, bw=32, bh=32, bt=4, ow=16, oh=16)
temporaldegrain(source,predenoised, other settings)
I strongly recommend that you deinterlace before denoising (unless you want to output as interlaced). I'll post a way to use td with interlaced material if you absolutely need it.
Yes, the final clip that I want is DEINTERLACED (PROGRESSIVE)
I downloaded all the latest version of TGMCmod (thetoof mod); I didnt unnderstand what TempGaussMC_beta1mod.avsi can use the multithreaded branch of MVtools, by declaring parameter MT=true, or MVTools2 with MT=false (default)
meant. Does it mean that we should set MT=false when using MVtools2 to ENABLE multithreading?
I also downloaded filters/plugins required for temporal degrain.
Here is the scripts:
2.16fps using VDub on
source=MPEG2Source("Station 21-2008-06-29_17-29-29h.d2v", cpu=6, iPP=true).TGMCmod()
source.FFT3DFilter(sigma=16, plane=3, bw=32, bh=32, bt=4, ow=16, oh=16)
1.4fps using VDub on
source=MPEG2Source("Station 21-2008-06-29_17-29-29h.d2v", cpu=6, iPP=true).TGMCmod()
source.FFT3DFilter(sigma=16, plane=3, bw=32, bh=32, bt=4, ow=16, oh=16)
predenoised=FFT3DFilter(sigma2=16, sigma3=6, sigma4=12, plane=0, bw=32, bh=32, bt=4, ow=16, oh=16)
temporaldegrain(source,predenoised,GPU=true)
I usually use AvsP for previewing.
Any tips on improving speed?
FYI: I have Core i7 920 and Zotac GeForce 9800GT amp! edition.
I tried FFT3GPU but it gives errors and rainbow artifacts using AvsP. And also, i think its a little outdated. Even so, do you suggest that I should use that instead?
PLEASE give me some tips on tweaking those filters.
What should I do next?
Blue_MiSfit
15th January 2010, 20:45
You can MT fft3dfilter for a big speed boost on your i7.
Are such high settings really necessary??
thetoof
15th January 2010, 21:32
Using the above data, is this algorithm correct:
Looks fine.
I downloaded all the latest version of TGMCmod (thetoof mod); I didnt unnderstand what TempGaussMC_beta1mod.avsi can use the multithreaded branch of MVtools, by declaring parameter MT=true, or MVTools2 with MT=false (default)
meant. Does it mean that we should set MT=false when using MVtools2 to ENABLE multithreading? The latest TGMCmod is included in AnimeIVTC's requirements package and does not have the mt parameter anymore. There are other unofficial versions of tgmc you can also use for mvt2 compatibility. To safely multithread all those complex scripts without busting the max memory limit per process, I'd recommend splitting (with trim) your clip to process each section independently (you can see "Example scripts" in AnimeIVTC's docs if you don't know how to do it, then ask questions if you don't understand).
I tried FFT3GPU but it gives errors and rainbow artifacts using AvsP. And also, i think its a little outdated. Even so, do you suggest that I should use that instead?I tried using it a few times, but it wasn't as good as fft3dfilter. Maybe it was my settings at the time, but I haven't tried it again and can't help you with it.
Any tips on improving speed?Use a lower bt (min=2) for fft3dfilter or switch to cheaper denoising. Mo-comp takes time, that's just the way it is. I'm filtering something right now and deinterlacing + deblending alone runs at 1.46fps, further denoising may be slower.
What should I do next?Whatever you want :p Following your filter chain, you should have a look at lsfmod, histogram, coloryuv, smoothlevels, maybe hdragc (if you end up using it, you'll need additional denoising), tweak.... and a few other filters if you have more things to correct. You'll have to do a lot of reading and tweaking.
EDIT: If you were asking about AVIsynth filters - go away and learn from http://avisynth.org/mediawiki/Main_Page or just Google the things you don't understand - I'm not going to spoon feed you! ;)
You can MT fft3dfilter for a big speed boost on your i7.It never worked for me; even if it was the only filter I used, it only used 25% (Q6600). How did you manage to multithread it without mt/setmtmode?
Are such high settings really necessary??For noisy TVcaps... sometimes yes
RCL0000ZK
16th January 2010, 15:05
This filter chain was only meant as a reference clip for temporaldegrain, so the full script should be something like this.
source=MPEG2Source("Station 21-2008-06-29_17-29-29h.d2v", cpu=6, iPP=true).deinterlacing (like tgmc)
source.FFT3DFilter(sigma=16, plane=3, bw=32, bh=32, bt=4, ow=16, oh=16)
predenoised=FFT3DFilter(sigma2=16, sigma3=6, sigma4=12, plane=0, bw=32, bh=32, bt=4, ow=16, oh=16)
temporaldegrain(source,predenoised, other settings)
Taking the above script, what is the correct way to do it?
The predenoised clip should be over denoised and the temporal degrain will 'average' it to remove noise <or>
The predenoised should be moderately denoised so that temporal degrain will enhance the denoising
I'm asking this because the temporal degrain did not have a detailed documentation (http://avisynth.org/mediawiki/Temporal_Degrain)
The latest TGMCmod is included in AnimeIVTC's requirements package and does not have the mt parameter anymore. There are other unofficial versions of tgmc you can also use for mvt2 compatibility. To safely multithread all those complex scripts without busting the max memory limit per process, I'd recommend splitting (with trim) your clip to process each section independently (you can see "Example scripts" in AnimeIVTC's docs if you don't know how to do it, then ask questions if you don't understand).
So how does multithread work anyway.
From the example in your documentation:
xxxsource("file.ext")
threads = 3
s=AnimeIVTC([settings])
a=s.trim(0,int(framecount(s)/threads))
b=s.trim(int(framecount(s)/threads)+1,int(framecount(s)/threads-1))
c=s.trim(int(framecount(s)/threads-1)+1,0)
a #load this script in vdub and save as rendering1, then change a to b and save as rendering2, ideally on a different HDD... etc etc
#then, for further processing or encoding, load your different files and splice them, such as:
#a=avisource(rendering1 file with path)
#b=avisource(rendering2 file with path)
a+b+.....
Say,
I have 25000 frames in the video.
I want to set 3 threads (Although I have 8 logical cores, you say HDD becomes bottleneck)
using your formula....
a=trim(0,8333)-------> 33.332%
b=trim(8334,12500) --> 16.664%
c=trim(12501,0)------> 49.996%
Now it would have been useful if the encoder were multithreaded such that it would split the video, along the time line(into smaller video segments) and each segment were passed to each thread of the encoder and at the end, the encoder would concatenate the encoded video segments into the final video output.
However, the following posts:
http://forum.doom9.org/showthread.php?p=1252258#post1252258
and
http://forum.doom9.org/showthread.php?p=790119#post790119
Is there a maximum: I think a value that's waaay to high will cause a crash and that's my fault. In theory, the maximum # of threads that can be used is equal to picture height divided by 16, rounded up.
.....suggests that both x264 and XviD splits each single frame into the number of threads. If this is correct, then your method would not speed up right? :confused:
Now I need to emphasize that, I DO NOT MEAN TO OFFEND you in any way but these kind of concepts just takes away me sleep. :p
Whatever you want Following your filter chain, you should have a look at lsfmod, histogram, coloryuv, smoothlevels, maybe hdragc (if you end up using it, you'll need additional denoising), tweak.... and a few other filters if you have more things to correct. You'll have to do a lot of reading and tweaking.
You suggest to use LimitedSharpenFaster MOD for sharpening my clip. Should this be done before color modifications or after?
Here hdragc is very interesting. From what I can see from the samples in its documentation (http://strony.aster.pl/paviko/hdragc.htm), I can see a lot of rainbow-artifacts( is this term correct ? ) in the resulting video. Which filter do you suggest to correct them.
thetoof
16th January 2010, 21:35
Taking the above script, what is the correct way to do it?
The predenoised clip should be as calm as possible (potentially overdenoised) for an optimal vectors calculation, which are later applied on the source. The goal is to calculate them without any noise interference that could lead to errors.
My bad for the botched example...
s=last
a=s.trim(0,int(framecount(s)*.33))
b=s.trim(int(framecount(s)*.33)+1,int(framecount(s)*.66))
c=s.trim(int(framecount(s)*.66)+1,0)
a #load this script in vdub and save as rendering1, then change a to b and save as rendering2, ideally on a different HDD... etc etc
If this is correct, then your method would not speed up right? :confused:The goal of splitting your clip like this is to do a rendering pass (i.e. save the filtered clip with a lossless codec like Lagarith or HuffYUV to use it for the actual encode. This is done sometimes because the filtering prior to the encode is so slow that your avs script becomes a bottleneck for the whole processing. Also, when doing a 2-pass encode, it avoids computing twice the same filtering. So, splitting to multithread is not meant at all to be used during the encoding process, only filtering.
You suggest to use LimitedSharpenFaster MOD for sharpening my clip. Should this be done before color modifications or after?I don't know what is "better" theoretically.
I can see a lot of rainbow-artifacts( is this term correct ? ) in the resulting video. Which filter do you suggest to correct them.It is actually noise (specifically chroma noise), as said somewhere in the docs. This is why I said you'd need additional denoising. You could apply it before the original denoising... but if you have a very noisy clip, it might be harder to remove it all without damaging your clip. Try, test, tweak and learn ;)
RCL0000ZK
19th January 2010, 09:00
My bad for the botched example...
s=last
a=s.trim(0,int(framecount(s)*.33))
b=s.trim(int(framecount(s)*.33)+1,int(framecount(s)*.66))
c=s.trim(int(framecount(s)*.66)+1,0)
a #load this script in vdub and save as rendering1, then change a to b and save as rendering2, ideally on a different HDD... etc etc
The goal of splitting your clip like this is to do a rendering pass (i.e. save the filtered clip with a lossless codec like Lagarith or HuffYUV to use it for the actual encode.
That cleared a lot of doubts. I got confused because you haven't mentioned 'encode'. So I thought that "save as rendering1" meant saving the script, not the video :o
It would be clear if you mention the (parallel) encode using Lagarith part in your example, at least for ppl like me heh.
Here is the script that I got:
source=MPEG2Source("Station 21-2008-06-29_17-29-29h.d2v", cpu=6, iPP=true).Trim(16176,17958).TGMCmod()
source.FFT3DFilter(sigma=16, plane=3, bw=32, bh=32, bt=4, ow=16, oh=16)
predenoised=FFT3DFilter(sigma2=28, sigma3=12, sigma4=12, plane=0, bw=32, bh=32, bt=4, ow=16, oh=16)
temporaldegrain(source,predenoised,GPU=true)
#~ MPEG2Source("Station 21-2008-06-29_17-29-29h.d2v", cpu=6, iPP=true)
#~ FFT3DFilter(sigma=16, plane=3, bw=32, bh=32, bt=5, ow=16, oh=16,interlaced=true)
#~ FFT3DFilter(sigma2=16, sigma3=6, sigma4=30, plane=0, bw=32, bh=32, bt=5, ow=16, oh=16,interlaced=true)
#~ Trim(80,-1) ++ Trim(18000,-1) ++ Trim(24350,-1)
#~ a=last
#~ Histogram(mode="luma")
#~ Interleave(a,last)
Here (http://cid-3deabc5c7f57077b.skydrive.live.com/browse.aspx/.Public/Video%20Edit/Trial1) is the output video sample(s).
The encode speed was around 1.41fps on Core i7 920, DivX, VDub.
Even though I saw a good improvement in the video, there are still some noise left. Am I doing anything wrong here?
After TMGCmod(), the framerate doubled.
Thank you
thetoof
20th January 2010, 05:09
It would be clear if you mention the (parallel) encode using Lagarith part in your example, at least for ppl like me heh.Point taken
Even though I saw a good improvement in the video, there are still some noise left. Am I doing anything wrong here?In TD, increase degrain to 2 or 3, use higher sad1 or sad2 (try 300, 325, 350, etc etc) sad1 is the first denoising that'll be limited to your predenoised clip and sad2 is the additionnal denoising.
After TMGCmod(), the framerate doubled.
This is what bobbing does (deinterlaces by doubling the framerate and interpolating the missing information to retain maximal temporal information). If you see duplicates and/or blends, check the number of frames per second with actual motion in a high motion scene and then use srestore to get back to the good framerate without any blends or dupes.
Oh, and about speed, keep in mind that I never take it into account when building scripts. FYI, I don't care waiting for a week for my computer to finish encoding something. You can look into faster (and usually worse) methods if you want.
RCL0000ZK
26th January 2010, 18:53
Oh, and about speed, keep in mind that I never take it into account when building scripts. FYI, I don't care waiting for a week for my computer to finish encoding something. You can look into faster (and usually worse) methods if you want.
Yes, same here. Even I want the best quality possible and thats exactly why I do not mind sticking with long-processing-time filters.
Keeping that in mind, what do you say about hardware based deinterlacing like "Nvidia PureVideo deinterlacer"? I have heard that hardware based gives better quality than software one, but I do not have real-world experience. What do you say?
If hardware-based is better, then, will the quality also vary by the different graphic card? Mine is GeForce 9800GT which is a bit outdated. Do you think that its worth it?
P.S. The reply is late because I was busy migrating to Windows 7 Ultimate x64. Now I have to hunt for all the 64bit variants of the filters that I use.
osgZach
26th January 2010, 19:13
There aren't really any 32 or 64 bit variants of Avisynth filters if thats what you mean. The filters use Avisynth, which is either in 32 or 64 bit mode. Although that might be different for DLL's I guess, but I don't think I've seen it mentioned.
As for codecs, most of us just stick with 32 bit. less headaches, and not too big of a performance loss after all. When dealing with these slow scripts, its not going to matter anyway.
As for PureVideo, I'm not too qualified to speak on it. But it has been said to have great quality (I think compared to other hardware based solutions), but overall its not whether something is hardware or software that makes it better, at least that's how I feel. It is how it is implemented. Now using Purevideo (via DGNVDecode, etc) will likely gain you some speed, since its offloading the deinterlacing to the GPU at not the CPU. But how much speed overall depends on where the most CPU time is spent in your script as a whole.
thetoof
27th January 2010, 05:26
I have not compared both methods, but from what I've read, PureVideo has a great quality/speed ratio, maybe better than tgmc. Though, I doubt the final result will look as good as the most advanced avs filters this community has built.
RCL0000ZK
3rd February 2010, 16:52
Hmm.......
The scripts I have used:
nVidia Pure Video Deinterlacer
Source=DGMultiSource("Station 21-2008-06-29_17-29-29h.dgi", deinterlace=2).Trim(32352,35916)
Source.FFT3DFilter(sigma=16, plane=3, bw=32, bh=32, bt=5, ow=16, oh=16, nCPU=8)
PreDenoised=FFT3DFilter(sigma2=28, sigma3=12, sigma4=12, plane=0, bw=32, bh=32, bt=5, ow=16, oh=16, nCPU=8)
TemporalDegrain(Source,Predenoised)
TGMCmod()
Source=MPEG2Source("Station 21-2008-06-29_17-29-29h.d2v", cpu=6, iPP=true).TGMCmod().Trim(32352,35916)
Source.FFT3DFilter(sigma=16, plane=3, bw=32, bh=32, bt=5, ow=16, oh=16, nCPU=8)
PreDenoised=FFT3DFilter(sigma2=28, sigma3=12, sigma4=12, plane=0, bw=32, bh=32, bt=5, ow=16, oh=16, nCPU=8)
TemporalDegrain(Source,Predenoised)
Samples:
Screeny1TGMCmod() (http://i46.tinypic.com/fyzo4.jpg)
Screeny1nVidia (http://i46.tinypic.com/mmbyts.jpg)
Screeny2TGMCmod() (http://i45.tinypic.com/xyuxg.jpg)
Screeny2nVidia (http://i46.tinypic.com/w0rj45.jpg)
Screeny3TGMCmod() (http://i48.tinypic.com/r89i7q.jpg)
Screeny3nVidia (http://i50.tinypic.com/auawhy.jpg)
What do you guys think?
thetoof
3rd February 2010, 17:07
Details are better preserved with tgmc; what about speed?
poisondeathray
3rd February 2010, 18:25
Definitely less aliasing with TGMC , so details like lettering is sharper; but I bet the purevideo route is way faster
Still a bit of rainbows and chroma noise , maybe add some derainbow filters? like chubbyrain2 or something ?
um3k
4th February 2010, 00:17
It looks to me like you should use less noise reduction on the TempGaussMC footage, which makes sense, knowing that TGMC itself has noise-reducing properties. As it is you're killing some detail that is preserved in the Purevideo footage (the ribbed area above and below the lens).
RCL0000ZK
4th February 2010, 17:12
Details are better preserved with tgmc; what about speed?
but I bet the purevideo route is way faster
About the speed..........
I did an encode of the above two scripts especially to determine the speeds:
Environment:
Processor: Core i7 920 HT enabled
Graphic card: Zotac GeForce 9800GT amp! Edition
OS: Windows 7 Ultimate x64 (64K NTFS)
Codec: Lagarith - Options: 1,3,4 checked. (Multithreading enabled)
Encoding Software: VirtualDub v1.9.8 with Multithreading enabled
Video properties:
Frames: 3563
FPS: 50(Deinterlaced-bobbed)
Duration: 1min. 11sec.
Output Size:
TGMCmod() - 928MB
nVidia PureVideo - 950MB
Ending Duration:
TGMCmod():
43min - 1.38FPS
nVidia PureVideo:
21min - 2.83FPS
I did also observed that the CPU usage was ~15%. It also seemed to use only 4 (out of 8) logical cores.
Definitely less aliasing with TGMC , so details like lettering is sharper
It looks to me like you should use less noise reduction on the TempGaussMC footage, which makes sense, knowing that TGMC itself has noise-reducing properties. As it is you're killing some detail that is preserved in the Purevideo footage (the ribbed area above and below the lens).
By looking at only the lettering, we can easily say TGMCmod() is better. But, I hadn't observed the ribbed area. I should pay more attention :o.
As you can see in the scripts, I have used not changed/overridden the default denoising parameters of TemporalDegrain. However, there are still some noise present in the video which is also evident in the screenshots.
But like um3k said it is also killing details. So can anybody point me in the right direction. :confused:
Also, is there a good tutorial about using FFT3D Filter. In particular, I want to learn more about the noise pattern method which uses pshow and pfactor option. It's not given clearly in the documentation.
P.S. How do I increase the width of the "Reply to Post - Advanced" window so that I could type easily?
RCL0000ZK
6th February 2010, 16:34
*bump*
thetoof
6th February 2010, 19:00
About deinterlacing, this is as far as my help can go; the tweakage of the different parameters is up to your taste (test, test and test!)
For denoising, maybe it's simply that you don't need TD, a simple mdegrainx (tweak sad) with a prefiltered clip is more than enough in most cases... sometimes it needs another call of fft3dfilter for chroma noise, but it usually works like wonders.
RCL0000ZK
10th February 2010, 16:39
For denoising, maybe it's simply that you don't need TD, a simple mdegrainx (tweak sad) with a prefiltered clip is more than enough in most cases... sometimes it needs another call of fft3dfilter for chroma noise, but it usually works like wonders.
I couldn't find MDegrainX anywhere. Could you please provide me a link?
Is there an "Official" guide for tweaking FFT3Dfilter. My guess is that I'm doing something wrong in tweaking it and so Temporal Degrain isn't working properly. Most posts that I see only modify the sigma value. Not sigma2 or sigma3. So I don't know which sigma does what.
I did a DeInterlace only encode of both TGMCmod() and nVidia Pure Video. In comparison, TGMCmod() is removing a LOT of noise. Is it possible to reduce the denoising aspect of TGMCmod() WITHOUT compromising on the deinterlacing quality so that I can leave the denoising completely to a dedicated denoiser?
Didée
10th February 2010, 17:21
I couldn't find MDegrainX anywhere. Could you please provide me a link?
There is no spoon, erh, link. MVTools offers the Degraining Filters "MDegrain1", "MDegrain2" and "MDegrain3". Now, if the talk is about "MDegrainX", guess what the "X" is for ... ?
Is there an "Official" guide for tweaking FFT3Dfilter [...] I don't know which sigma does what.
sigma=high frequencies (sharp features), sigma4=low frequencies (blurry features), sigma2/sigma3 are inbetween. If sigma2/3/4 are not specified, the value of sigma is also taken for sigma2/3/4. Refer to FFT3DFilter's documentation. If that's too technical, just play with the values and see what happens.
The point is to raise sigma/s just as much as needed to remove the noise.
Is it possible to reduce the denoising aspect of TGMCmod() WITHOUT compromising on the deinterlacing quality
Perhaps not to 100%, but if 99% are sufficient: yes, it's possible. (http://forum.doom9.org/showthread.php?p=1324744#post1324744)
thetoof
10th February 2010, 17:43
I'll only add that:
FYI, when I have to bob a noisy clip, I use fft3dfilter on plane=3 (chroma only) and interlaced=true before deinterlacing to kill chroma noise and usually TGMC(mod) is enough to stabilize luma noise (higher tr2= (up to 3) removes more noise).
Didée
10th February 2010, 17:56
Makes sense. :)
Technical aspect: As far as the "denoising" aspect of TGMC is concerned, it's actually the temporal gaussian which makes the denoising less efficient. Though the temporal gaussian is a must for TGMC's method of bob-deinterlacing, the effect on noise is that the 1st (gaussian) stage will not only flatten the noise, but also cause sort of "temporal broadening". And because of this, even the 2nd (non-gaussian) stage won't be able to fully remove the remaining waves.
Possibe solution: pre-NR with FFT3D, do the 1st stage on that, then re-add the FFT3D difference internally, then do the 2nd stage.
Lots of possible additions to TGMC are pending ...
RCL0000ZK
12th February 2010, 18:02
Perhaps not to 100%, but if 99% are sufficient: yes, it's possible. (http://forum.doom9.org/showthread.php?p=1324744#post1324744)
I downloaded your sample clip. I did notice the marked things. Are those just grainy noise or add interlace artefacts? (Save the pic and zoom into them if necessary) :)
http://i46.tinypic.com/2jds2uh.jpg
I'll only add that:
FYI, when I have to bob a noisy clip, I use fft3dfilter on plane=3 (chroma only) and interlaced=true before deinterlacing to kill chroma noise
Taking that into consideration, is this 'correct'?
MPEG2Source("Station 21-2008-06-29_17-29-29h.d2v", cpu=6, iPP=true)
FFT3DFilter(sigma=32, plane=3, bw=48, bh=48, bt=5, ow=24, oh=24, nCPU=8, interlaced=true)
TGMCmod()
Source=Last
PreDenoised=FFT3DFilter(sigma2=28, sigma3=12, sigma4=12, plane=0, bw=32, bh=32, bt=5, ow=16, oh=16, nCPU=8)
TemporalDegrain(Source,Predenoised)
Makes sense. :)
Technical aspect: As far as the "denoising" aspect of TGMC is concerned, it's actually the temporal gaussian which makes the denoising less efficient. Though the temporal gaussian is a must for TGMC's method of bob-deinterlacing, the effect on noise is that the 1st (gaussian) stage will not only flatten the noise, but also cause sort of "temporal broadening". And because of this, even the 2nd (non-gaussian) stage won't be able to fully remove the remaining waves.
Possibe solution: pre-NR with FFT3D, do the 1st stage on that, then re-add the FFT3D difference internally, then do the 2nd stage.
Lots of possible additions to TGMC are pending ...
Is that entirely implementation related or can I do anything in my script to address that?
Thankyou guys. :thanks:
Didée
12th February 2010, 19:01
... the marked things. Are those just grainy noise or add interlace artefacts? (Save the pic and zoom into them if necessary)
(Still) running a Matrox, I have pointsampled 200/400% fullscreen-zoom available per Hotkey. :p
First of all, those artifacts are really much worse in your screencap, because of the JPG compression. In the sample clip, they're not half as bad. So you make things appear much worse than they actually are.
Well ... reasons:
a) Of the two possibilties {adding FFT3Ddiff.bob(), vs. FFT3Ddiff.doubleweave()} I used the latter, because it visually appears more sharp. Some slight combing indeed may creep in with the doubleweave method. It won't with the bob() method, but the result will be a little more dull.
b) That sample was done quickly, without much tweaking. I simply had used a relatively high sigma to be sure to keep all the noise. Quite possible the settings were a bit too aggressive - probably it would've been better to use lower sigma (but similar sigma2/3/4).
It's perfectly possible to set up a quick+simple mo-comp for the FFT3D (or other) pre-denoising, or to use the (TGMC-internally) calculated vectors to make a mo-comp for the noise difference before adding it back. The latter is one of the (plenty) things that have been suggested in the past.
Technical aspect: ...
Is that entirely implementation related or can I do anything in my script to address that?
That would have to be done internally in TGMC, i.e. the function must be extended. You can't achieve that from the script-level with the current TGMC.
My "problem" with additions-to-TGMC is still the same. The tenor right now is "Yes it's good, but it's way too slow."
And the motivation is very low to make it 2-times or 3-times slower even, just because some people notice some pixels here or some pixels there. It could be done, but almost nobody would ever use the additional features. The most likely effect would be that more people refrain from using TGMC, because those additions would make TGMC have like 50 different parameters, instead of like 15 as of now. When people see an overly-huge list of parameters, they either give up without even trying, or they just use DefaultFunction(no-parameters).
It's never a problem to go insane, more insane, and even more insane. The madhouses are open 24/7.
Trying to stay sane-minded, I simply can't come to a clear decision what is worth to add to TGMC and what not. Hence, the current decision is to do nothing at all. Simple as that.
thetoof
12th February 2010, 22:37
Taking that into consideration, is this 'correct'?sigma=32 is insanely high; be careful not to waste good chroma information. Also, temporaldegrain will denoise both chroma and luma... Watch out for chroma overdenoising. A compromise would be to reduce chroma pre-denoising if td handles the rest...
RCL0000ZK
13th February 2010, 17:31
First of all, those artifacts are really much worse in your screencap, because of the JPG compression. In the sample clip, they're not half as bad. So you make things appear much worse than they actually are.
I uploaded the image as TIFF, somehow, TinyPic had converted it to jpg. Anyway, I just replaced the image with a png.
sigma=32 is insanely high; be careful not to waste good chroma information. Also, temporaldegrain will denoise both chroma and luma... Watch out for chroma overdenoising. A compromise would be to reduce chroma pre-denoising if td handles the rest...
Would it be wise to use Tweak(Cont=1.5) to tweak the chroma plane on FFT3DFilter?
I also used Histogram(Mode="luma") to tweak the luma plane.
thetoof
13th February 2010, 18:45
I don't use either approach for denoising... however, tweak is useful when tweaking a chroma denoiser's settings in this situation:
s=source
chr=s.fft3dfilter(plane=3, interlaced=true, other settings)
interleave(s.separatefields(),chr.separatefields())
tweak(sat=2)
Do NOT leave it there for normal processing. It is only meant to ajust the settings.
cobo
9th March 2010, 20:22
I strongly recommend that you deinterlace before denoising (unless you want to output as interlaced). I'll post a way to use td with interlaced material if you absolutely need it.
Could you post that please thetoof. I'd like to know how to use TD with interlaced source for output as interlaced.
MadRat
13th March 2010, 04:12
Well there are people who are far more expert than I, but I'll take a look and give you some of my advice (which I can only hope is good) and let you know a bit later.
RCL0000ZK
27th June 2010, 16:39
Ok! I know its been a while since I started this thread. I wanted to forget this job for a while and I had almost given up processing this video. The reason is that its difficult to find the settings; at least for me.
By difficult, I mean, I'm unable to find out what that 'perfect' settings are. I set some values in FFT3DFilter and see the noise still present. I increase them only to see the details washing away. But I'm determined to finish it. I want to see what values would an expert set, what value would not be too high.
Here (http://cid-3deabc5c7f57077b.office.live.com/browse.aspx/.Public/Video%20Edit/Raw%20Video%20Samples?uc=2&lc=1033) are the samples which I made using Free Video Dub.
So please, anybody with experience in denoising, suggest some values with the script mentioned in previous posts.
:thanks:
pandy
28th June 2010, 13:38
Hmmm - maybe describe Your expectations - i made very quick try with ffdshow NR denoise 3D and with luma:9.0 chroma:9.0 time:9.0 HQ:On seems that its OK for me (at least some improvements is visible) so maybe important is what You expect from this video?
RCL0000ZK
29th June 2010, 12:54
@pandy
Thankyou for trying.
My expectations:
Deinterlace
Remove noise(as much as possible without 'toooooooo much' loss of details)
Enhance colors(if absolutely necessary)
Archvie
I was looking for the FFT3D way. But, any other good alternatives are good I suppose.
RCL0000ZK
18th July 2010, 10:19
TGMCmod() with Noise Bypass (Didée)
MPEG2Source("Station 21-2008-06-29_17-29-29h.d2v", cpu=6, iPP=true)
source = last
denoised = source.fft3dfilter(sigma=16,bt=3,interlaced=true
denoised_D = mt_makediff(source,denoised,U=3,V=3)
denoised.TGMCmod().mt_adddiff(denoised_D.doubleweave(),U=3,V=3)
Trim(150,462) ++ Trim(2940,3872) ++ Trim(4404,4802) ++ Trim(18794,20000) ++ Trim(27028,27474) ++ Trim(32352,35104) ++ Trim(35382,35916)++ Trim(38976,41752) ++ Trim(89864,91344)
Pre-Denoising script
AVISource("TGMCNoiseBypass - Raw.avi",audio=false)
FFT3DFilter(plane=3,sigma=6,bt=5)
FFT3DFilter(sigma2=28, sigma3=12, sigma4=12, plane=0, bw=16, bh=16, bt=5, ow=8, oh=8, nCPU=8)
@thetoof
Is this enough denoising for the reference clip of TemporalDegrain?
Source after TGMC Noise Bypass | Predenoised
http://i25.tinypic.com/2w2f094.jpghttp://i25.tinypic.com/308z2uh.jpg
http://i27.tinypic.com/24e49op.jpghttp://i27.tinypic.com/2uperdj.jpg
http://i28.tinypic.com/2qwmvbr.jpghttp://i28.tinypic.com/w1ecfk.jpg
http://i27.tinypic.com/s6hto6.jpghttp://i28.tinypic.com/3007jwp.jpg
http://i31.tinypic.com/2lo16p5.jpghttp://i25.tinypic.com/14ocd2o.jpg
RCL0000ZK
22nd July 2010, 17:58
*bump*
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.