Description
With same a filter in a command but I get error on full-gpl:4.3.1.LTS version while it's running on full-gpl:4.2.2.LTS. Please help me!
-filter_complex [0:v]scale=480x480,setsar=sar=1/1,fps=30,format=rgba,trim=duration=8[v0];[1:v]scale=480x480,setsar=sar=1/1,fps=30,format=rgba,zoompan=y='(1-on/(20))*(ih-ih/zoom)':z='if(eq(on,1),2,zoom-0.3)':fps=30:d=28:s=480x480[v1];[2:v]scale=480x480,setsar=sar=1/1,fps=30,format=rgba,zoompan=y='(1-on/(20))*(ih-ih/zoom)':z='if(eq(on,1),2,zoom-0.3)':fps=30:d=28:s=480x480[v2];[3:v]scale=480x480,setsar=sar=1/1,fps=30,format=rgba,zoompan=y='(1-on/(20))*(ih-ih/zoom)':z='if(eq(on,1),2,zoom-0.3)':fps=30:d=28:s=480x480[v3];[4:v]scale=480x480,setsar=sar=1/1,fps=30,format=rgba,zoompan=y='(1-on/(20))*(ih-ih/zoom)':z='if(eq(on,1),2,zoom-0.3)':fps=30:d=28:s=480x480[v4];[5:v]scale=480x480,setsar=sar=1/1,fps=30,format=rgba,zoompan=y='(1-on/(20))*(ih-ih/zoom)':z='if(eq(on,1),2,zoom-0.3)':fps=30:d=28:s=480x480[v5];[6:v]scale=480x480,setsar=sar=1/1,fps=30,format=rgba,zoompan=y='(1-on/(20))*(ih-ih/zoom)':z='if(eq(on,1),2,zoom-0.3)':fps=30:d=28:s=480x480[v6];[7:v]scale=480x480,setsar=sar=1/1,fps=30,format=rgba,zoompan=y='(1-on/(20))*(ih-ih/zoom)':z='if(eq(on,1),2,zoom-0.3)':fps=30:d=28:s=480x480[v7];[8:v]scale=480x480,setsar=sar=1/1,fps=30,format=rgba,zoompan=y='(1-on/(20))*(ih-ih/zoom)':z='if(eq(on,1),2,zoom-0.3)':fps=30:d=28:s=480x480[v8];[9:v]scale=480x480,setsar=sar=1/1,fps=30,format=rgba,zoompan=y='(1-on/(20))*(ih-ih/zoom)':z='if(eq(on,1),2,zoom-0.3)':fps=30:d=28:s=480x480[v9];[10:v]scale=480x480,setsar=sar=1/1,fps=30,format=rgba,zoompan=y='(1-on/(20))*(ih-ih/zoom)':z='if(eq(on,1),2,zoom-0.3)':fps=30:d=28:s=480x480[v10];[11:v]scale=480x480,setsar=sar=1/1,fps=30,format=rgba,zoompan=y='(1-on/(20))*(ih-ih/zoom)':z='if(eq(on,1),2,zoom-0.3)':fps=30:d=28:s=480x480[v11];[12:v]scale=480x480,setsar=sar=1/1,fps=30,format=rgba,zoompan=y='(1-on/(20))*(ih-ih/zoom)':z='if(eq(on,1),2,zoom-0.3)':fps=30:d=28:s=480x480[v12];[13:v]scale=480x480,setsar=sar=1/1,fps=30,format=rgba,zoompan=y='(1-on/(20))*(ih-ih/zoom)':z='if(eq(on,1),2,zoom-0.3)':fps=30:d=28:s=480x480[v13];[14:v]scale=480x480,setsar=sar=1/1,fps=30,format=rgba,zoompan=y='(1-on/(20))*(ih-ih/zoom)':z='if(eq(on,1),2,zoom-0.3)':fps=30:d=28:s=480x480[v14];[15:v]scale=480x480,setsar=sar=1/1,fps=30,format=rgba,zoomp
Logs
E/mobile-ffmpeg: [AVFilterGraph @ 0x8703fd40] No such filter: '1)'
E/mobile-ffmpeg: Error initializing complex filters.
E/mobile-ffmpeg: Invalid argument
Did you try surrounding your command with double quotes? 4.3.1.LTS is the first LTS release that brings support of single/double quotes like desktop ffmpeg.
@tanersener thanks for replying
for example, a my command in Kotlin with the filter value like the first comment.
"$cmdInput -filter_complex ${filter}${concat}concat=n=${totalImage}:v=1:a=0,format=yuv420p[v] -map [v] -r 30 -preset ultrafast -y $resultPath".trimStart()
then run this command with your FFmpeg
FFmpeg.execute(command)
You mean your library treats single quotes like as double quotes now (4.3.1.LTS)?
Sorry, let me correct myself. Can you try surrounding your filter_complex body with double quotes?
"$cmdInput -filter_complex \"${filter}${concat}concat=n=${totalImage}:v=1:a=0,format=yuv420p[v]\" -map [v] -r 30 -preset ultrafast -y $resultPath".trimStart()
This feature was first introduced in 4.3 Main release. 4.3.1.LTS is the first LTS release that includes this change. That's why you're having this issue.
It was added to support space characters in command elements. But it effects other elements as well. If one of your command elements is not parsed right, you can surround it double quotes as it is done in desktop ffmpeg.
@tanersener many thanks, it's working now.
I'm facing with a new issue. On some devices if I select about 30 images to create a video then will get the crash with log:
E/mobile-ffmpeg: Error initializing output stream 27:0 -- Error while opening encoder for output stream #27:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Please help me!
It is a different issue and nobody can guess it from that single line. You need to create a new issue and provide all logs for that execution.
Additionally, I need to remind you that this place is not a help/support forum. You can test different file sets with different sizes yourself and pinpoint the root cause of this error.
@tanersener Very sorry for my lack of professionalism, maybe I was in a hurry. I have checked all the old issues but no one has encountered them yet. I will create a new report with more information, hope your support. Many thanks!
Most helpful comment
Sorry, let me correct myself. Can you try surrounding your filter_complex body with double quotes?
"$cmdInput -filter_complex \"${filter}${concat}concat=n=${totalImage}:v=1:a=0,format=yuv420p[v]\" -map [v] -r 30 -preset ultrafast -y $resultPath".trimStart()This feature was first introduced in
4.3Main release.4.3.1.LTSis the first LTS release that includes this change. That's why you're having this issue.It was added to support space characters in command elements. But it effects other elements as well. If one of your command elements is not parsed right, you can surround it double quotes as it is done in desktop
ffmpeg.