ffmpeg_sidecar::log_parser

Function try_parse_configuration

Source
pub fn try_parse_configuration(string: &str) -> Option<Vec<String>>
Expand description

Parses the list of configuration flags ffmpeg was built with. Typically the second line of log output.

ยงExample:

use ffmpeg_sidecar::log_parser::try_parse_configuration;

let line = "[info]   configuration: --enable-gpl --enable-version3 --enable-static\n";
// Typically much longer, 20-30+ flags

let version = try_parse_configuration(line).unwrap();

assert!(version.len() == 3);
assert!(version[0] == "--enable-gpl");
assert!(version[1] == "--enable-version3");
assert!(version[2] == "--enable-static");