Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ VapourBox/
| `app/lib/models/native_res_report.dart` | What `--detect-native` found, as the Descale panel's Detect shows and applies it |
| `app/lib/models/crop_detect_report.dart` | What `--detect-crop` found, and which suggestion (`CropApply`) the panel applies |
| `app/lib/models/noise_halo_report.dart` | What `--detect-noise-halo` measured; stored on `QueueItem.noiseHalo`, read by `relevanceFor` |
| `app/lib/models/strength_advice.dart` | Which Noise Reduction Strength step suits the measured noise: the panel's advisory line (issue #177) |
| `app/lib/views/pass_settings/crop_detect_panel.dart` | Crop & Resize's Detect borders panel: findings, Apply crop / Crop the bars too / Repair the band instead |
| `app/lib/services/addon_service.dart` | Every optional third-party download (Whisper, AnimeJaNai): catalogue, install with requirements, remove with dependants (see "Add-ons") |
| `app/lib/services/manifest_addon.dart` | `AddonManifest` + `ManifestAddonInstaller`: the generic installer for `app/assets/addons/*.json` (docs/ADDONS.md) |
Expand Down Expand Up @@ -627,7 +628,10 @@ tried again — is in the renderer's header comment.
> preset: NoiseReductionPreset.light)` leaves every threshold at its default, so
> "light" denoises exactly as hard as "moderate". Use the
> `NoiseReductionParameters.fromPreset(...)` factory, which applies the matching
> values.
> values: SMDegrain's Light / Medium / Strong Strength steps (issue #177,
> pinned by `strength_presets_test.dart`). A built-in preset's Noise Reduction
> and Sharpen values must be a named Strength step, or simple mode shows
> "Custom" (`preset_visibility_test.dart`).

**Name presets after the source, not the technique.** The user knows they
captured a DV tape; they don't know it wants SMDegrain with a chroma-bleed fix.
Expand Down Expand Up @@ -838,6 +842,23 @@ if you're touching `FrameMap`, trim/frame-count plumbing, or crop/resize geometr
since the "obviously correct" arithmetic has been wrong in ways only an actual
encode caught.

**Strength (issue #177): Noise Reduction's and Sharpen's simple-mode control.**
Every simple-mode method of the two passes has one schema `parameterPresets`
entry labelled "Strength" (Light / Medium / Strong / Very strong, `"custom":
"Custom"`), which in simple mode replaces the controls it sets; advanced mode
shows those controls and hides it. No model or worker field stores the step:
the selector shows whichever option the values match, and "Custom" when none
does. **Medium is the schema's defaults** (the user's decision, so existing
output did not change), except QTGMC built-in, whose old default (EZDenoise 0)
did nothing. The other steps were measured in
[docs/reports/issue-177-strength-mapping](docs/reports/issue-177-strength-mapping/index.html)
and are pinned to its `data/steps.json` by `strength_presets_test.dart` (and
`test_272` reads the same file): change a step only with the probe re-run. An
advanced-only method gets none (a preset is hidden in advanced mode, where
only such a method is offered). The Noise Reduction panel's noise line
(`strength_advice.dart`) is advisory like the rest: shown for an enabled pass
whose method has a Strength, only when the worker judged the source noisy.

**Advisory UI (`pass_relevance.dart`, `pass_advice.dart`) must stay advisory.**
Neither may block a job, disable a control, or change a value — they only badge
suggestions and warn about pass *combinations* (e.g. sharpening a pass the
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ VapourBox runs [VapourSynth](https://www.vapoursynth.com/), QTGMC and FFmpeg for
## How it works

1. **Add a source.** Drop in a file, a folder, or a `VIDEO_TS` folder, or open a DVD. VapourBox reports what it found (interlaced, telecined or progressive), so you don't have to guess.
2. **Choose the output and any processing.** Pick a format, then start from a preset named after your source (VHS Cleanup, DV Camcorder Tape, Anime DVD, …) or switch filters on yourself. Filters that suit the source are marked **Suggested** — Noise Reduction and Dehalo too, when a quick measurement of the picture (run in the background as the video loads) finds it clearly noisy or ringing around its edges.
2. **Choose the output and any processing.** Pick a format, then start from a preset named after your source (VHS Cleanup, DV Camcorder Tape, Anime DVD, …) or switch filters on yourself. Filters that suit the source are marked **Suggested** — Noise Reduction and Dehalo too, when a quick measurement of the picture (run in the background as the video loads) finds it clearly noisy or ringing around its edges. For a noisy source the Noise Reduction panel also says which Strength suits the noise it measured.
3. **Check the preview, then run.** A before/after preview updates as you change settings. Queue as many files as you like and leave them to run.

## Download
Expand Down Expand Up @@ -117,7 +117,7 @@ Most sources need only a few of these, and the presets pick them for you. Filter
| 6 | **DeScratch** | Vertical scratches on scanned film |
| 7 | **SpotLess** | Dust, dirt and single-frame specks |
| 8 | **Descale** | Soft, haloed line art in anime the studio upscaled; **Detect** finds the original resolution |
| 9 | **Noise Reduction** | Grain and video noise. Motion-compensated by default, with BM3D, KNLMeans and more under advanced options |
| 9 | **Noise Reduction** | Grain and video noise. Motion-compensated by default, with one **Strength** control (Light to Very strong) and BM3D, KNLMeans and more under advanced options |
| 10 | **Chroma Denoise** | Blotchy, smeared colour, common on VHS |
| 11 | **Dehalo** | Bright outlines and ringing around edges |
| 12 | **Deblock** | Blocking from heavy compression |
Expand All @@ -130,7 +130,7 @@ Most sources need only a few of these, and the presets pick them for you. Filter
| 19 | **Rotate / Flip** | Sideways, upside-down or mirrored footage |
| 20 | **Crop & Resize** | Black borders, tape blanking and head-switching noise (measured for you by **Detect borders**), scaling and upscaling (edge-directed or AI) with SD colour converted to BT.709 (for HD, or always), and borders to reach an exact frame size |
| 21 | **Face Restoration** | Blurry, low-resolution faces, redrawn by AI at the output resolution (optional download) |
| 22 | **Sharpen** | Soft pictures, sharpened after the resize so the result isn't softened again |
| 22 | **Sharpen** | Soft pictures, sharpened after the resize so the result isn't softened again. One **Strength** control, Light to Very strong |
| 23 | **Film Grain** | Grain added back after denoising, so the picture doesn't look plastic |
| 24 | **Frame Rate** | PAL ↔ NTSC and other rate changes, or any custom rate, by motion interpolation, RIFE, or frame repetition |
| 25 | **Audio Restoration** | A dead channel, hum, rumble, clicks, clipping, hiss, sound out of sync or drifting, uneven loudness; speech enhancement with DeepFilterNet; sound that starts before the picture (broadcast captures) |
Expand Down
195 changes: 180 additions & 15 deletions app/assets/filters/core/noise_reduction.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,15 +279,15 @@
"type": "integer",
"default": 300,
"min": 0,
"max": 1000,
"max": 2000,
"step": 25,
"optional": true,
"vapoursynth": {
"name": "thSAD"
},
"ui": {
"label": "Luma Threshold",
"description": "SAD threshold for luma denoising (250-400 for VHS)",
"description": "SAD threshold for luma denoising: how different a matched block may be and still be averaged in. Higher removes more noise and risks smearing detail",
"widget": "slider",
"visibleWhen": {
"method": [
Expand All @@ -300,7 +300,7 @@
"type": "integer",
"default": 150,
"min": 0,
"max": 500,
"max": 1000,
"step": 25,
"optional": true,
"vapoursynth": {
Expand Down Expand Up @@ -355,6 +355,27 @@
}
}
},
"smDegrainThSCD1": {
"type": "integer",
"default": 400,
"min": 100,
"max": 4000,
"step": 50,
"vapoursynth": {
"name": "thSCD1"
},
"sinceAppVersion": "1.8.0",
"ui": {
"label": "Scene-change threshold",
"description": "How different a block may be before the frame counts as a cut, where nothing is averaged. Heavy noise alone is over the default 400, so raise it (800) for a very noisy source; real cuts are still found",
"widget": "slider",
"visibleWhen": {
"method": [
"smdegrain"
]
}
}
},
"mcTemporalProfile": {
"type": "enum",
"default": "medium",
Expand Down Expand Up @@ -425,17 +446,17 @@
},
"qtgmcEzDenoise": {
"type": "number",
"default": 0.0,
"default": 5.0,
"min": 0.0,
"max": 5.0,
"max": 10.0,
"step": 0.1,
"optional": true,
"vapoursynth": {
"name": "EZDenoise"
},
"ui": {
"label": "EZ Denoise",
"description": "QTGMC easy denoise strength (0 = off, 2-4 for VHS)",
"description": "QTGMC easy denoise strength (0 = off)",
"widget": "slider",
"precision": 1,
"visibleWhen": {
Expand Down Expand Up @@ -1280,6 +1301,156 @@
}
}
},
"parameterPresets": {
"mcTemporalStrength": {
"label": "Strength",
"description": "How hard to denoise. Advanced mode shows the values each step sets.",
"default": "Medium",
"custom": "Custom",
"sinceAppVersion": "1.8.0",
"visibleWhen": {
"method": [
"mc_temporal_denoise"
]
},
"options": {
"Light": {
"mcTemporalProfile": "low"
},
"Medium": {
"mcTemporalProfile": "medium"
},
"Strong": {
"mcTemporalProfile": "high"
},
"Very strong": {
"mcTemporalProfile": "very high"
}
},
"optionDescriptions": {
"Light": "For a fairly clean source with a little grain. Keeps the most fine detail.",
"Medium": "The default. For moderate noise, such as most DVD and broadcast captures.",
"Strong": "For clearly visible noise, such as most VHS captures. Softens fine texture.",
"Very strong": "For heavy noise. Removes the most, and smooths fine detail and texture with it."
}
},
"mcleanStrengthPreset": {
"label": "Strength",
"description": "How hard to denoise. Advanced mode shows the values each step sets.",
"default": "Medium",
"custom": "Custom",
"sinceAppVersion": "1.8.0",
"visibleWhen": {
"method": [
"mclean"
]
},
"options": {
"Light": {
"mcleanRn": 14,
"mcleanStrength": 5,
"mcleanThsad": 200
},
"Medium": {
"mcleanRn": 14,
"mcleanStrength": 20,
"mcleanThsad": 400
},
"Strong": {
"mcleanRn": 14,
"mcleanStrength": 20,
"mcleanThsad": 900
},
"Very strong": {
"mcleanRn": 0,
"mcleanStrength": 20,
"mcleanThsad": 900
}
},
"optionDescriptions": {
"Light": "For a fairly clean source with a little grain. Keeps the most fine detail.",
"Medium": "The default. For moderate noise, such as most DVD and broadcast captures.",
"Strong": "For clearly visible noise, such as most VHS captures. Softens fine texture.",
"Very strong": "For heavy noise. Removes the most, and smooths fine detail and texture with it."
}
},
"qtgmcStrength": {
"label": "Strength",
"description": "How hard to denoise. Advanced mode shows the values each step sets.",
"default": "Medium",
"custom": "Custom",
"sinceAppVersion": "1.8.0",
"visibleWhen": {
"method": [
"qtgmc_builtin"
]
},
"options": {
"Light": {
"qtgmcEzDenoise": 2.0
},
"Medium": {
"qtgmcEzDenoise": 5.0
},
"Strong": {
"qtgmcEzDenoise": 8.0
},
"Very strong": {
"qtgmcEzDenoise": 10.0
}
},
"optionDescriptions": {
"Light": "For a fairly clean source with a little grain. Keeps the most fine detail.",
"Medium": "The default. For moderate noise, such as most DVD and broadcast captures.",
"Strong": "For clearly visible noise, such as most VHS captures. Softens fine texture.",
"Very strong": "For heavy noise. Removes the most, and smooths fine detail and texture with it."
}
},
"smDegrainStrength": {
"label": "Strength",
"description": "How hard to denoise. Advanced mode shows the values each step sets.",
"default": "Medium",
"custom": "Custom",
"sinceAppVersion": "1.8.0",
"visibleWhen": {
"method": [
"smdegrain"
]
},
"options": {
"Light": {
"smDegrainThSAD": 200,
"smDegrainThSADC": 100,
"smDegrainThSCD1": 400,
"smDegrainTr": 2
},
"Medium": {
"smDegrainThSAD": 300,
"smDegrainThSADC": 150,
"smDegrainThSCD1": 400,
"smDegrainTr": 2
},
"Strong": {
"smDegrainThSAD": 1200,
"smDegrainThSADC": 600,
"smDegrainThSCD1": 800,
"smDegrainTr": 3
},
"Very strong": {
"smDegrainThSAD": 2000,
"smDegrainThSADC": 1000,
"smDegrainThSCD1": 800,
"smDegrainTr": 3
}
},
"optionDescriptions": {
"Light": "For a fairly clean source with a little grain. Keeps the most fine detail.",
"Medium": "The default. For moderate noise, such as most DVD and broadcast captures.",
"Strong": "For clearly visible noise, such as most VHS captures. Softens fine texture.",
"Very strong": "For heavy noise. Removes the most, and smooths fine detail and texture with it."
}
}
},
"ui": {
"sections": [
{
Expand All @@ -1289,7 +1460,8 @@
"smDegrainThSAD",
"smDegrainThSADC",
"smDegrainRefine",
"smDegrainPrefilter"
"smDegrainPrefilter",
"smDegrainThSCD1"
],
"expanded": true
},
Expand Down Expand Up @@ -1396,18 +1568,11 @@
"mcleanStrength",
"mcleanSharp",
"mcleanRn",
"mcleanThsad",
"mcleanChroma"
],
"expanded": true
},
{
"title": "mClean tuning",
"parameters": [
"mcleanThsad"
],
"expanded": false,
"advancedOnly": true
},
{
"title": "TemporalDegrain2",
"parameters": [
Expand Down
Loading
Loading