I am using BravoBit dependency to execute ffmpeg commands in Android. Below is the dependency
implementation 'nl.bravobit:android-ffmpeg:1.1.5' It takes a String[] commands to execute the ffmpeg commands. But I am not able to figure out how to pass complex commands in the array format. I keep getting invalid arguments error whenever I try to execute my commands. Below is one of the commands I am trying to use.
String[] cmd = new String[]{"-i", uri, "-i",overlayUri , "-filter_complex","[0:v]setpts=PTS-STARTPTS", "scale=1920x1080[top]","[1:v]loop=-1:size=750","setpts=N/FRAME_RATE/TB","scale=1920x1080","format=yuva420p", "colorchannelmixer=aa=0.5[bottom]" , "[top][bottom]overlay=shortest=1, format=yuv420p", outputPath}; Here uri,overlayUri are the input and overlay file path and outputPath is the path for output file.
The error that I got
[NULL @ 0xf6d44e00] Unable to find a suitable output format for '[1:v]loop=-1:size=750' [1:v]loop=-1:size=750: Invalid argument
"-filter_complex"and beforeoutputPathgoes as a single string. Don't forget the;separators where necessary