explaingit

rai0603/dronetrim

Analysis updated 2026-05-18

16PythonAudience · generalComplexity · 2/5LicenseSetup · easy

TLDR

A Python tool that automatically detects and trims shaky takeoff, landing, and idle hover segments from batches of drone video clips.

Mindmap

mindmap
  root((DroneTrim))
    What it does
      Detect shaky segments
      Trim static hover
      Batch process folders
      Save CSV trim report
    Tech stack
      Python
      FFmpeg
      OpenCV
      PySide6
    Use cases
      Rough-cut drone footage
      Prep clips for an editor
      Automate batch trimming
      Preview via dry run
    Audience
      Drone videographers
      Video editors
    Output modes
      Copy mode fast lossless
      Encode mode frame accurate
    Getting started
      Install FFmpeg and OpenCV
      Run GUI or CLI

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Automatically trim shaky takeoff and landing frames from a folder of drone clips.

USE CASE 2

Remove excessive static hover time from the start or end of each clip.

USE CASE 3

Preview trim decisions with a dry run before modifying any files.

USE CASE 4

Batch process an entire footage folder and get a CSV report of every trim decision.

What is it built with?

PythonFFmpegOpenCVPySide6

How does it compare?

rai0603/dronetrim920linjerry-stack/capital-studioadya84/ha-world-cup-2026
Stars161616
LanguagePythonPythonPython
Setup difficultyeasyeasyeasy
Complexity2/53/52/5
Audiencegeneralresearchergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Requires FFmpeg and OpenCV, with PySide6 as an optional dependency for the drag-and-drop GUI.

MIT license: use, modify, and distribute freely, including commercially, as long as you keep the copyright notice.

In plain English

DroneTrim is a Python tool for cleaning up drone video clips before you bring them into a video editor. Drone footage almost always starts with shaky takeoff frames and ends with shaky landing frames, plus sometimes the drone just hovers in place longer than you need. Trimming those parts out of every clip by hand is tedious when you have a full folder of footage. This tool does it automatically in batch. The detection works by analyzing motion between frames. It uses a technique called optical flow to measure how much the whole image is shifting or shaking from one frame to the next. A smooth, intentional camera move is treated as usable footage. High-frequency jitter, which happens during takeoff and landing, is flagged for removal. Prolonged stillness at the start or end of a clip is also trimmed away, though intentional locked-down shots are protected from being cut. You can run it two ways. There is a drag-and-drop graphical interface where you drop a folder of video files onto the window, pick an output folder, and click start. Each clip shows its trimming result as it finishes. There is also a command-line version suited for scheduled or automated workflows, with a dry-run option that shows you the analysis report without actually modifying anything. For output, you choose between two modes. Copy mode is lossless and very fast, finishing a 4K clip in a few seconds, though the cut point may be off by up to a second due to how video keyframes work. Encode mode cuts to the exact frame using hardware acceleration on macOS. Both modes save the trimmed version as a new file with a suffix added to the name, leaving the originals untouched. A CSV report of all trim decisions is also saved alongside the output files. The tool runs on macOS and Linux. It requires FFmpeg and OpenCV, and optionally PySide6 for the graphical interface. The project is released under the MIT license.

Copy-paste prompts

Prompt 1
Explain how DroneTrim uses optical flow to tell shaky footage apart from smooth camera moves.
Prompt 2
Help me install DroneTrim's dependencies and run it on a folder of drone clips.
Prompt 3
Walk me through the difference between DroneTrim's copy mode and encode mode outputs.
Prompt 4
Show me how to use DroneTrim's dry-run option to preview trim decisions first.

Frequently asked questions

What is dronetrim?

A Python tool that automatically detects and trims shaky takeoff, landing, and idle hover segments from batches of drone video clips.

What language is dronetrim written in?

Mainly Python. The stack also includes Python, FFmpeg, OpenCV.

What license does dronetrim use?

MIT license: use, modify, and distribute freely, including commercially, as long as you keep the copyright notice.

How hard is dronetrim to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is dronetrim for?

Mainly general.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.