trim.exe is a PyInstaller onefile executable: when you run it, Windows first extracts the embedded Python runtime to a temp folder (e.g. %TEMP%\ _MEI...), then runs. That extraction adds a few seconds before smartcut actually starts. The trimming work (smartcut) takes the same time either way.
- trim.py: Python runs immediately → starts smartcut → no extraction delay.
- trim.exe: Extract to temp → then start smartcut → same smartcut time.
So the extra time is startup only. If you need the fastest possible trim during development, use trim.py (with Python + pip install smartcut). For the installed app (no Python), trim.exe is required; the one-time startup cost is normal for onefile exes.
| Path | Purpose |
|---|---|
package.json |
App config, scripts, Electron build |
main.js |
Electron main process |
index.html |
UI |
compress.py |
Source for compress.exe (build with npm run build-compressor) |
trim.py |
Source for trim.exe (build with npm run build-trim) |
compress.spec |
PyInstaller spec for compress |
trim.spec |
PyInstaller spec for trim |
scripts/predist.js |
Pre-packaging checks + get smartcut |
scripts/get-smartcut.js |
Copies smartcut into bin/ |
scripts/copy-compress.js |
Copies built compress.exe to root |
scripts/copy-trim.js |
Copies built trim.exe to root |
bin/ffmpeg.exe |
Required — video encoding |
bin/ffprobe.exe |
Required — video info |
bin/ffplay.exe |
Required — playback |
bin/smartcut.exe |
Required for trim — from npm run get-smartcut |
requirements.txt |
Python deps note (smartcut) |
compress.ico |
App icon (optional; build works without it) |
| Path | Purpose | Safe to delete? |
|---|---|---|
node_modules/ |
npm deps | Yes — recreated by npm install |
dist/ |
PyInstaller output (compress.exe, trim.exe) + electron-builder unpacked | Yes — recreated by npm run build-compressor, build-trim, dist |
build/ |
PyInstaller build cache | Yes — recreated when building exes |
compress.exe |
Built from compress.py | Yes — recreated by npm run build-compressor; needed only for packaging |
trim.exe |
Built from trim.py | Yes — recreated by npm run build-trim; needed only for packaging |
out/ |
Default output folder for compressed/trimmed files | Yes — just app output |
package-lock.json |
Lockfile | Keep — used by npm |
- trim.py is used — it’s the source for trim.exe; keep it.
- compress.py is used — source for compress.exe; keep it.
- Anything under
node_modules/that isn’t required by the app is still needed fornpm run dist; don’t delete individual packages unless you know what you’re doing.
To run the app and run npm run dist, you need:
- All “Files to KEEP” above (including
bin/with the four exes). node_modules/(runnpm installif missing).- For packaging: after
npm run build-compressorandnpm run build-trim, the root will also havecompress.exeandtrim.exe; electron-builder bundles those.
You can delete dist/, build/, compress.exe, and trim.exe whenever you want to clean; re-run the build scripts or npm run dist to recreate them.