Automatically trim long frozen or inactive tails
FreezeTrimmer scans video recordings, looks for a stable no-motion period, and trims the recording at the point where that inactive tail begins. It is designed for folder-based processing rather than manual one-video-at-a-time editing.
Have you ever forgotten to stop a recording — and later found hours of empty video filling your disk?
This happens more easily than it sounds, especially with medical endoscopic recordings. The examination ends, attention moves immediately to the patient, documentation or the next procedure, and the recording is simply left running. A useful ten-minute examination can then become a file containing hours of an unchanged or inactive scene.
Do you really want to open every oversized recording and find the true ending by hand?
One forgotten recording is inconvenient. Repeated across days or months, these inactive tails consume substantial storage space and make archives unnecessarily large. FreezeTrimmer is designed to detect sustained no-motion sections and remove the unnecessary tail automatically across a batch of recordings.
Core workflow
- Select a source folder containing multiple video files
- Optionally include all subdirectories
- Supported default extensions: MP4, MOV, MKV, M4V, AVI, MPG and MPEG
- Analyze each video for sustained no-motion using OpenCV
- Apply a configurable post-hold period before accepting the frozen/stable section
- Skip videos where no suitable stable section is detected
- Keep recordings unchanged when the removable tail is shorter than the configured minimum duration
- Trim all qualifying files in one batch operation
Two output modes
Overwrite originals
Processed output is created in a temporary pipeline and then safely moved over the original file after confirmation.
Choose a target folder
Keep the originals and write trimmed files to a separate destination using the same filenames.
Preserve folder layout
When subdirectories are included, the source folder hierarchy can be mirrored under the selected target directory.
Motion detection
The main detection stage uses OpenCV background subtraction and motion-ratio analysis. The thresholds are exposed in the GUI rather than being hard-coded.
Optional homogeneity support
FreezeTrimmer can strengthen the no-motion decision by checking whether the candidate stable section is visually flat and similar across sampled frames.
- Optional homogeneity detection can be enabled or disabled
- Laplacian variance threshold evaluates local image detail
- Gray-level standard deviation helps recognize visually uniform frames
- PSNR threshold evaluates similarity between consecutive sampled frames
- These checks are combined with motion-ratio analysis rather than replacing it
Tail cleanup
After the initial trim, an optional second pass searches the new output for the last actual motion event. When enough extra inactive material remains, FreezeTrimmer can trim closer to that final movement.
- Second-pass tail cleanup can be enabled independently
- Uses PSNR between sampled grayscale frames to recognize motion
- Configurable tail-analysis sampling FPS
- Configurable motion PSNR threshold
- Adds a small configurable pad after the last detected motion
- Only applies the extra trim when the potential gain exceeds a configurable minimum
Fast or safe trimming
Batch-processing details
- Live per-file and overall progress bars
- Overall percentage and estimated remaining time (ETA)
- Processing runs in a worker thread so the GUI remains responsive
- Cancel button requests a controlled stop of the active batch
- Detailed activity log shows analysis, trim, tail cleanup, skipped files and errors
- Output keeps the original filename; no automatic suffix is appended
- Original file timestamps are copied to processed output where possible
- Overwrite mode restores the original timestamps after replacement
Default behavior in v2.9
- Minimum removable recording tail: 15 seconds
- Post-hold period: 3 minutes
- Subdirectory processing enabled
- Fast stream-copy trimming selected
- Homogeneity support enabled
- Tail cleanup enabled
ffmpeg.exe and ffprobe.exe either in the system PATH or selected manually in the GUI. The final downloadable EXE should therefore be published together with clear FFmpeg packaging/install information unless those binaries are bundled into the release.
Public distribution
The public sothis.dev page will distribute the compiled Windows application only. The Python source archive used to document the software is not copied into the website and is not linked from this page.