Package Details: gyroflow 1.6.3-3

Git Clone URL: https://aur.archlinux.org/gyroflow.git (read-only, click to copy)
Package Base: gyroflow
Description: Video stabilization using gyroscope data
Upstream URL: https://github.com/gyroflow/gyroflow
Licenses: GPL-3.0-or-later
Submitter: AlynxZhou
Maintainer: xiota
Last Packager: xiota
Votes: 4
Popularity: 0.000674
First Submitted: 2022-03-10 09:57 (UTC)
Last Updated: 2026-03-31 07:21 (UTC)

Dependencies (14)

Required by (1)

Sources (1)

Latest Comments

gbin commented on 2026-03-30 21:53 (UTC) (edited on 2026-03-30 21:53 (UTC) by gbin)

This last one triggered a serious misery vs the arch nature dependencies, here is a pretty rough patch to make it work:

diff --git a/PKGBUILD b/PKGBUILD
index 84e730f..5a712a4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,7 +12,7 @@ export CARGO_HOME CARGO_TARGET_DIR RUSTUP_TOOLCHAIN
 _pkgname="gyroflow"
 pkgname="$_pkgname"
 pkgver=1.6.3
-pkgrel=2
+pkgrel=3
 pkgdesc="Video stabilization using gyroscope data"
 url="https://github.com/gyroflow/gyroflow"
 license=("GPL-3.0-or-later")
