gyroflow / gyroflow
- вторник, 8 февраля 2022 г. в 00:29:45
Video stabilization using gyroscope data
Video stabilization using gyroscope data
Homepage •
Download •
Documentation •
Discord •
Report bug •
Request feature
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).
Sensor Logger
, G-Field Recorder
, Gyro
Settings
-> Apps
-> Optional features
-> Add a feature
-> enable Media Feature Pack
.tar.gz
package (recommended): Debian 10+, Ubuntu 18.10+, CentOS 8.2+, openSUSE 15.3+. Other distros require glibc 2.28+ (ldd --version
to check).AppImage
should work everywheresudo apt install libva2 libvdpau1 libasound2 libxkbcommon0 libpulse0 libc++-dev vdpau-va-driver libvulkan1
nvidia-opencl-icd nvidia-vdpau-driver nvidia-egl-icd nvidia-vulkan-icd libnvcuvid1 libnvidia-encode1
intel-media-va-driver i965-va-driver beignet-opencl-icd intel-opencl-icd
mesa-vdpau-drivers mesa-va-drivers mesa-opencl-icd libegl-mesa0 mesa-vulkan-drivers
For general support and discussion, you can find the developers and other users on the Gyroflow Discord server.
For companies or people wishing to get in touch with the team privately for collaborative purposes: devteam@gyroflow.xyz.
See the open issues for a list of proposed features and known issues. There's also a ton of TODO comments throughout the code.
Adobe After Effects and Davinci Resolve plugins are planned, but not ready yet
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributors are greatly appreciated.
Currently Gyroflow is available in:
Help us translate Gyroflow to your language! We use crowdin to manage translations and you can contribute there: https://crowdin.com/project/gyroflow
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.
src/ui
directorysrc/controller.rs
is a bridge between UI and core, it takes all commands from QML and calls functions in coresrc/core
contains the whole gyroflow engine and doesn't depend on Qt or ffmpeg, and OpenCV is optionalsrc/rendering
contains all FFmpeg related code for rendering final video and processing for synchronizationsrc/core/gpu
contains GPU implementations of the undistortionsrc/qt_gpu
contains zero-copy GPU undistortion path, using Qt RHI and GLSL compute shader, but this method is experimental and buggy for nowsrc/gyroflow.rs
is the main entry pointmod.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)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.
git clone https://github.com/gyroflow/gyroflow.git
ext
directory: cd gyroflow/ext
Qt 6.2.3
or higher: pip3 install -U pip & pip3 install aqtinstall
then aqt install-qt windows desktop 6.2.3 win64_msvc2019_64
or use the official installerFFmpeg 4.4
: https://sourceforge.net/projects/avbuild/files/windows-desktop/ffmpeg-4.4-windows-desktop-clang-gpl-lite.tar.xz/downloadgit clone --depth 1 https://github.com/Microsoft/vcpkg.git & .\vcpkg\bootstrap-vcpkg.bat
.\vcpkg\vcpkg install "opencv[core]:x64-windows-release"
.\vcpkg\vcpkg install "opencl:x64-windows-release"
7z
in PATH../__env.ps1
- I do this in VS Code built-in terminalcargo run --release
xcode-select --install
git clone https://github.com/gyroflow/gyroflow.git
cd gyroflow/ext && ./install-deps-mac.sh
__env-macos.sh
source __env-macos.sh
- I do this in VS Code built-in terminalcargo run --release
./_deployment/deploy-macos.sh
oncegit clone https://github.com/gyroflow/gyroflow.git
cd gyroflow/ext && ./install-deps-linux.sh
(Debian based apt)__env-linux.sh
source __env-linux.sh
- I do this in VS Code built-in terminalcargo run --release
aqt install-qt windows android 6.2.3 android_arm64_v8a
and aqt install-qt windows desktop 6.2.3 win64_mingw
cargo-apk
: cargo install --git https://github.com/zer0def/android-ndk-rs.git cargo-apk
rustup target add aarch64-linux-android
Cargo.toml
to comment out [[[bin]]
section and uncomment [lib]
sectionC:\Users\you\.cargo\registry\src\github.com-1ecc6299db9ec823\opencv-0.61.3\build.rs
: Change if cfg!(target_env = "msvc")
to if std::env::var("CARGO_CFG_TARGET_ENV").unwrap() == "msvc"
_deployment/build-android.ps1
and in _deployment/android/android-deploy.json
.\_deployment\build-android.ps1
in PowershellDistributed under the GPLv3 License. See LICENSE for more information.