[mythtv] Filter documentation?
andrewmahone at eml.cc
Sun Jan 25 23:32:18 EST 2004
On Sunday 25 January 2004 17:32, Bruce Markey wrote:
> I guess I meant to imply that if you could
> posts some notes or raw information about the current filters
> and how to use them, I'd be willing to help flesh them out to
> go into the HOWTO (if Robert doesn't beat me to it =).
Heh, well, if you're volunteering to turn some rough info into decent docs, I
may as well take advantage ;-) I actually looked at the HOWTO docs, but I'm
not sure whether they're all generated from the SGML, or if I'm supposed to
edit each version.
Just a thought, and it'd be a bit of an ugly stopgap measure until there's
"real" filter support in the GUI, but what about listing the filter info from
FilterManager::GetAllFilterInfo in the GUI somewhere (probably in the TV
playback options, the only place in the GUI where you can edit filters right
> I look forward to seeing the explanation and trying it out
> as a newbie filter user.
Ok, here's what I've got so far.
3 ways to enter filter strings:
edit DB yourself
record only, set per-channel filter in mythweb, settings->channels
playback only, set custom playback filter in mythfrontend, setup->tv->playback
A "filter string" is a group of filters separated by commas. Each filter may
have parameters appended, and parameters are prefixed by "=".
Example filter strings:
currently available filters:
Invert ignores any parameters, and inverts the pixel values of video frames.
A simple deinterlacing filter that ignores parameters, and works by blending
adjacent lines. It replaces combing in interlaced video with a less
distracting "ghost" image.
Kerneldeint is a more complex deinterlacing filter, which applies a filter
kernel using input from several line. It generally removes combing without a
"ghost" image, sometimes leaving a faint outline of the the image from the
other field. I find it much easier to watch than linearblend or no filter at
all. It accepts up to 2 integer parameters, separated by a colon. The first
parameter is the filter threshold, and defaults to 12. Adjacent lines
differing by more than the threshold value are filtered. The second option
defaults to 0. If set to a non-zero value, it will cause the filter to skip
chroma, and filter only the luminance. It may be useful on some capture
cards which do not capture the chroma fields of interlaced video correctly.
A fast temporal denoiser. It uses 2 thresholds to apply 2 different levels of
blending with the previous frame. It takes 4 integer parameters:
1: luma threshold 1
2: luma threshold 2
3: chroma threshold 1
4: chroma threshold 2
D Banerjee may be able to clarify these parameters, I didn't write this
filter. It appears to try to select reasonable defaults for omitted
A slower denoiser that applies a spatial and temporal low-pass filter. The
spatial filter can remove some noise that quickdnr can't, but a more powerful
processor is needed. It accepts 3 float parameters:
1: luma spatial filter strength
2: chroma spatial filter strength
3: luma temporal filter strength
Reasonable defaults will be selected for omitted parameters. The chroma
temporal filter strength is calculated from the other filter strengths.
NOTE: there is a minor bug in denoise3d, which causes some high-valued
(usually bright white) pixels to wrap around to low values. Very
distracting, but fairly rare in things that I've been recording. I'm still
trying to get some good test video for this bug, I will try to have it fixed
Covers edges of video with black bars. This helps to improve video quality
when the edges of the frame are distorted. It takes 4 paremeters which
appear to be mandatory. I need clarification from D Banerjee as to which
side each parameter crops from, and what unit the crop sizes are in (src
looks like pixels to me, description says macroblocks).
Forces the filter manager to use the given format. You can use one at the
head of a filter chain to change the capture format. The two RGB formats
should not be used, because there is no conversion filter for them yet. Most
likely use would be forceyuv422p to use YUV422P capture on cards w/ broken
chroma interlacing in YV12.
Filters you can't/shouldn't use:
It exists, don't use it. The filter manager uses this filter automatically,
when it is unable to match the input/output formats of two adjacent filters.
I believe this is currently disabled in the build, as it was not functioning
properly. It should be fixed, post-processing can make MPEG-4 video quality
acceptable at much lower bitrates.
I use "kerneldeint,denoise3d" for all channels. I have analog cable that's
mildly noisy, and very noisy on higher channels. For Cartoon Network, w/ bad
noise, I use "kerneldeint,denoise3d=12". These filters plus MPEG-4 encoding
on 480x480 video and 44KHz mp3 encoding, run around 50% CPU on my Athlon XP
andrewmahone AT eml DOT cc
More information about the mythtv-dev