Skip to content

Run multiple commands #58

@MohammadRezaei92

Description

@MohammadRezaei92

I want to run multiple command with 1 execute command. Here is my code:

val queries = arrayListOf<String>()
        imagePaths.forEachIndexed { index, path ->
            val query: Array<String> = FFmpegQueryExtension().mergeImageAndAudio(
                path,
                audioPaths[index],
                outputs[index]
            )
            queries.addAll(query)
        }


        CallBackOfQuery().callQuery(queries.toTypedArray(), object : FFmpegCallBack {
            override fun statisticsProcess(statistics: Statistics) {}
            override fun process(logMessage: LogMessage) {}
            override fun success() {
                onSuccess(outputs)
            }

            override fun cancel() {}
            override fun failed() {
                onError()
            }
        })

And here is the queries output:

-y
-loop
1
-i
IMAGE#1PATH
-i
AUDIO#1PATH
-shortest
-c:a
copy
-preset
ultrafast
VIDEO#1PATH
-y
-loop
1
-i
IMAGE#2PATH
-i
AUDIO#2PATH
-shortest
-c:a
copy
-preset
ultrafast
VIDEO#2PATH
-y
-loop
1
-i
IMAGE#3PATH
-i
AUDIO#3PATH
-shortest
-c:a
copy
-preset
ultrafast
VIDEO#3PATH

I got 3 videos as output but they are the same as each other (all 3 videos got image#1 and audio#1 paths)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions