Im trying to design a DSL style API for ffmpeg fil...
# codereview
z
Im trying to design a DSL style API for ffmpeg filters and I just wanna get some feedback. The main idea is filters have inputs and outputs and can be connected to one another
Copy code
val graph = FilterGraph {
    // split input into 2 (default) outputs
    filter("split") {
        // get first output and assign to variable
        val tmp = output {
            filter("crop") {
                option("out_w", "iw")
                option("out_h", "ih/2")
                option("x", 0)
                option("y", 0)
            }
            // flip vertically 
            filter("vflip")
        }
        
        // get the second output
        output {
            // overlay tmp on top of this output
            filter("overlay", tmp)
        }
    }
}