Skip to content

stevel4857/wordcut

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordCut Video Editor

Free to use. No cost, no account, no subscription.

Edit video by editing text. WordCut transcribes speech with Whisper, lets you click words to remove them, and exports a new MP4 with those sections cut out.

Built with Python, pywebview, FFmpeg, and faster-whisper.

Licensed under the MIT License — use, modify, and share freely.

What it does

  1. Load a local MP4/MKV/MOV/WebM file or a YouTube URL
  2. Transcribe speech with word-level timestamps
  3. Click words in the transcript to mark them for removal
  4. Export a new video: OriginalName_edited.mp4 (same folder, original untouched)

System requirements

Parameter Value
OS Windows 10/11 (64-bit)
RAM 4 GB+ recommended
Disk space ~200 MB for standalone app
WebView2 Microsoft Edge WebView2 Runtime (preinstalled on most PCs)
Internet Not required after standalone build is downloaded

Quick start (standalone app)

If you have the release zip:

  1. Unzip WordCut-Windows.zip
  2. Run WordCut.exe
  3. Choose a video → Transcribe video → edit words → Export edited MP4

Developer setup

Prerequisites

Parameter Value
Python 3.11+ (tested on 3.13)
FFmpeg Optional for dev mode (bundled automatically during build)
Git For cloning and publishing

Install dependencies

cd PyScript
python -m pip install -r requirements.txt

Run from source

python app.py

Build standalone Windows app

python -m pip install -r requirements-build.txt
python build.py

Outputs:

Output Path
App folder dist/WordCut/
Shareable zip dist/WordCut-Windows.zip

build.py automatically downloads FFmpeg and the Whisper base model into resources/ before packaging.

Usage

Local video

  1. Click Choose MP4 file
  2. Review the estimated transcription time shown under the file path
  3. Click Transcribe video
  4. Click words to remove (red = cut from export)
  5. Click Export edited MP4

YouTube

  1. Paste a URL
  2. Click Load YouTube
  3. Edit the transcript
  4. Export

Cancel

Use Cancel to stop a running task and clear the current file, URL, and transcript.

Export naming

Input Output
D:\Videos\Virtual Reality.mp4 D:\Videos\Virtual Reality_edited.mp4

The original file is never overwritten.

Configuration parameters

These are the main tunable values in the codebase.

App paths (lib/paths.py)

Parameter Default Description
APP_NAME VideoTextEditor Folder name under %LOCALAPPDATA%
APP_TITLE WordCut Video Editor Window title

User data locations (runtime)

Data Path
Logs %LOCALAPPDATA%\VideoTextEditor\debug.log
YouTube downloads %LOCALAPPDATA%\VideoTextEditor\downloads\
Whisper model (dev mode) %LOCALAPPDATA%\VideoTextEditor\whisper-models\

Whisper / transcription (lib/transcribe.py, lib/whisper_worker.py)

Parameter Default Description
model_size base faster-whisper model (tiny, base, small, medium, large-v3)
device cpu Inference device
compute_type int8 Quantization for CPU
word_timestamps True Per-word cut timing
vad_filter False, then True Retries with voice activity detection if first pass finds nothing
Audio sample rate 16000 Hz FFmpeg extraction target
Audio channels 1 (mono) FFmpeg extraction target

Transcription time estimate (lib/video_info.py)

Parameter Default Description
overhead 18 seconds Model load + audio extraction
processing duration × 0.35 CPU transcription estimate
Minimum estimate 20 seconds Floor for very short clips

Formula:

estimate_seconds = max(20, round(18 + video_duration_seconds * 0.35))

Video export / cutting (lib/video_edit.py)

Parameter Default Description
padding 0.04 seconds Extra time kept around each word
Video codec libx264 Re-encode per segment
Video preset fast FFmpeg speed/quality tradeoff
Audio codec aac Output audio codec
Export suffix _edited.mp4 Appended before extension

YouTube download (lib/youtube.py)

Parameter Value
Format bv*+ba/b (best video + audio)
Merge format mp4
Output template %(title).80B-%(id)s.%(ext)s

Build script (build.py)

Parameter Value
APP_NAME WordCut
FFMPEG_URL gyan.dev FFmpeg essentials build
Whisper model bundled base
Package tool PyInstaller (folder bundle, not one-file)

Project structure

PyScript/
  app.py                 # Main pywebview app
  build.py               # Standalone Windows build script
  requirements.txt       # Runtime dependencies
  requirements-build.txt # Build dependencies
  lib/
    paths.py             # App paths and frozen/bundled detection
    ffmpeg_util.py       # FFmpeg/FFprobe helpers
    video_info.py        # Duration, audio check, time estimate
    transcribe.py        # Audio extract + Whisper pipeline
    whisper_worker.py    # Whisper subprocess worker
    video_edit.py        # FFmpeg cut + concat export
    youtube.py           # yt-dlp download
    task_manager.py      # Cancel support
  ui/
    index.html
    app.js
    style.css

GitHub upload

This repo is designed to be published without large binaries. resources/, build/, and dist/ are gitignored and recreated by build.py.

First-time publish

cd PyScript
git init
git add .
git commit -m "Initial commit: WordCut video editor"
git branch -M main
git remote add origin https://github.com/YOUR_USERNAME/wordcut.git
git push -u origin main

Recommended GitHub settings

Setting Recommendation
Release assets Upload dist/WordCut-Windows.zip as a GitHub Release (not in git)
.gitignore Already excludes build artifacts and models
License Add a LICENSE file if you plan to share publicly

Troubleshooting

Problem Likely cause
No words after transcribe Video has no clear speech (music-only, silent, very quiet)
App window blank Install WebView2 Runtime
Transcription slow Normal on CPU; longer videos take longer
Cancel ignored briefly Whisper/ffmpeg may take a moment to stop

Check logs at:

%LOCALAPPDATA%\VideoTextEditor\debug.log

License

WordCut is free and open source under the MIT License.

You may:

  • Use it for personal or commercial projects
  • Share the app with others
  • Modify the source code
  • Build and redistribute your own version

No payment required. Attribution is appreciated but not required beyond keeping the license notice in source distributions.

About

Edit video by editing text — Whisper transcription + FFmpeg cuts (Windows desktop app)

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors