ffmpeg_sidecar::download

Function auto_download

Source
pub fn auto_download() -> Result<()>
Expand description

Check if FFmpeg is installed, and if it’s not, download and unpack it. Automatically selects the correct binaries for Windows, Linux, and MacOS. The binaries will be placed in the same directory as the Rust executable.

If FFmpeg is already installed, the method exits early without downloading anything.

Examples found in repository?
examples/ffprobe.rs (line 7)
2
3
4
5
6
7
8
9
10
11
12
fn main() {
  use ffmpeg_sidecar::{download::auto_download, ffprobe::ffprobe_version};

  // Download ffprobe from a configured source.
  // Note that not all distributions include ffprobe in their bundle.
  auto_download().unwrap();

  // Try running the executable and printing the version number.
  let version = ffprobe_version().unwrap();
  println!("ffprobe version: {}", version);
}