Cinelerra – The Forgotten Guide | Selective Temporal Averaging

Depending on lighting, the quality of your camera, and other factors, some video footage may come out grainy. Selective Temporal Averaging can clean up the the non-moving parts of a video by smoothing out the colors across several frames. This effect should be applied after any motion stabilization. It will provide pretty amazing results for any non-moving parts of the video, however, any moving parts will not be touched. The effect has a threshold adjustment for each color channel to fine-tune what parts of a frame are motion and which parts are non-moving.

Set up Selective Temporal Averaging

Cinelerra Selective Temporal AveragingSet your In/Out points to the beginning and end of the Stabilized Clip track. Make sure that your keyframes are turned off. Add the effect Selective Temporal Averaging to the track. Go to the effect’s controls ¬†and set up the parameters. Set the Frames to average to 8 and the effect will average the non-motion areas over 8 frames. Set Use Method to Selective Temporal Averaging so that only selected areas below a threshold will be averaged. Set all Av Thres. to 1.0 which says average all non-moving areas of all 8 frames 100%. You could turn down this number so that you are only partially averaging in the other frames. Set all S.D. Thres. to 0.004 which sets the threshold for what areas will qualify as motion. Higher S.D. values classifies more areas as non-motion so that means higher S.D. Thres. values will average more areas of the frame. Restart marker system should be checked. Uncheck Reprocess frame again and uncheck Disable subtraction.

Rewind to the beginning of the track and then play it. The playback will move slowly, but it after the first 8 frames, you will see the averaging take effect. Non-moving areas of each frame will be smoothed out and the quality of the picture would be significantly improved.

Fine-Tuning the Motion Areas
To do the fine-tuning on this, you must start past the 8-frame mark (or however many frames you chose for “Frames to average.” Open the controls . For R/Y, check the Mask box all the way to the right. Now the picture in the Compositor turns red except for just a few areas. These red areas have been determined to be the non-moving areas. If you adjust the S.D. Thres. value higher, more areas will turn red, if you adjust it down, less areas will be red. You can use this to tune the effect until you think all the non-moving areas are covered, but none of the moving areas are covered. Uncheck the mask to restore the picture. Follow the same procedure for the other two color channels. Many times the values for all channels will be similar, but there are times when they will differ.

You may have better results using a higher Frames to average value.

Applying Multiple Averagings
Because the effect works so well, you may end up with the non-motion areas that are very smooth while the moving areas may be very noisy. You can smooth out these noisy areas by adding the Selective Temporal Averaging a second time, but across fewer frames and apply it in a much weaker way. You can only do this if you have the latest version of the Heroine Warrior version of Cinelerra. Adding multiple effects of the same kind using the version of Cinelerra is not supported and will not work properly. The only way to make this work in the version is to apply the effect once, render the track, then apply it again to the rendered track.

If you average 8 whole frames together (as opposed to the selective averaging you were doing above) you’ll just get a giant blurry video. However, since we can control not only how many frames are averaged, but the amount of averaging that takes place (Av. Thres), we can average different areas of the frame by different amounts. You could have one “master” Selective Temporal Averaging effect set up to average only the background-type non-moving areas over a lot of frames. You could then add a second Selective Temporal Averaging along with it (just add another effect to the track), and set the Frames to average to 2, the Av. Thres to 0.25, and the S.D. Thres to 10. The first Selective Temporal Averaging will work just like the example above and average non-moving areas. The second effect will average the entire frame, but will only apply a weak averaging and only over two frames. This will help smooth out the moving areas.

Example of Selective Temporal Averaging

Cinelerra Effects / Transitions


Leave a Reply

Your email address will not be published. Required fields are marked *