@@ -48,7 +48,114 @@ sha256sums=('0b2049d448999fa96647fb6c9e067fd5bfe0a8e5b91da97a6d0aa20fe9f1353f')

 prepare() (
   cd "$_pkgsrc"
+  # opencv-rust 0.95.1 is not compatible with the system OpenCV 4.13 stack here:
+  # it first panics while generating `surface_matching` bindings, and even with
+  # unused modules disabled it still fails later in the crate build. Bump to a
+  # newer opencv-rust release and limit the enabled OpenCV modules to what
+  # Gyroflow uses.
+  sed -i 's|opencv = { version = "0.95", features = \["clang-runtime"\], optional = true }|opencv = { version = "0.98.2", default-features = false, features = ["clang-runtime", "calib3d", "dnn", "imgproc", "video"], optional = true }|' src/core/Cargo.toml
+  cargo update -p opencv --precise 0.98.2
   cargo fetch --target "$(rustc -vV | sed -n 's/host: //p')"
+
+  # ffmpeg-next 8.0.0 does not cover new FFmpeg 8.1 enum variants yet.
+  local _ffmpeg_next_dir
+  _ffmpeg_next_dir="$(find "$CARGO_HOME/registry/src" -maxdepth 2 -type d -name 'ffmpeg-next-8.0.0' -print -quit)"
+  patch -d "$_ffmpeg_next_dir" -Np1 <<'EOF'
+--- a/src/util/color/primaries.rs
++++ b/src/util/color/primaries.rs
+@@ -66,6 +66,7 @@ impl From<AVColorPrimaries> for Primaries {
+             AVCOL_PRI_JEDEC_P22 => Primaries::JEDEC_P22,
+             #[cfg(feature = "ffmpeg_4_3")]
+             AVCOL_PRI_EBU3213 => Primaries::EBU3213,
++            _ => Primaries::Reserved0,
+         }
+     }
+ }
+--- a/src/util/color/transfer_characteristic.rs
++++ b/src/util/color/transfer_characteristic.rs
+@@ -63,6 +63,7 @@ impl From<AVColorTransferCharacteristic> for TransferCharacteristic {
+             AVCOL_TRC_SMPTE2084 => TransferCharacteristic::SMPTE2084,
+             AVCOL_TRC_SMPTE428 => TransferCharacteristic::SMPTE428,
+             AVCOL_TRC_ARIB_STD_B67 => TransferCharacteristic::ARIB_STD_B67,
++            _ => TransferCharacteristic::Reserved0,
+         }
+     }
+ }
+--- a/src/util/frame/side_data.rs
++++ b/src/util/frame/side_data.rs
+@@ -72,11 +72,16 @@
+ 
+     #[cfg(feature = "ffmpeg_8_0")]
+     THREE_D_REFERENCE_DISPLAYS,
++
++    Unknown,
+ }
+ 
+ impl Type {
+     #[inline]
+     pub fn name(&self) -> &'static str {
++        if matches!(self, Type::Unknown) {
++            return "unknown";
++        }
+         unsafe {
+             from_utf8_unchecked(CStr::from_ptr(av_frame_side_data_name((*self).into())).to_bytes())
+         }
+@@ -148,6 +153,7 @@
+ 
+             #[cfg(feature = "ffmpeg_8_0")]
+             AV_FRAME_DATA_3D_REFERENCE_DISPLAYS => Type::THREE_D_REFERENCE_DISPLAYS,
++            _ => Type::Unknown,
+         }
+     }
+ }
+@@ -217,6 +223,8 @@
+ 
+             #[cfg(feature = "ffmpeg_8_0")]
+             Type::THREE_D_REFERENCE_DISPLAYS => AV_FRAME_DATA_3D_REFERENCE_DISPLAYS,
++
++            Type::Unknown => AV_FRAME_DATA_PANSCAN,
+         }
+     }
+ }
+--- a/src/codec/id.rs
++++ b/src/codec/id.rs
+@@ -1389,6 +1389,7 @@
+             AV_CODEC_ID_G728 => Id::G728,
+             #[cfg(feature = "ffmpeg_8_0")]
+             AV_CODEC_ID_IVTV_VBI => Id::IVTV_VBI,
++            _ => Id::None,
+         }
+     }
+--- a/src/codec/packet/side_data.rs
++++ b/src/codec/packet/side_data.rs
+@@ -73,6 +73,8 @@
+     #[cfg(feature = "ffmpeg_8_0")]
+     THREE_D_REFERENCE_DISPLAYS,
+     #[cfg(feature = "ffmpeg_8_0")]
+     RTCP_SR,
++
++    Unknown,
+ }
+ 
+ impl From<AVPacketSideDataType> for Type {
+@@ -144,6 +146,7 @@
+             AV_PKT_DATA_3D_REFERENCE_DISPLAYS => Type::THREE_D_REFERENCE_DISPLAYS,
+             #[cfg(feature = "ffmpeg_8_0")]
+             AV_PKT_DATA_RTCP_SR => Type::RTCP_SR,
++            _ => Type::Unknown,
+         }
+     }
+ }
+@@ -217,6 +220,8 @@
+             Type::THREE_D_REFERENCE_DISPLAYS => AV_PKT_DATA_3D_REFERENCE_DISPLAYS,
+             #[cfg(feature = "ffmpeg_8_0")]
+             Type::RTCP_SR => AV_PKT_DATA_RTCP_SR,
++
++            Type::Unknown => AV_PKT_DATA_NB,
+         }
+     }
+ }
+EOF
 )

 build() (

kelvie commented on 2025-08-27 18:18 (UTC)

Mine no longer builds for some reason, I added:

  export CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true
  export RUST_BACKTRACE=full

and saw that it couldn't find cuda_runtime.h, which it turns out is in /opt/cuda/include.

So I added export OPENCV_INCLUDE_PATHS="/opt/cuda/include" in the PKGBUILD to fix it. Is this the right fix, or is there something wonky about my cuda install?

ioctl commented on 2025-06-15 08:07 (UTC)

There is no CLI capability in the built binary. Can it be returned?

Shidao commented on 2023-10-04 13:41 (UTC)

I'm encountering a compilation error that prints thousands of lines of error messages like this:

error: proc-macro derive panicked
  --> /home/user/.cargo/git/checkouts/qmetaobject-rs-be16efb753ea0f8f/98ebed1/qttypes/src/qtcore/qbytearray.rs:12:1
   |
12 | / cpp_class!(
13 | |     /// Wrapper around [`QByteArray`][class] class.
14 | |     ///
15 | |     /// [class]: https://doc.qt.io/qt-5/qbytearray.html
16 | |     #[derive(PartialEq, PartialOrd, Eq, Ord)]
17 | |     pub unsafe struct QByteArray as "QByteArray"
18 | | );
   | |_^
   |
   = help: message: 
           -- rust-cpp fatal error --

           Struct metadata not present in target library file.
           NOTE: Double-check that the version of cpp_build and cpp_macros match
   = note: this error originates in the macro `$crate::__cpp_class_internal` which comes from the expansion of the macro `cpp_class` (in Nightly builds, run with -Z macro-backtrace for more info)

Afterwards, it says error: could not compile 'qttypes' (lib) due to 612 previous errors.

I've searched for the error message, but there is little discussion about it. The only one I found is on https://github.com/mystor/rust-cpp/issues/70, but the issue states that it's been fixed. The comments in the issue suggest that running cargo clean might help, but it didn't. I'm not very familiar with the build system in this case. Does anyone have any ideas?

(And the full output is here: https://pastebin.ubuntu.com/p/tytnHcKzxd/)

AlynxZhou commented on 2023-06-28 12:30 (UTC)

At first I thought this program is not so useful for me because I didn't get a good result with my camera, and then I forget to update this AUR package... But I just remember one of Bilibili channel I am following says "to use gyro stabilization you need to disable steadyshot in camera", and I try it again this time it works well, I am happy to see the building scripts still work so I re-maintain this now...

Toadtoad commented on 2022-04-06 20:56 (UTC)

Gyroflow also requires the package libc++ in order to properly run, or else you get the following error:

./gyroflow: error while loading shared libraries: libc++.so.1: cannot open shared object file: No such file or directory