Function try_parse_output

Source
pub fn try_parse_output(s: &str) -> Option<FfmpegOutput>
Expand description

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

ยงExample:

use async_ffmpeg_sidecar::log_parser::try_parse_output;
use async_ffmpeg_sidecar::event::FfmpegOutput;
let line = "[info] Output #0, mp4, to 'test.mp4':\n";
let output = try_parse_output(line);
assert_eq!(output, Some(FfmpegOutput {
    index: 0,
    to: "test.mp4".to_string(),
    raw_log_message: line.to_string()
}));