yuvdenoise(1)

NAME
yuvdenoise - Motion-Compensating-YUV4MPEG-frame-denoiser

SYNOPSIS
yuvdenoise [options] </dev/stdin >/dev/stdout

DESCRIPTION
yuvdenoise can be used to remove noise from movie images in an YUV4MPEG2 stream. This is usefull to reduce the bitrate needed to encode your captured movies for VCD and SVCD creation.

OPTIONS
yuvdenoise accepts the following options:

-v  Verbose You will get some statistical information on the input video-stream as mean-SAD so far and the average SAD of the last image. Additionaly you will have a translation of these values on a single Pixel (Noiselevel).

-r  Maximum Search Radius By adding this option you may limit the search radius. Search radius may internally be reduced by the algorithm depending on the quality of the center match. yuvdenoise -r 16 This sets the maximum search radius to 16 pixels.

-I  Deinterlace Only This turns off the denoiser completly. Only the deinterlacer (if needed) and the black-border-code remain functional. This gives a great speed-boost if you don't want to denoise but only to turn borders black and/or to deinterlace.

-B  B&W Mode This is usefull if your material is (our should be) B&W only. This flag does turn color-MC and all Chroma off. This should help the encoder to save a few bits when such material is used. Especially if your recording does come from an old videotape or a bad TV-transmission.

-?  Display Help Displays a brief description of the available options.

-b  Border Setting. If you allready know parts of the image are and remain black all over the complete sequence of images, you may use something like this: yuvdenoise -b 16,16,704,560 This will set all the pixels in the image outside that search window to absolute pure black. The area outside the search window will not go into the motion compensation algorithm and therefor you might have a speed gain in processing the movie. Sometimes it may be usefull to have relative coordinates like this: yuvdenoise -b 16,16,-16,-16 Provided there is a PAL-frame with 720x576 pixels both options will turn the same area into black.

HOW IT WORKS
Yuvdenoise works by temporal lowpass filtering. To avoid motion-blur it transforms the previous image with a motion-compensation as close as possible to the present frame. This motion-compensation is performed on 4x4 pixel blocks. The result is wightened and a block of the transformed previous frame is (depending on a matching coefficient) either taken in full, blended with the present image-block or discarded if the match is to bad. This procedure implies that the motion-compensation is very exact. If a video-encoder misses a transformed block it's not that bad, it only encodes a difference block there. If the denoiser fails to find a good matching block, the only solution is to exchange the found block with the original frame block. Therefor a great amount of time is spent to find good matches. This is the main reason why the denoiser does not run at full framerate at CIF resolution as you might have wished.

TYPICAL USAGE AND TIPS
As it is self-adapting to the noise-situation found in the stream you normaly just can go without any options set: lav2yuv my-video.avi | yuvdenoise | mpeg2enc -t 1 -o my-video.m1v However, to obtain the best possible result, you should take care of the following: 1. Grab at the maximum possible resolution (PAL 768x576 pixels). Even do this if you just want to create a 352x288 pixel movie as downscaling reduces noise, too (and at no cost to image-quality and/or sharpness in that case). 2. First denoise, then scale! There are some rare situations where the denoiser itself may introduce artefacts (blocks, etc...). The perceptibilty of these artefacts is reduced by this processing order. 3. If your movie contains black borders use the -b option to turn them into real black. This helps the encoder a lot. 4. You can greatly improve the recorded quality if you use correct cables. Only use HF-in (the antenna-cable ...) if you really can't connect your VCR/Camcorder by other means (Composite, S-Video or best SCART-RGB). 5. If your movie is B&W only, then try the -B switch. Having that sayed, I normaly use a command-line like this one: lav2yuv movie.avi | yuvdenoise -b 8,64,-8,-64 | yuvscaler -O SIZE_352x288 | mpeg2enc -f 1 -o movie.m1v Have a lot of fun! ;-)

AUTHOR
This man page was written by Stefan Fendt <stefan@lionfish.ping.de>.

FURTHER INFOS
If you have questions, remarks, problems or you just want to contact the developers, the main mailing list for the MJPEG-tools is: mjpeg-users@lists.sourceforge.net For more info, see our website at http://mjpeg.sourceforge.net/

SEE ALSO
mjpegtools(1), mpeg2enc(1) lavrec(1) lav2yuv(1)