PDA

View Full Version : DDogg and others Temporal Smoother ? *** Recommended Read


markrb
22nd October 2001, 20:28
DDogg in another thread you stated that you like Temperal Smoother. I know where the check box is located, but what is it and what does it do? When should it be used? Is there some advanced editing that should be done to keep the video quality high?

Thanks,
Mark

DDogg
22nd October 2001, 23:00
A few edits added in []

For the exacts I have asked Dividee or Steady to answer for you the technical specifics of what a temporal filter does. Also, you might want to spend a little time in the AviSynth forum. There is good stuff there many times.

I'll speak to what it does for me. First I would suggest you come to understand how video encoding works. Generically, a basis frame is created and the following frames are stored as the data equivalent of the difference of that frame to the basis or reference frame.

This is way generic but I think you get the picture. If the second frame is identical to the first except for a finger moving then the second frame information is a composite of the first frame and just that small additional info about the finger moving, yes?

Now think what happens when noise is present (edit:which makes each frame different in a random way from every other frame) and think about the hell the encoder has trying to sort out what is what. It has to end up trying to store the noise along with the picture data because it has no idea what is a finger and what is noise. It has to take a lot of additional precious bits to store that. The noisier the more difficult to compress and a double whammy to an encoder. The source is poor to begin with, plus the noise confuses it, and it uses more bits to store garbage.

Now, enter Temporal smoother which compares sets of frames to each other and isolates much of the small radius noise from the picture. I'll leave the tech discussion to better people than me for how it does this, but let it suffice now simply to say that when each frame is compared to several in the same set, noise is removed.

This allows the encoder to "see" the difference in the frame much clearer. Since it does not have to try and encode the noise difference between the frames anymore the bits used can be much more effective. I guess it would be like looking at two pictures with foggy eyeglasses on. You are not going to be able to clearly detect the subtle differences between the frames so you just do the best you can. Wipe off your eyeglasses and wham, now you can see and note the smaller differences much better. Temporal filter sort of cleans the glasses.

I will probably get flamed for this from some, but I now always use TS [when I use a one pass mode]. That is easy for me because I use 1 pass modes a lot and the addition of TS does not add more than an hour or so. TS is my compromise between speed and quality. 1pass by itself doesn't hold up against multipass very well. Add TS and the difference between them really narrows down a lot [so long as you have at least 1850-2000 bitrate] else, use multipass.

TS really smacks you in the face on multipass as it slows you down about 40%. 40% added to three or four passes is a bitch but is something you might want to try sometime when time permits [no longer recommended unless available bitrate is < 1400-1500]. I would suggest using it highly if you have a lot of heavy fast action stuff going on and you have to let your bitrate down. As somebody else said, even 2500 ain't a lot of bitrate so the encoder is already pushing the envelope as it is [ if you bring it down in the weeds to 1400-1500 you will need to give it all the help you can]. TS does help considerably [for low bitrate encodes].

As for "Is there some advanced editing that should be done to keep the video quality high?".

Not really, You might want to play around with FitCD to make a script and substitute it for the one automatically made by dvd2svcd. There is some talk about macroblock optimization for CCE (which is reflected in the FitCD sizing), but I have yet to try it as I am happy with what I get from the stock program.

Unless you really know what you are doing I would suggest you just leave the script stock [and use 3 to 4 pass VBR [withOUT TS]. You can't go wrong with that...ever.]

Steady
22nd October 2001, 23:32
DDogg asked me to jump in here so...

Damn I think he answered it pretty well:D

I'll probably just restate what he said in a different way.
Most video encoders work mostly with delta frames (mjpeg and huffy excepted because they are all keyframes). A delta frame starts by subtracting the last frame from the current frame. You are left with only the differences between them. (Yes I am going to leave out motion compensation;) ). Most of the time the difference is small - only part of the frame is changed. The encoder can just say - oh this is unchanged - it takes very little space. When you have noise though, every pixel is changed a little at random because of the noise. The encoder will 'waste' some bits encoding the noise.

A temporal filter will look at several frames. Where the differences are small it will average them together. This will reduce the random changes. Since less bits are used encoding noise, more bits are left for encoding what counts. So the quality will improve. Not to mention the video will generally look better without compression because the noise is reduced.

JulCat
22nd October 2001, 23:43
Congratulations for that !!!!!!!!!

Every day since i found these forum i learn something, but today is a special day.

These forum Rules.

Saludos Amigos.

DDogg
23rd October 2001, 00:37
Howdy, JulCat, always good to see you on!

markrb
23rd October 2001, 00:47
Besides speed is there any downside to using it on 4 pass VBR?

If not then I think I will use it all the time. I tend to start encoding at night before bedtime. Plus during CCE I still use my computer to surf the net, but only during CCE and I am sure to end everything before it ends. I also have 512mb ram, so I still have resources free. Never had a problem.

Thanks again for the wonderful explanation,
Mark

DDogg
23rd October 2001, 00:59
Without doubt multipass VBR will always give you the best results. If you have a fast machine and the time, by all means use that just that. You can't go wrong.

markrb
23rd October 2001, 01:17
I am a little confused.

If you have a fast machine and the time, by all means use that just that.

By this do you mean I shouldn't use Termporal Smoother with multi-pass VBR or I should?

What I meant in my original question was: Is there any downside to using Temeroral Smoother with a 4 pass VBR other then speed?

Sorry just a little thick headed.

Thanks,
Mark

Mozart
23rd October 2001, 01:32
Hi markrb,

As you can see, TS is an avisinth filter used for optimization. There is no problem if you use it with CBR or one or multipass vbr. If 4 pass is good, 4 pass with TS is better - but only eagles eyes can realise it.:D

dividee
24th October 2001, 21:18
Not much to add.

Where the differences are small it will average them together

I'll just develop a bit here: the "smallness" of the the differences is controlled by the strength of the filter. Differences have to be small because you want to average the noise but not blur the moving objects. It happens if you set the strength too high (this effect is sometimes referred to as ghosting). You have to set strength very high to blur contours, but it's more easily noticeable on textures (such as skin). If it happens you have to lower the strength. In TS, the default strength is rather conservative.

DDogg
27th October 2001, 23:18
bump test

DDogg
16th February 2002, 01:12
bump again - I am trying to move some of the discussion and information type of posts to the Advanced Topic forum.

Wh00pS
16th February 2002, 08:57
I think i'm going to have a try with temporal smoother as well,i usually use 3 pass vbr and encode while i sleep.
I was just wondering if the strength and radius should be left at the default 2 & 1 setting ?

role
16th February 2002, 13:01
Clearly noise reduction will decrease the differences between two adjecent frames and hence increase the copressibillity of the movie.

The noise reducion can be done either with the Temporal/Spatial smoother in AviSynth OR with the built in routins in CCE.

Have anyone investigated the difference between using the noise reduction in CCE as an alternative to Temporal/Spatial smoother?

Personaly I always use the CCE rutines as they seem faster, never really investageted the issue too close though...

Kedirekin
16th February 2002, 13:21
IMO, the noise reduction filter in CCE produces a softening of the picture almost a severe as using BilinearResize (at least, at the default CCE setting of 6 - you can reduce the softening quite a bit by lowering the setting to 1 or 2). I believe CCE's filter is spatial rather than temporal.

If you like this softening, more power to you, but you'd probably be better off using BilinearResize (with or without the CCE noise reduction); it'll speed up your encoding.

If you specifically avoid BilinearResize because it softens too much, then I think you'll prefer TS to the CCE noise filter. TS introduces no noticable softening.

DDogg
16th February 2002, 16:15
Kedirekin, nice post. You have a great way of getting a LOT of information in a few lines.

role
17th February 2002, 13:21
I believe CCE's filter is spatial rather than temporal.

Interseting remark... I´ve tried to find some facts about this issue, however, there is not so much details in the CCE manual. Now (this is only speculations) since MPEG encoders work in the frequency (fourier transform) rather than in the spatial domain, I find it reasonable that the CCE noise reduction is based on temporal smothing on frequency components rather than temporal smoothing in the spatial domain (?).
If this is the case, then frames with a lot of noise would be filtered and hence appear blured (or distorted). However, frames with little noise (or little action) would not be affected by noise filter and thereby remain sharp.
This is not exactly the same as applying the bilinear rezise as this tends to blur everything independent of the amount of noise.

As I said this is only specualtions, perahps the TS filter actually provides a better result?

SiliconSoul
17th February 2002, 23:30
okay now that i have tried temperal smoother on a whole movie with 4 pass vbr i think it sucks! it can not figure out what is noise and what needs to be there... im getting liquid-noise-mosquito effect on peoples heads and bushes and trees... (mainly when 3-5 people are all on the screen talking). its really hard to explain what im seeing but it has never happened without TS this is the first time i have used it with 4 pass vbr.


ill test and see if this happens without but im sure i will not get this crazy effect without TS 4 pass vbr.

i can post the dvd2svcd log if needed...

DDogg
18th February 2002, 00:02
I would not use TS on 97% of multipass. Only if the bitrate was lower than 1350. I would certainly NEVER use TS with Bicubic under any circumstance. Only with SimpleResize or on a real hard case Bilinear.

chainsaw135
18th February 2002, 01:34
I think the whole ts,bilinear,bicubic, simpleresize, are all preferences that we call can agree to disagree on. What I mean is I might like one way of doing my movies you might like another, I think every way that has been mentioned in this thread could be usefull and am glad we have those choices.

I dont have "eagle" eyes but i've been known to try ts on encodes under 1900, with positive affects.
My preference is quality, more then speed since I have 2 machines, but I didn't see the quality in most cases to be something I liked only on a few encodes and in the future i'll use it on situations that are needed but thats very rare in my view.