ffmpeg_sidecar::log_parser

Function try_parse_input

Source
pub fn try_parse_input(string: &str) -> Option<u32>
Expand description

Parse an input section like the following, extracting the index of the input:

ยงExample:

use ffmpeg_sidecar::log_parser::try_parse_input;
let line = "[info] Input #0, lavfi, from 'testsrc=duration=5':\n";
let input = try_parse_input(line);
assert!(input == Some(0));