Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Just to compare, here's how you would add the latest version of libav to a Rust project using Cargo:

  [dependencies]
  # Safe Rust wrapper
  ffmpeg-next = "5.0.3"
or

  [dependencies]
  # Direct FFI bindings
  ffmpeg-next-sys = "5.0.3"
Note that libav will be built from source, but it will be cached for subsequent builds of your project.

And thanks to the build script maintained by the crate (library) owner, this process should work exactly the same across major OSes and architectures transparently.

Edit: Here is the relevant part of the build script that actually configures and builds libav based on Cargo feature flags and configured rustc OS + arch: https://github.com/zmwangx/rust-ffmpeg-sys/blob/499fca3630fb...



Really? It seems more complicated than that.........

https://github.com/zmwangx/rust-ffmpeg/wiki/Notes-on-buildin...

And "Install FFmpeg (complete with headers) through any means, e.g. downloading a pre-built "full_build-shared".

Come on...


Ah, should have been more explicit: you also need a working C compiler (+ make, pkg-config, etc.) and the libav development headers.

As for libav itself, if prebuilt libraries are not present, the build script will fetch the source and build it as a static lib.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: