# shellcheck shell=dash

xrc:mod:lib     ff          first __cmd ddgo merge

___x_cmd_ff___main(){
    [ "$#" -gt 0 ] ||       set - --help
    local op="$1"; shift

    case "$op" in
        -h|--help)          ___x_cmd help -m ff     "$@"    ;;

        convert)            ___x_cmd_ff_convert     "$@"    ;;
        merge)              ___x_cmd_ff_merge       "$@"    ;;
        first)              ___x_cmd_ff_first       "$@"    ;;

        show)               ___x_cmd_ff_show        "$@"    ;;
        play)               ___x_cmd_ff_play___cmd  "$@"    ;;
        probe)              ___x_cmd_ff_probe___cmd "$@"    ;;

        # ,|--co)           ___x_cmd_ffmpeg --co "$@" ";;
        :|ddgo)             ___x_cmd_ff_ddgo        "$@"    ;;

        mpeg)               ___x_cmd_ff_mpeg___cmd  "$@"    ;;
        cmd)                ___x_cmd_ff_mpeg___cmd  "$@"    ;;
        -*)                 ___x_cmd_ff_mpeg___cmd  "$@"    ;;

        *)
                            : detect input and output
                            : then convert the input to output
                            ;;
    esac
}

___x_cmd_ff_show(){
    [ $# -gt 0 ]    ||  set -- formats

    local op="$1";      shift
    case "$op" in
        -h|--help)      ___x_cmd help -m ff show  "$@"    ;;
        buildconf)      ___x_cmd_ff_mpeg___cmd -buildconf ;;
        formats)        ___x_cmd_ff_mpeg___cmd -formats   ;;
    esac

}
