I have 3 complex filters and can't figure how do i make it in one command to work:

  1. Random text position ffmpeg -i video.mp4 -vf drawtext=\"fontsize=40:fontfile=FreeSerif.ttf:fontcolor={color}:text='{watermarkText}':x=if(eq(mod(n\\,20)\\,0)\\,rand(0\\,(w-text_w))\\,x):y=if(eq(mod(n\\,20)\\,0)\\,rand(0\\,(h-text_h))\\,y)\" -c:a copy {outputFile}

  2. Logo opacity ffmpeg -i video.mp4 -i pog.png -filter_complex "[1:v]format=argb,geq=r='r(X,Y)':a='0.1*alpha(X,Y)'[zork]; [0:v][zork]overlay" {outputFile}

  3. Logo scaling ffmpeg -i video.mp4 -i pog.png -filter_complex "[1][0]scale2ref=w='iw*10/100':h='ow/mdar'[wm][vid];[vid][wm]overlay=10:10" video1.mp4

Is it even possible to make it as one working command?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.