Gyroflow is an application that can stabilize your video by using motion data from a gyroscope and optionally an accelerometer. Modern cameras record that data internally (GoPro, Sony, Insta360 etc), and this application stabilizes the captured footage precisely by using them. It can also use gyro data from an external source (eg. from Betaflight blackbox).
Real-time preview, parameter adjustments and all calculations
GPU processing and rendering, all algorithms fully multi-threaded
Rolling shutter correction
Video editor plugins (Adobe Premiere/Ae, DaVinci Resolve, Final Cut Pro and more), allowing you to apply stabilization directly in a video editor without transcoding
Supports full Sony metadata (recording params, automatic lens, support for IBIS, OIS, EIS - you can have IBIS enabled in camera and still apply Gyroflow on top)
Supports already stabilized GoPro videos (captured with Hypersmooth enabled) (Hero 8 and up)
Supports and renders 10-bit videos (up to 16-bit 4:4:4:4 for regular codecs and 32-bit float for OpenEXR - working directly on YUV data to maintain maximum quality)
Customizable lens correction strength
Render queue
Keyframes
Ability to create custom settings presets
Visual chart with gyro data (displays gyro, accelerometer, magnetometer, and quaternions, including smoothed quaternions)
Multiple gyro integration methods for orientation determination
Multiple video orientation smoothing algorithms, including horizon levelling and per-axis smoothness adjustment.
Cross-platform - works on Windows/Linux/Mac/Android/iOS
Multiple UI languages
Supports variable and high frame rate videos - all calculations are done on timestamps
H.264/AVC, H.265/HEVC, ProRes, DNxHD, CineForm, PNG and OpenEXR outputs, with H.264 and H.265 fully GPU accelerated (ProRes also accelerated on Apple Silicon)
Easy lens calibration process
Fully zero-copy GPU preview rendering
Core engine is a separate library without external dependencies (no Qt, no ffmpeg, no OpenCV), and can be used to create OpenFX and Adobe plugins (on the TODO list)
Automatic updates of lens profile database
Built-in official lens profiles for GoPro HERO 6-13; Sony; DJI; Insta360 action cameras; RunCam: Thumb series, 5 Orange
Easy management of the video editor plugins from within the app
Ability to add an additional 3D rotation (useful for framing vertical videos)
Supported gyro sources
GoPro (HERO 5 and later)
Sony (a1, a7c, a7r V, a7 IV, a7s III, a9 II, a9 III, FX3, FX6, FX9, RX0 II, RX100 VII, ZV1, ZV-E10, ZV-E10 II, ZV-E1, a6700)
For cameras which do have built-in gyro, please contact us and we will implement support for that camera. Refer to the documentation for information about the gyro logging process.
For cameras which don't have built-in gyro, you can use any other device which records gyro data. It may be a phone, an action camera, or an external device like a Betaflight FC, flowshutter, esp-gyrologger (eg. on an AtomS3). You just have to mount it on your main camera.
Download Gyroflow-mac-universal.dmg from the Releases page, run the downloaded file, and drag & drop Gyroflow app to the Applications folder (or anywhere you want, like on Desktop)
You can also install using brew: brew install gyroflow. To upgrade Gyroflow, run brew update then brew upgrade gyroflow
Linux
Download Gyroflow-linux64.tar.gz from the Releases page, extract the files somewhere and run ./Gyroflow in the terminal.
If that doesn't work, you can try the Gyroflow-linux64.AppImage, but the .tar.gz one is preferred.
Make sure you have latest graphics drivers installed
Gyroflow is written in Rust, with UI written in QML. It uses Qt, ffmpeg, OpenCV and mdk-sdk external dependencies for the main program, but the core library is written in pure Rust without any external dependencies.
OpenCV usage is kept to a minimum, used only for lens calibration and optical flow (src/core/calibration/mod.rs and src/core/synchronization/opencv.rs). Core algorithms and undistortion don't use OpenCV.
GPU stuff supports DirectX, OpenGL, Metal and Vulkan thanks to Qt RHI and wgpu.
For GPU processing we use OpenCL or wgpu, with highly parallelized CPU implementation as a fallback.
Code structure
Entire GUI is in the src/ui directory
src/controller.rs is a bridge between UI and core, it takes all commands from QML and calls functions in core
src/core contains the whole gyroflow engine and doesn't depend on Qt or ffmpeg. OpenCV is optional
src/rendering contains all FFmpeg related code for rendering final video and processing for synchronization
src/core/gpu contains GPU implementations of the undistortion
src/qt_gpu contains zero-copy GPU undistortion path, using Qt RHI and GLSL compute shader
src/gyroflow.rs is the main entry point
mod.rs or lib.rs in each directory act as a main entry of the module (directory name is the module name and mod.rs is kind of an entry point)
Dev environment
Visual Studio Code with rust-analyzer extension.
For working with QML I recommend to use Qt Creator and load all QML files there, as it has auto-complete and syntax highlighting.
The project also supports UI live reload, it's a super quick way of working with the UI. Just change live_reload = true in gyroflow.rs and it should work right away. Now every time you change any QML file, the app should reload it immediately.
Building on Windows
Prerequisites: git, 7z and working powershell. If you never ran powershell scripts before, run set-executionpolicy remotesigned in powershell as admin
Install Just by running cargo install --force just
Clone the repo: git clone https://github.com/gyroflow/gyroflow.git
Enter the project directory and:
Install dependencies: just install-deps
Compile and run: just run
Building for Android
Prerequisites: git, 7z, working powershell, Android SDK and NDK. Android is not well supported yet, but the app can be built and somewhat works. Building is supported only on Windows
Install Just by running cargo install --force just
Clone the repo: git clone https://github.com/gyroflow/gyroflow.git
Enter the project directory and:
Install dependencies: just ios install-deps
Update Team ID, signing keys and provisioning profiles in _scripts/ios.just
Compile and run on device: just ios run
Profiling on Windows
Install and run Visual Studio Community Edition
Compile and run Gyroflow with the profile profile: just profile
In Visual Studio, go to Debug -> Performance Profiler...
Under Target, open Change Target and select Running Process..., select the running gyroflow.exe process
Profiling QML
Uncomment config.define("QT_QML_DEBUG", None); in build.rs
Comment cli::run() in gyroflow.rs
Run in debug mode with QML debugger args: cargo run -- "-qmljsdebugger=port:1234,block,services:CanvasFrameRate,EngineControl,DebugMessages"
In Qt Creator go to Analyze -> QML Profiler (Attach to Waiting Application) and enter port 1234
License
Distributed under the GPLv3 License with App Store Exception. See LICENSE for more information.
As additional permission under section 7, you are allowed to distribute gyroflow_core through an app store, even if that store has restrictive terms and conditions that are incompatible with the GPL, provided that the source is also available under the GPL with or without this permission through a channel without those restrictive terms and conditions.
Authors
AdrianEddy - Author of the Rust implementation (code in this repository), author of the UI, GPU processing, rolling shutter correction, advanced rendering features and the Adobe plugin
Elvin Chen - Author of the first version in Python, laid the groundwork to make all this possible
Notable contributors
Maik Menz - Contributed to all areas of Gyroflow with fixes and improvements
Aphobius - Author of the velocity dampened smoothing algorithm