In a Windows batch file, is it possible to define a constant when using a filter or when chaining filters? E.g. to pad a video with 15 pixels, I can use:

  • -filter_complex "[0:v:0] pad= iw+30 : ih+30 : 15 : 15 : cyan [pv]"

Is it possible to define `p=15` somewhere in order to use the more flexible filter:

  • -filter_complex "[0:v:0] pad= iw+2*p : ih+2*p : p : p : cyan [pv]"

1 Reply 1

Only as an environment-variable:

SET p=15

ffmpeg etc -filter_complex "[0:v:0] pad= iw+(2*%p%) : ih+(2*%p%) : %p% : %p% : cyan [pv]"

...not exactly easier to read, though.

Your Reply

By clicking “Post Your Reply”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.