I'm trying to scale a landscape video to full screen ratio with black pad around and add a watermark above, running this command :
-i videoInput.MP4
-i watermark-.jpg
-filter_complex
[0:v]scale=720.0:720.0*0.59,pad=720.0:720.0*1.77:(ow-iw)/2:(oh-ih)/2:black[main][1:v]scale=iw*0.56:-1[v1];[main][v1]overlay=0:0
-c:v libx264 -c:a copy -preset ultrafast -y output.mp4
And then I'm getting this error :
[AVFilterGraph @ 0x2825f38a0] Trailing garbage after a filter: scale=iw*0.56:-1[v1];[main][v1]overlay=0:0
[AVFilterGraph @ 0x2825f38a0] Error parsing filterchain '[0:v]scale=720.0:720.0*0.59,pad=720.0:720.0*1.77:(ow-iw)/2:(oh-ih)/2:black[main][1:v]scale=iw*0.56:-1[v1];[main][v1]overlay=0:0'
around: scale=iw*0.56:-1[v1];[main][v1]overlay=0:0
Error initializing complex filters.
Invalid argument
I'm not able to found the error around the filter graph.
Is the filter graph incorrect ? How to fix it ?
You're missing a semi-colon after the pad filter. It should be
pad=720.0:720.0*1.77:(ow-iw)/2:(oh-ih)/2:black[main];