Archival boundary detection and segment slicing for VHS, analog transfers, and long-form broadcast recordings.
Quick Start · How It Works · Build · Help Documentation · Issues
Naming note: The public application name is AdSlicer. The repository retains its original
AdSlicerURL so existing links, clones, and project history continue to work.
AdSlicer turns a full-length recording into a structured, reproducible segmentation plan. It detects likely commercial boundaries, scores each candidate using multiple independent signals, and exports the program material and commercial material as separate archival assets.
It is designed for difficult analog sources—not only clean digital broadcasts. VHS noise, unstable black levels, short separators, imperfect timing, and inconsistent audio floors are treated as expected input conditions rather than edge cases.
The detection, logging, preset, batch, chapter, preview, and export pipeline is implemented.
The next major product milestone is the interactive Boundary Review workspace: a focused timeline for inspecting suspect endpoints, understanding warnings, correcting only the boundaries that need attention, and approving the final render without turning AdSlicer into a full video editor.
Import a full recording
↓
Analyze candidate boundaries
↓
Review confidence, logs, and preview output
↓
Tune or correct questionable endpoints
↓
Render approved segments
↓
Sort the resulting commercials and shows
AdSlicer is intentionally review-oriented. Automation creates the first plan; the user remains in control of the archival decision.
| Capability | What it provides |
|---|---|
| Multi-signal detection | Black-frame, audio-silence, uniform-frame, and scene-change analysis |
| Confidence scoring | Per-candidate confidence and a complete list of contributing signals |
| Dry-run analysis | Generates the plan and diagnostics without cutting media |
| Preview exports | Caps exported segments for fast quality-control passes |
| Cut mode | Produces an ad-free show master plus isolated commercial clips |
| Chapter mode | Preserves the full recording and adds navigable content/ad chapters |
| Batch processing | Processes a directory of compatible recordings using one configuration |
| Presets | Built-in profiles for default VHS, noisy VHS, and strict broadcast sources |
| Reproducible logs | JSON, CSV, EDL, ffmetadata, run manifests, and raw FFmpeg diagnostics |
| ML-ready output | A 74-column dataset.jsonl feature table with one row per segment |
| Self-contained builds | FFmpeg and FFprobe are bundled as application sidecars |
AdSlicer builds each commercial candidate from boundaries detected in the source timeline, then adds corroborating evidence and applies safety guards.
| Pass | Signal | Purpose |
|---|---|---|
| 1 | Black-frame detection | Finds near-black separators and merges fragmented analog slugs |
| 2 | Audio-silence analysis | Raises confidence when a candidate overlaps a quiet transition |
| 3 | Uniform-frame analysis | Detects black cards, color cards, and low-variation slates |
| 4 | Scene-change scoring | Identifies blocks whose edit rate is unusually high for the recording |
After detection, AdSlicer applies minimum-show guards, first/last-content protection, optional 30-second snapping, asymmetric boundary trimming, and confidence adjustments.
Cut removes planned commercial blocks and exports:
- An assembled show master
- Individual commercial clips
- Intermediate show parts
- Complete diagnostic and metadata output
Chapters preserves the source recording and embeds Content N / Advertisement N chapter markers without removing footage.
- Select a video file or switch to Batch Folder mode.
- Choose an output directory.
- Start with the preset closest to the source material.
- Enable Dry Run and analyze the recording.
- Review the activity log,
detect.json, and low-confidence entries indataset.jsonl. - Use Preview Duration for a fast render-quality check when needed.
- Adjust thresholds or guards, then run the analysis again.
- Disable Dry Run and export. Enable Re-encode for frame-accurate archival cuts.
Preset: Default or VHS Noisy
Dry Run: Enabled
Re-encode: Disabled
Preview Duration: 0
Verbosity: 2
The first objective is to validate the plan, not to render immediately.
<output>/
└── <recording>/
├── commercials/
│ ├── <recording>_ad_0001.mp4
│ └── ...
├── show/
│ ├── _parts/
│ └── <recording>_show.mp4
└── logs/
├── detect.json
├── detect.csv
├── detect.edl
├── chapters.ffmeta
├── run_manifest.json
├── dataset.jsonl
└── ffmpeg_*.log
Results are placed in a recording-specific directory. Existing results are not silently overwritten; repeated runs receive a numbered suffix.
AdSlicer ships with three starting points:
| Preset | Intended source |
|---|---|
default.json |
Balanced settings for typical VHS and television captures |
vhs_noisy.json |
More permissive thresholds for worn or unstable tape |
broadcast_strict.json |
Cleaner off-air recordings with stricter timing assumptions |
User presets are plain JSON and can be saved from the application. Unknown keys are ignored, allowing preset files to include descriptive metadata.
The complete application help system is located at docs/index.html. It includes:
- Quick-start instructions
- Detection and scoring explanations
- Complete parameter reference
- Preset documentation
- Tuning guidance
- ML dataset schema
- Output and build reference
Open it directly in a browser or publish the docs/ directory through GitHub Pages.
- Rust toolchain
- Tauri 2 platform prerequisites for the target operating system
- A supported macOS, Windows, or Linux build environment
FFmpeg and FFprobe do not need to be installed globally. The build helper downloads the sidecars used by the application.
./build.sh setup-binscd src-tauri
cargo tauri dev./build.sh # auto-detect the current OS
./build.sh mac-universal # macOS arm64 + x86_64
./build.sh mac-arm # macOS Apple Silicon
./build.sh mac-x86 # macOS Intel
./build.sh windows # Windows x86_64The build script also contains Linux sidecar setup and platform detection support.
.
├── docs/ Help website and visual assets
├── src/ HTML/CSS/JavaScript application interface
├── src-tauri/
│ ├── presets/ Built-in detection presets
│ ├── src/adslicer/ Detection, planning, logging, and export engine
│ ├── icons/ Application bundle icons
│ └── tauri.conf.json Tauri application configuration
├── build.sh Sidecar setup and release build helper
└── README.md
Every run records the parameters that produced it. This makes detection behavior auditable and allows separate runs to be compared without reconstructing the original application state.
dataset.jsonl contains timing, boundary context, silence coverage, uniform-frame coverage, scene-change statistics, signal flags, classification labels, confidence, run parameters, and run-level summary fields. It can be loaded directly into pandas:
import pandas as pd
df = pd.read_json("logs/dataset.jsonl", lines=True)
low_confidence = df[
(df["label"] == "commercial") &
(df["confidence"] < 0.90)
]The Boundary Review experience is the primary interface direction for AdSlicer. It will emphasize:
- Candidate endpoints rather than unrestricted timeline editing
- Clear suspect-state warnings for short or unusual intervals
- Visual highlighting and tooltips that explain why a boundary needs attention
- Fast manual correction of start and end points
- Explicit approval before rendering
A planned detector improvement will replace duration-first black detection with frame-first adaptive boundary analysis. The goal is to recognize one-frame black separators, rapid fades, near-black VHS transitions, and imperfect commercial boundaries while preserving the stable planner and export pipeline.
Use the issue tracker for reproducible bugs and focused feature requests. Useful reports include:
- Operating system and application build
- Source format and approximate recording duration
- Preset and modified parameters
- Relevant activity-log output
- A redacted
run_manifest.jsonordetect.json - A description of the expected and observed boundary behavior
Do not upload copyrighted source recordings unless you own them or have permission to share them.
AdSlicer is built with Tauri, Rust, and FFmpeg. Its multi-signal commercial-detection strategy is informed by established broadcast-detection techniques, including concepts used by Comskip, while maintaining its own planner, data model, interface, export workflow, and archival focus.
AdSlicer
Preserve the broadcast. Inspect the boundary. Export with intent.
