Open 1over137 opened 1 month ago
What is your ffmpeg version
This seems to be a bug in ffmpeg-next, this should workaround it
diff --git a/Cargo.toml b/Cargo.toml
index 86bdc01..f7f7bb5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -27,7 +27,7 @@ wayland-protocols = { version = "0.32", features = [
"staging",
] }
wayland-protocols-wlr = { version = "0.3", features = ["client"] }
-ffmpeg-next = "7.0.1"
+ffmpeg-next = { version = "7.0.1", features=["rpi"] }
ffmpeg-sys-next = "7.0.0" # need direct dep on -sys to get metadata to consume in build.rs
thiserror = "1.0.38"
human-size = "0.4.2"
Thanks, it seems to have worked
I think I have a similar issue with ffmpeg-next:
# ffmpeg -v
ffmpeg version 7.0.2 Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 13.2.0 (GCC)
configuration: --prefix=/usr --cpu=skylake
libavutil 59. 8.100 / 59. 8.100
libavcodec 61. 3.100 / 61. 3.100
libavformat 61. 1.100 / 61. 1.100
libavdevice 61. 1.100 / 61. 1.100
libavfilter 10. 1.100 / 10. 1.100
libswscale 8. 1.100 / 8. 1.100
libswresample 5. 1.100 / 5. 1.100
Missing argument for option 'v'.
Error splitting the argument list: Invalid argument
root@xps ~/wl-screenrec (main)
# git status
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
root@xps ~/wl-screenrec (main)
# git reflog
269c189 (HEAD -> main, origin/main, origin/HEAD) HEAD@{0}: checkout: moving from main to main
269c189 (HEAD -> main, origin/main, origin/HEAD) HEAD@{1}: checkout: moving from daa9b176dffe74fa0c19607f9c2325dd4ad8910e to main
daa9b17 (tag: v0.1.5) HEAD@{2}: checkout: moving from main to v0.1.5
269c189 (HEAD -> main, origin/main, origin/HEAD) HEAD@{3}: pull: Fast-forward
e5e651c HEAD@{4}: clone: from https://github.com/russelltg/wl-screenrec.git
root@xps ~/wl-screenrec (main)
# cargo build --release
Compiling ffmpeg-next v7.1.0
Compiling wl-screenrec v0.1.5 (/root/wl-screenrec)
error[E0425]: cannot find value `AV_PKT_DATA_FRAME_CROPPING` in this scope
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ffmpeg-next-7.1.0/src/codec/packet/side_data.rs:202:37
|
202 | Type::FRAME_CROPPING => AV_PKT_DATA_FRAME_CROPPING,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find value `AV_PKT_DATA_LCEVC` in this scope
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ffmpeg-next-7.1.0/src/codec/packet/side_data.rs:204:28
|
204 | Type::LCEVC => AV_PKT_DATA_LCEVC,
| ^^^^^^^^^^^^^^^^^ help: a unit variant with a similar name exists: `AV_PKT_DATA_A53_CC`
|
::: /root/wl-screenrec/target/release/build/ffmpeg-sys-next-6e05e3935ed5bb17/out/bindings.rs:6559:5
|
6559 | AV_PKT_DATA_A53_CC = 23,
| ------------------ similarly named unit variant `AV_PKT_DATA_A53_CC` defined here
For more information about this error, try `rustc --explain E0425`.
error: could not compile `ffmpeg-next` (lib) due to 2 previous errors
Huge caveat that I do not understand how Cargo.toml handles versions. The toml says "7.0.1" but the compile log references to "7.1.0"? Very confusing.
That's strange--this seems like a bug in ffmpeg-sys. What distro are you on?
Re cargo versions: version constraings are "semver minimums" in that any semver compat version is OK. So, cargo is allowed to select 7.1 when I specify 7.0 but it's not allowed to select 8.0.
https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html if you're curious
System: Gentoo, ffmpeg version is 6.1.2