Skip to content

Repository files navigation

CineCut — Movie Scene Editor & Censorship Tool

A lightweight Electron desktop app for trimming movie scenes, censoring audio, and filtering subtitle content.

Tech Stack

Layer Technology
Desktop shell Electron 30
UI framework React 18 + Vite
State management Zustand
Video processing FFmpeg (via fluent-ffmpeg)
Subtitle parsing Custom SRT parser
Build tooling electron-vite

Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn

Install

cd cinecut
npm install

Run (development)

npm run dev

Build (production)

npm run build
npm run dist   # Creates platform installer

Project Structure

cinecut/
├── src/
│   ├── main/                   # Electron main process (Node.js)
│   │   ├── index.js            # App entry, window creation
│   │   ├── ipcHandlers.js      # IPC bridge: renderer ↔ backend
│   │   ├── ffmpegProcessor.js  # All FFmpeg operations
│   │   └── subtitleProcessor.js # SRT parsing & filtering
│   │
│   ├── preload/
│   │   └── index.js            # Secure API bridge (contextBridge)
│   │
│   └── renderer/               # React frontend
│       ├── index.html
│       └── src/
│           ├── App.jsx
│           ├── App.css          # Global dark theme
│           ├── store/
│           │   └── editorStore.js  # Zustand global state
│           └── components/
│               ├── TitleBar.jsx
│               ├── FileLoader.jsx   # Landing / file open screen
│               ├── VideoPlayer.jsx  # HTML5 player with controls
│               ├── Timeline.jsx     # Visual cut/audio timeline
│               ├── SidePanel.jsx    # Tabbed right panel
│               ├── AudioCensor.jsx  # Mute/beep manager
│               ├── SubtitleEditor.jsx # SRT load/edit/censor
│               ├── ExportPanel.jsx  # Export config + progress
│               └── StatusBar.jsx    # Bottom status bar
│
├── electron.vite.config.js
└── package.json

Features

Scene Trimming

  1. Load a video (MP4 or MKV)
  2. Use [I and O] buttons to mark In/Out points
  3. Click ✂ Cut Range on the timeline toolbar
  4. Red blocks appear on the VIDEO track = removed segments
  5. Click any block to un-remove it

Audio Censorship

  • Use In/Out markers + 🔇 Mute or 📢 Beep buttons
  • Or manually enter timestamps in the Audio side panel
  • Mute = silence; Beep = 1kHz sine tone overlay
  • Preview: video player mutes automatically during muted segments

Subtitle Editing

  • Load a .srt file or extract embedded subtitle tracks from MKV
  • Add words to the Censor Words list
  • Choose mode: replace with ***, ****, or remove line entirely
  • Click Apply Censorship to process all entries
  • Edit individual lines by clicking ✏

Export

  • Choose MP4 or MKV output format
  • Configure subtitle output: embedded (MKV only), separate .srt, or none
  • Real-time progress bar shows FFmpeg processing
  • Show in Folder button opens the output location

Architecture Notes

IPC Communication

Renderer (React) 
    ↓ window.api.*
Preload (contextBridge)
    ↓ ipcRenderer.invoke
Main Process
    ↓ calls
ffmpegProcessor / subtitleProcessor

All sensitive Node.js operations run in the main process. The renderer only calls the window.api surface exposed by the preload script.

FFmpeg Operations

Operation Method
Probe video metadata ffprobe via fluent-ffmpeg
Extract embedded subs -map 0:s:N -c:s srt
Trim segments select filter
Mute audio range volume filter with time expression
Beep overlay aevalsrc + amix filter complex
Embed subtitles -map 1:0 -c:s srt/mov_text

State Management

All editor state lives in a single Zustand store (editorStore.js):

  • cuts[] — scene removal ranges
  • audioSegments[] — mute/beep ranges
  • subtitleEntries[] — parsed SRT with censor state
  • censorWords[] — word list for subtitle filtering

Development Phases Completed

  • Phase 1 — Core Video Handling (file loading, metadata probe, player)
  • Phase 2 — Timeline Editing (visual cut tracks, in/out markers)
  • Phase 3 — Censorship Tools (audio mute/beep, subtitle filtering)
  • Phase 4 — Export System (FFmpeg render, progress, MP4/MKV)

Future Improvements

  • Automatic profanity detection (via speech-to-text + word list)
  • Speech-to-text subtitle generation (Whisper integration)
  • Automatic scene detection (FFmpeg scene filter)
  • Batch processing for multiple files
  • GPU-accelerated rendering (-c:v h264_nvenc)
  • Waveform visualization on audio track
  • Frame-accurate seeking

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages