About this project

Overview Tachikaze is a tool that cuts commercials (CM) from recording files already converted to mp4 **without re-encoding**. It is heavily inspired by Amatsukaze, and was developed with the motivations of "wanting to apply Amatsukaze-style commercial cutting to recordings that have already been converted to mp4 at a later stage" and "wanting to run the same type of processing on macOS / Linux". The core tool is mainly responsible for "Trim list → lossless mp4 cutting", with commercial detection itself delegated to existing tools (chapter_exe → join_logo_scp) in its design. Usage Shortest execution example (run in console): $ tachikaze auto IN.mp4 -o OUT.mp4 `auto` runs the `prepare` → `analyze` → gate → `cut` → `remap-subs` workflow non-interactively. If the gate judges the content as suspicious, it will exit without performing the cut; this can be overridden with the `--ignore-gate` flag. `analyze` / `auto` have logo detection enabled by default, and the logo rectangle is also automatically estimated from the input (can be disabled with `--no-logo`). If you want to intervene in the judgment process, you can also use the two-step workflow: output a Trim list with `analyze`, then perform the cut with `cut`. Processing of multiple files is assumed to be handled via shell loops, and an example is provided that fixes the output name to `*_CMcut.mp4` to avoid re-importing via glob. Dependencies In addition to the core tool, the following external tools are required to be available on the `PATH`: - chapter_exe — silence and scene change detection - join_logo_scp — commercial (CM) judgment (Trim generation) - dtvindex — index for common frame numbers - ffmpeg / ffprobe — preparation, verification, and other related tasks Build the tool with `cargo build --release --locked`, and install it with `make install` (default installation path is /usr/local, the `PREFIX` can be modified). Documentation for macOS toolchain setup steps and Docker usage is also provided (the Dockerfile is public, but pre-built image registry distribution is not offered). Known Limitations - Confirmed working environments are macOS (Apple Silicon) and Linux (arm64, Docker). Windows is not supported. - Video uses H.264 encoding; audio uses any codec recognized by mp4-atom (typical examples include Opus and AAC). - Since GOPs are rounded to keyframe boundaries, an average of 2.1 to 2.5 seconds of commercials remain around cut boundaries (this is an accepted design tradeoff). - Each process can only handle 1 input file. License and Attribution The core tool is released under the MIT license (Copyright (c) 2026 Masayuki Mizuno). The Amatsukaze core itself is not ported, and is only referenced as the source of algorithms and pipeline design inspiration. Part of the logo detection functionality (src/logo/score.rs, src/logo/interval.rs) is a port of MIT-licensed code from Amatsukaze, and the original copyright notice is retained in accordance with the original license. Code derived from delogo with unknown licensing is not ported, and is instead rewritten from the underlying formulas. The external tools called at runtime (chapter_exe / join_logo_scp / dtvindex / ffmpeg) are mostly GPL-licensed, but they are only launched as separate processes: there is no linking or shared address space, and data is passed exclusively via files and command line arguments.