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

Cannot build ffms2-rs on Ubuntu 24.04 #35

Open
mipimipi opened this issue May 3, 2024 · 9 comments
Open

Cannot build ffms2-rs on Ubuntu 24.04 #35

mipimipi opened this issue May 3, 2024 · 9 comments

Comments

@mipimipi
Copy link
Contributor

mipimipi commented May 3, 2024

Hi,
when building ffms2-rs from the latest code version of the repo, I get the following error:

   Compiling ffms2 v0.3.0 (https://github.com/rust-av/ffms2-rs#87238d72)
error[E0063]: missing fields `DolbyVisionRPU`, `DolbyVisionRPUSize`, `HDR10Plus` and 1 other field in initializer of `ffms2_sys::FFMS_Frame`
  --> /home/mipi/.cargo/git/checkouts/ffms2-rs-deffbde628fee48c/87238d7/src/utility.rs:94:30
   |
94 |                 let $param = $type {
   |                              ^^^^^ missing `DolbyVisionRPU`, `DolbyVisionRPUSize`, `HDR10Plus` and 1 other field

For more information about this error, try `rustc --explain E0063`.
error: could not compile `ffms2` (lib) due to 1 previous error

This error occurs with Ubuntu 24.04 on x86_64 and arm64. It does not occurs on Arch Linux, neither for x86_64 nor for arm64. Do you have any idea why that happens?

Thanks!

@Luni-4
Copy link
Member

Luni-4 commented May 5, 2024

Yep, the FFMpeg version is more recent than the one supported by the current version of the crate. The new ffms2 version should fix that problem, but we are currently waiting for a third-party crate to be released so that we can continue its development

@mipimipi
Copy link
Contributor Author

mipimipi commented May 5, 2024

Ok, thanks for the update. I am waiting for the new version. As workaround, I am calling the ffmsindex binary from rust, but I prefer to call FFMS2 via the bindings in ffms2-rs crate because it's more performant. Unfortunately, there are too many problems currently. Thus, I decided to go for the workaround.

@Luni-4
Copy link
Member

Luni-4 commented May 6, 2024

Yep, it's a good workaround, let's hope the third-party crate will be released soon, they are working on it

@mipimipi
Copy link
Contributor Author

mipimipi commented May 6, 2024

Which crate is it?

@Luni-4
Copy link
Member

Luni-4 commented May 6, 2024

Ok, they have just released a new version https://crates.io/crates/ffmpeg-the-third, so we can go on with the refactoring

@mipimipi
Copy link
Contributor Author

mipimipi commented May 7, 2024

BTW, since you are the maintainer of this crate you must have some knowledge in the FFmpeg area, and thus you might be able to answer a question: The only 2 things that I need about a video file for my use case are (1) a list of key frame numbers, and (2) the timestamp of each frame. Currently, I use ffmsindex to get this info. Are you aware of a more "direct" way to get this info? With "direct" I mean without using FFMS2? I tried out video-rs, for example. VBut this crate consumes quite some time to retrieve information about frames. Thanks!

@Luni-4
Copy link
Member

Luni-4 commented May 9, 2024

Actually, I've decided to port ffms2 in Rust for nearly your same reasons. It is difficult to have an accurate frame-seeking library with just a small set of APIs to do that. ffmpeg-the-third offers a series of APIs to obtain what you are looking for but you have to fiddle with them, mixing them together, and this could lead to errors.

What is video-rs?

@mipimipi
Copy link
Contributor Author

mipimipi commented May 9, 2024

What is video-rs?

video-rs is yet another FFmpeg wrapper

@Luni-4
Copy link
Member

Luni-4 commented Jun 4, 2024

@mipimipi

Sorry for the late reply, but I'm pretty busy in this period. If you want to speed up the release of a new ffms2-rs version, feel free to contribute to this branch https://github.com/rust-av/ffms2-rs/tree/refactor

Three things should be done in order to branch it in master and publish the new version:

  • Update the ffmpeg-the-third version in order to make this crate work with FFmpeg 7.0
  • Fix the Continuous Integration adding the new ffms2 version.
  • Add unit tests to verify whether the APIs works correctly

You can open a pull request if you want and I can review it step by step. Feel free to rebase, squash my commits without any problem

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

2 participants