pub async 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 11)
5async fn main() {
6 use async_ffmpeg_sidecar::download::auto_download;
7
8 println!("Downloading ffprobe");
9 // Download ffprobe from a configured source.
10 // Note that not all distributions include ffprobe in their bundle.
11 auto_download().await.unwrap();
12
13 println!("Downloaded ffprobe");
14
15 // Try running the executable and printing the version number.
16 let version = ffprobe_version().await.unwrap();
17 println!("ffprobe version: {}", version);
18}