# SmartCut64

SmartCut64 is a native 64-bit Windows video editor for lossless cutting and
frame-accurate smart rendering. It currently includes the Qt desktop shell,
FFmpeg-based probing/preview, deterministic frame seeking, project and journal
models, source-codec smart rendering, MKV/MP4/MOV/MPEG-TS packet-copy and
boundary rendering, and validated portable ZIP and NSIS packaging. The current
release's first-party executables and installer are Authenticode signed and
timestamped by LINEKERPANDI LIMITED. Lemon live-store approval and independent
legal approval for sale are recorded. Production-
service secret/live-lifecycle completion remains an operational launch gate;
the optional elevated Windows verifier and broader multi-player/long-file/
device-diverse GPU matrix remain documented residual test work.

The current desktop workflow also includes decoded thumbnails and audio
waveforms, frame-accurate Cut and Scene editing modes, chapter and bookmark
navigation, editable stream selection and output profiles, audio-sync
adjustment with marked-range repeat preview, persistent preview-only
brightness/contrast controls, a parameterized Ad-Detective scan and marker
review workflow with optional automatic cuts and batch project output,
a VideoReDo-style Program Options dialog with general, navigation, playback,
and completion-audio pages, optional WAV alerts, video-only editing, and
Joiner-description prompts,
plus sorted multi-file Open/drag choices that either populate the Joiner or
build a validated combined program for editing,
and a configurable preview-only plot mask for spoiler-free editing,
a configurable chapter-file generator that retimes scene markers around cuts,
adds cut-point or equally spaced chapters, and can run automatically after export,
a validated lossless Joiner with reusable project files, editable queued
selections, and source-format multi-object title cards with templates and
configurable fades, dimension-filtered QuickStream Fix, raw byte-range trimmed
file copies, expanded video/project/Ad-scan batch processing, optional AAC,
AC-3, or Opus audio output with gain/rate/channel controls, and full-resolution
frame capture. File-menu project Save/Save As, Save Video As, context plot masking,
and built-in F1 workflow and keyboard help complete the corresponding editor
commands. DVD authoring and burning are
intentionally excluded.

Save Video uses a VideoReDo-familiar profile browser with output-file selection,
favorites filtering, profile options, codec/container/output-mode columns, and a
Save split button for immediate output or the Batch queue. Built-in profiles cover
Audio Only, Elementary Streams, iPad/iPhone H.264 presets, M2TS, Matroska, MP4,
MPEG program and transport streams, Topfield REC, MOV, WTV, DVR-MS, and MXF.
Before a TS/M2TS/REC export, SmartCut64 explains incompatible selected streams
and offers either a lossless Matroska destination or tested compatible video and
audio transcodes, avoiding unidentified private-stream output.

Successful exports expose a formatted final report under Tools, including the
copy/encode and validation details, pinned dependency versions, and a streaming
SHA-256 digest of the completed output. An Output Processing Complete dialog
immediately summarizes frame count, throughput, elapsed time, file size,
bitrate, validation status, and digest; the full report can be saved as JSON.

Worker control now has a versioned local Windows named-pipe transport with
length-prefixed UTF-8 JSON framing. The first production endpoint provides
protocol/version health checks and graceful shutdown. Source navigation/index
requests use the persistent channel, restart the worker automatically, ignore
stale replies after source changes, and retain the one-shot worker as a bounded
fallback if the channel is unavailable.
Preview transport also has a local shared-memory implementation carrying the
sequence, display frame, dimensions, stride, pixel format, colour-display mode,
tone-map state, and pixels, with sequence-matched consumer acknowledgement.
The GUI preview path uses this transport directly; temporary image files remain
only as the bounded eight-frame display cache after acknowledgement.

## Build

Use a Visual Studio x64 developer environment with Ninja and CMake 3.25+:

```text
cmake --preset windows-x64-debug
cmake --build --preset windows-x64-debug
ctest --preset windows-x64-debug
```

That preset is the dependency-free MSVC core gate. To build the media-enabled
GUI after producing the pinned M1 artifacts, use an MSYS2 UCRT64 runtime:

```text
cargo install cargo-c --version "0.10.24+cargo-0.98.0" --locked --root /ucrt64
bash dependencies/scripts/build-support-m1.sh
```

The support build applies the tracked libdovi scene-refresh C-API patch and
installs both `dovi_tool.exe` and the linkable `dovi.dll`. Then configure the
application:

```text
cmake --preset windows-ucrt-gui-release
cmake --build --preset windows-ucrt-gui-release
ctest --preset windows-ucrt-gui-release
```

Run `build/windows-ucrt-gui-release/smartcut-gui.exe`, or run the complete
release/package validation with `scripts/release-gate.ps1`. It produces the
portable ZIP, per-user NSIS installer, and corresponding-source ZIP under
`build/windows-ucrt-gui-release/`.

Do not use VideoReDo files, binaries, resources, or private formats. The full
scope and milestone gates are recorded in `docs/IMPLEMENTATION_PLAN.md`.

## Licence and commercial distribution

SmartCut64 is copyright (C) 2026 SmartCut64 contributors and is free software
licensed under the GNU General Public License version 3 or, at your option, any
later version (`GPL-3.0-or-later`). It comes with absolutely no warranty. See
`LICENSE` for the complete terms and `COPYRIGHT` for the project notice.

The GPL permits selling copies and support, but every recipient must receive
the corresponding source and retain the rights to modify and redistribute the
software. Binary downloads must be accompanied by the exact matching source
release, build scripts, local patches, third-party notices, and licence texts.
See `COMMERCIAL_DISTRIBUTION.md` before publishing or selling a build.

Official SmartCut64 binaries support Lemon Squeezy purchase activation with a
locally verified, perpetual, machine-bound signed installation entitlement. A valid
entitlement enables clean video output. The purchase email and key are kept on
the computer using Windows DPAPI; the activation service stores a hash of the
key and the one-way Installation ID rather than the raw Windows MachineGuid or
raw purchase key. Without a valid entitlement, video
exports remain functional but are permanently marked `SMARTCUT64 EVALUATION`
and use a full video re-encode; copy-only delivery tools are unavailable because
they cannot safely insert the mark. Audio-only Evaluation output is unchanged.
The verification private key is not part of the application, package, or source tree.

This official-binary behaviour does not reduce GPL rights. A source recipient
may modify, rebuild, and redistribute SmartCut64, including the entitlement
code, under GPL-3.0-or-later. See `docs/PAID_ENTITLEMENTS.md` for the threat
model, production-key procedure, licence issuance, privacy properties, and
release evidence.

Open-source licences do not settle codec-patent, trademark, certification, or
consumer-law obligations. The product owner confirmed on 27 August 2026 that
independent legal sign-off for sale, including the intended commercial
distribution position, was complete; the underlying advice is retained outside
the public source repository.

First-time publisher guidance is in `docs/LEMON_UPLOAD_CHECKLIST.md`; the full
merchant/licensing runbook is in `docs/LEMON_SQUEEZY_LAUNCH.md`, and
`docs/COMMERCIAL_RELEASE_SIGNOFF.md` records approval for one immutable set of
release hashes. `scripts/prepare-store-upload.ps1` creates a verified,
non-overwriting staging folder but deliberately cannot grant legal or business
approval to enable live checkout.
