git404hub

what is dji_04_air_unit_gyro_patcher fr?

gmatocha/dji_04_air_unit_gyro_patcher — explained in plain English

Analysis updated 2026-05-18

2PythonAudience · vibe coderComplexity · 3/5Setup · moderate

tl;dr

Python scripts that detect and repair short bursts of bad gyro data in DJI Air Unit video files, fixing shakiness that survives normal stabilization.

vibe map

mindmap
  root((repo))
    What it does
      Extracts gyro telemetry
      Detects bad regions
      Patches and reinjects data
    Tech stack
      Python
      FFmpeg
    Use cases
      Fix shaky DJI drone footage
      Clean telemetry before stabilization
      Repair Gyroflow input data
    Audience
      Drone pilots
      Video editors
    Setup
      Install Python and FFmpeg
      Run from the command line

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 make with this?

VIBE 1

Repair shaky DJI Air Unit footage caused by corrupted gyro telemetry bursts.

VIBE 2

Extract raw gyro data from a DJI MP4 for inspection or custom processing.

VIBE 3

Feed cleaned telemetry into Gyroflow or similar stabilization software for smoother results.

VIBE 4

Detect suspicious gyro spikes and review them before deciding whether to patch.

what's the stack?

PythonFFmpeg

how it stacks up fr

gmatocha/dji_04_air_unit_gyro_patcher0-bingwu-0/live-interpreter0cm-labs/tokenizer-benchmark
Stars222
LanguagePythonPythonPython
Setup difficultymoderatemoderatemoderate
Complexity3/52/52/5
Audiencevibe codergeneralresearcher

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

how do i run it?

Difficulty · moderate time til it works · 30min

Requires FFmpeg and Python 3.8+, plus footage originally stabilized in Gyroflow.

in plain english

DJI_04_Air_Unit_Gyro_Patcher is a set of Python scripts that fixes a specific stabilization bug in video files recorded by DJI Air Units, mostly ones using the 1469D gyro chip found in 2026 hardware. Some recordings from these units contain short bursts of bad gyro telemetry that cause visible shakiness even after stabilization software like Gyroflow has processed the footage. This tool detects those bad stretches of data and repairs them directly inside the MP4 file. The main script, dji_gyro_fix.py, runs the whole process in one step: it extracts the gyro telemetry from an input MP4, cleans up the bad regions, and writes the corrected data back into a new patched copy of the video. Separate scripts are also provided for extracting telemetry to a CSV file, patching a CSV on its own, and injecting a patched CSV back into a video, for users who want to work through the steps individually. Detection works by measuring the gyro's overall movement magnitude for every sample and comparing it against each file's own normal baseline, rather than a single fixed threshold. Regions where the magnitude spikes far above baseline are flagged as glitches, then the flagged area is grown outward to catch the fading wobble that often lingers after the main spike, stopping once the data has been calm for a set amount of time. A safety check treats unusually long high magnitude regions as possible real camera motion instead of a glitch, and reports them separately rather than silently altering them. Once a bad region is identified, the tool bridges across it using a smooth interpolation between the last good reading before the glitch and the first good reading after it, then recalculates the rest of the orientation data for the whole file. It does not attempt to guess what actually happened during the glitch, it simply smooths over it so stabilization software has clean data to work with. The tool requires FFmpeg and Python 3.8 or newer, and is meant for drone pilots and video editors dealing with shaky DJI Air Unit footage. The author notes that the code and documentation were generated with Claude Sonnet 5 and may contain errors.

prompts (copy fr)

prompt 1
Help me run dji_gyro_fix.py on my DJI Air Unit MP4 file and explain the output CSV and video files it produces.
prompt 2
Walk me through extracting gyro data with extract_dji_gyro.py and then patching it with patch_dji_gyro_csv.py separately.
prompt 3
Explain what the threshold-multiplier and expand-multiplier options in patch_dji_gyro_csv.py control and how to tune them.
prompt 4
Show me how to use the report-only mode to check for bad gyro regions before patching my footage.

Frequently asked questions

what is dji_04_air_unit_gyro_patcher fr?

Python scripts that detect and repair short bursts of bad gyro data in DJI Air Unit video files, fixing shakiness that survives normal stabilization.

What language is dji_04_air_unit_gyro_patcher written in?

Mainly Python. The stack also includes Python, FFmpeg.

How hard is dji_04_air_unit_gyro_patcher to set up?

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

Who is dji_04_air_unit_gyro_patcher for?

Mainly vibe coder.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.