|-v [0..2] verbosity|
0 = none, 1 = normal (per-frame pixel-detection totals), 2=debug.
Controls the level of parallelism. Since intensity and color are
denoised separately by design, its very easy to do each in parallel on
a multiple-processor machine. The default value is 1; that reads and
writes video frames in parallel with denoising. A value of 2 causes
intensity and color to be denoised in parallel. A value of 3 does both
types of concurrency. A value of 0 turns off all concurrency.
|-r [4..] search radius|
The search radius, i.e. the maximum distance that a pixel can move and
still be found by motion-detection. The default is 16.
There are no particular restrictions on the search radius, e.g. it
doesnt have to be an even multiple of 4.
|-R [4..] color search radius|
The search radius to use for color. Default is whatever the main
search-radius was set to. Note that this value ends up getting scaled
by the relative size of intensity & color planes in your YUV4MPEG2
|-t [0..255] Error tolerance|
The largest difference between two pixels thats accepted for the two
pixels to be considered equal. The default is 3, which is good for
medium-noise material like analog cable TV. (This value will have
to be changed to whatever is appropriate for your YUV4MPEG2 stream
in order to avoid undesirable results. See the instructions below.)
|-T [0..255] Error tolerance for color|
The default is whatever the main error-tolerance was set to.
|-z [0..255] Error tolerance for zero-motion pass|
The error-tolerance used on pixels that havent moved. Usually equal
to the main error-tolerance or one less than that. Default is 2.
|-Z [0..255] Error tolerance for colors zero-motion pass|
The default is whatever the main zero-motion error-tolerance was set to.
|-m [num] Match-count throttle|
The maximum number of pixel-group matches (within the search radius)
to consider. If more are found, only the closest matches are kept.
Default is 15.
|-M [num] Match-size throttle|
The minimum size of the flood-filled region generated from a match.
Matches smaller than this are thrown away. Specified in terms of
pixel-groups. Default is 3.
The number of reference frames to keep. Pixel values are averaged over
this many frames before theyre written to standard output; this also
implies that output is delayed by this many frames. Default is 10.
Black-and-white mode. Denoise only the intensity plane, and set the
color plane to all white.
Set interlacing type. Default is taken from the YUV4MPEG2 stream.
0 means not interlaced, 1 means top-field interlaced, 2 means
bottom-field interlaced. This is useful when the signal is more
naturally of some other interlacing type than its current representation
(e.g. if the original was shot on film and then later it was transferred
to interlaced video, it will denoise better if treated as film, i.e.
Keep in mind that all of this advice was gained through experience. (Just because one writes a tool doesnt mean one understands how it should be used, for the same reason that car designers arent necessarily professional drivers.)
The error-threshold must be determined for every individual YUV4MPEG2 stream. If the threshold is set too low, itll leave noise in the video, and the denoiser will run a lot slower than it has to. If its set too high, the denoiser will start to remove detail: the video will get blurrier, you may see topographical-like bands in the relatively flat areas of the video, and small parts of the video that should be moving will be stuck in place. It may also run a little slower. Additionally, just because the video came to you from a clean source (digital cable TV, LaserDisc, etc.) doesnt mean the video itself is clean; y4mdenoise is capable of picking up on noise in the original recording as well as sampling error from the video-capture device. You will have to generate small clips of representative parts of your video, denoise them with various error thresholds, and see what looks the best. As you gain experience with the tool, you may know what error threshold generally works with various types of sources, but youll still want to double-check your assumptions.
Flat, shiny surfaces, like gloss-painted walls, or the polished wood floor of an indoor gymnasium, seem to require a lower error threshold than other types of video.
Here is the authors experience:
-t 1 : Digital cable TV, most LaserDiscs, DV camcorder video
-t 2 : VHS camcorder video, commercially-produced videotapes
-t 3 : Analog cable TV, VHS videotape (at the 2-hour speed)
-t 4 : VHS videotape (at the 6-hour speed)
Interlaced video that was made from non-interlaced video (e.g. a videotape or LaserDisc of a film) must be denoised as non-interlaced. Otherwise the result tends to be grainy.
y4mdenoise only removes temporal noise, i.e. noise that occurs over time. And it tends to do such a good job of this, that the spatial noise (i.e. noise that occurs in nearby areas of the same frame) tends to become very distinct. Therefore, always pipe the output of y4mdenoise through a spatial filter such as y4mspatialfilter or yuvmedianfilter.
When producing very low bitrate video (e.g. VCD-compatible video less than 900 kbps), denoise at the output frame size, e.g. dont denoise at DVD frame size then downscale to VCD size. That will denoise as well as condition the video for the motion-detection part of mpeg2enc. Not doing this will produce video where the less complex scenes will look really good, but high-motion scenes will blur significantly.
JPEG compression of your video frames, even 100% compression, seems to be inaccurate enough to affect MPEG encoding. Therefore, if youre using motion-JPEG files as your intermediary video format, you may want to use the denoiser in your MPEG-encoding pipeline, i.e. after lav2yuv and before mpeg2enc. If youre generating multiple resolutions of the same video, e.g. DVD and VCD, experience shows that its acceptable to run y4mdenoise before yuv2lav, but you should still use the spatial-filter (e.g. y4mspatialfilter, yuvmedianfilter) in the MPEG-encoding pipeline, to try to smooth away JPEG encoding artifacts.
The bulk of the y4mdenoise code, and this manual page, was written by Steven Boswell <firstname.lastname@example.org>.
If you have questions, remarks, problems or you just want to contact the developers, the main mailing list for the MJPEG-tools is:
For more info, see our website at
|MJPEG Tools Team||Y4MDENOISE (1)||27 Apr 2004|