Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run multiple commands #58

Open
MohammadRezaei92 opened this issue Apr 2, 2024 · 0 comments
Open

Run multiple commands #58

MohammadRezaei92 opened this issue Apr 2, 2024 · 0 comments

Comments

@MohammadRezaei92
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant