5 releases

✓ Uses Rust 2018 edition

0.1.4 Oct 14, 2019
0.1.3 Aug 12, 2019
0.1.2 Aug 12, 2019
0.1.1 Aug 5, 2019
0.1.0 Jul 23, 2019

#5 in #ffmpeg

Download history 30/week @ 2019-08-02 40/week @ 2019-08-09 11/week @ 2019-08-16 35/week @ 2019-08-23 29/week @ 2019-08-30 12/week @ 2019-09-06 15/week @ 2019-09-13 43/week @ 2019-09-20 8/week @ 2019-09-27 5/week @ 2019-10-04 15/week @ 2019-10-11 28/week @ 2019-10-18 18/week @ 2019-10-25 18/week @ 2019-11-01 11/week @ 2019-11-08

86 downloads per month

AGPL-3.0-or-later

18KB
521 lines

ffcli.rs

A ffmpeg cli args builder

Using

    let filter_split = VideoFilter::new()
        .input(0)
        .output("rgb")
        .output("alpha")
        .params("format", "rgb32")
        .params("split", 2);
    let filter_rgb = VideoFilter::new()
        .input("rgb")
        .output("out0")
        .params_raw(
            VideoFilterParams::new()
                .key("lutrgb")
                .params_raw(VideoFilterParams::kv("a", "minval")),
        )
        .params("format", "rgb24");
    let filter_alpha = VideoFilter::new()
        .input("alpha")
        .output("out1")
        .params_key("alphaextract")
        .params("format", "gray");
    let args = FFmpegArgs::new(Level::Debug)
        .i("test.png")
        .vf(filter_split)
        .vf(filter_rgb)
        .vf(filter_alpha)
        .build_filter()
        .map("[out0]")
        .raw("rgb.png")
        .map("[out1]")
        .raw("alpha.png")
        .build();
    assert_eq!("-hide_banner -y -loglevel warning -stats -i test.png -filter_complex [0]format=rgb32,split=2[rgb][alpha];[rgb]lutrgb=a='minval',format=rgb24[out0];[alpha]alphaextract,format=gray[out1] -map [out0] rgb.png -map [out1] alpha.png", args.join(" "));

Dependencies

~135KB