Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to build metadata example #119

Open
syntheticsh opened this issue Oct 26, 2018 · 3 comments
Open

Failed to build metadata example #119

syntheticsh opened this issue Oct 26, 2018 · 3 comments

Comments

@syntheticsh
Copy link

I've tied to build example

And got

Compiling ffmpeg v0.2.0-alpha.2 (https://github.com/meh/rust-ffmpeg.git#dc6ace91)
error[E0425]: cannot find value `AVCOL_SPC_YCGCO` in this scope
  --> /usr/local/cargo/git/checkouts/rust-ffmpeg-9e0ba839e85456a1/dc6ace9/src/util/color/space.rs:72:29
   |
72 |             Space::YCGCO => AVCOL_SPC_YCGCO,
   |                             ^^^^^^^^^^^^^^^ did you mean `AVCOL_SPC_YCOCG`?

error[E0425]: cannot find value `AVCOL_SPC_CHROMA_DERIVED_NCL` in this scope
  --> /usr/local/cargo/git/checkouts/rust-ffmpeg-9e0ba839e85456a1/dc6ace9/src/util/color/space.rs:77:40
   |
77 |             Space::ChromaDerivedNCL => AVCOL_SPC_CHROMA_DERIVED_NCL,
   |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `AVCOL_SPC_CHROMA_DERIVED_CL` in this scope
  --> /usr/local/cargo/git/checkouts/rust-ffmpeg-9e0ba839e85456a1/dc6ace9/src/util/color/space.rs:78:39
   |
78 |             Space::ChromaDerivedCL => AVCOL_SPC_CHROMA_DERIVED_CL,
   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `AVCOL_SPC_ICTCP` in this scope
  --> /usr/local/cargo/git/checkouts/rust-ffmpeg-9e0ba839e85456a1/dc6ace9/src/util/color/space.rs:79:29
   |
79 |             Space::ICTCP => AVCOL_SPC_ICTCP,
   |                             ^^^^^^^^^^^^^^^ did you mean `AVCOL_SPC_FCC`?

and etc.

Can someone point out what I'm doing wrong?

I'm building inside Dockerfile. And this is my Cargo.toml.

@liushengyu
Copy link

I've tied to build example

And got

Compiling ffmpeg v0.2.0-alpha.2 (https://github.com/meh/rust-ffmpeg.git#dc6ace91)
error[E0425]: cannot find value `AVCOL_SPC_YCGCO` in this scope
  --> /usr/local/cargo/git/checkouts/rust-ffmpeg-9e0ba839e85456a1/dc6ace9/src/util/color/space.rs:72:29
   |
72 |             Space::YCGCO => AVCOL_SPC_YCGCO,
   |                             ^^^^^^^^^^^^^^^ did you mean `AVCOL_SPC_YCOCG`?

error[E0425]: cannot find value `AVCOL_SPC_CHROMA_DERIVED_NCL` in this scope
  --> /usr/local/cargo/git/checkouts/rust-ffmpeg-9e0ba839e85456a1/dc6ace9/src/util/color/space.rs:77:40
   |
77 |             Space::ChromaDerivedNCL => AVCOL_SPC_CHROMA_DERIVED_NCL,
   |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `AVCOL_SPC_CHROMA_DERIVED_CL` in this scope
  --> /usr/local/cargo/git/checkouts/rust-ffmpeg-9e0ba839e85456a1/dc6ace9/src/util/color/space.rs:78:39
   |
78 |             Space::ChromaDerivedCL => AVCOL_SPC_CHROMA_DERIVED_CL,
   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `AVCOL_SPC_ICTCP` in this scope
  --> /usr/local/cargo/git/checkouts/rust-ffmpeg-9e0ba839e85456a1/dc6ace9/src/util/color/space.rs:79:29
   |
79 |             Space::ICTCP => AVCOL_SPC_ICTCP,
   |                             ^^^^^^^^^^^^^^^ did you mean `AVCOL_SPC_FCC`?

and etc.

Can someone point out what I'm doing wrong?

I'm building inside Dockerfile. And this is my Cargo.toml.

Have you resolved this problem? I met the same,help~

@tilpner
Copy link
Collaborator

tilpner commented Oct 12, 2023

If you're building rust-ffmpeg master, you need to make sure your ffmpeg version is up-to-date (6.0+). For older ffmpeg versions, use previous rust-ffmpeg revisions (or crate versions, but those haven't been published in a while).

@kornelski
Copy link
Collaborator

BTW, I've raised this issue in the past. This crate is broken by design, and it only works on dev's machine.

It's using bindgen on ffmpeg headers of a whatever version is installed in the OS, but then expects the bindgened result to have very specific symbols existing (and not existing) that has to match the very specific version of ffmpeg that the person who wrote the Rust code had.

You should use ffmpeg-next-sys instead. It puts appropriate #[cfg] on the symbols to support more than dev's own version of ffmpeg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants