rusty_ffmpeg 0.2.1

A library that provides Rust bindings for FFmpeg
docs.rs failed to build rusty_ffmpeg-0.2.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: rusty_ffmpeg-0.14.1+ffmpeg.7.0

Rusty FFmpeg

CI Crates.io Doc

FFI binding for FFmpeg inner library.

Building

  1. Prerequisites
    A Linux Machine with the Nightly Rust toolchain. You can use this one-liner script to install nightly Rust:

    $ curl -s https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly
    
  2. Generate and build the bindings:
    Run cargo build to build the bindings, we will compile the FFmpeg in the git submodule for you. If you have a pre-built ffmpeg, set PKG_CONFIG_PATH to the path which points to *.pc files in the build result(e.g. PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" cargo build) then we will use the pre-built FFmpeg libraries. After the FFmpeg is built, the build script will take advantage of the package-config(*.pc) files to:

    1. Probe paths of the header files for binding generation and generate the binding.
    2. Probe library dependencies as project dependencies to ensure this project can be built successfully.

Testing

You can use cargo test to test the generated bindings. If you haven't run cargo build and you have pre-built FFmpeg libraries. Set the PKG_CONFIG_PATH like this: PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" cargo test which doesn't need to build the FFmpeg redundantly.

To see it works, you can run cargo run --example slice.