Reputation: 543
Using ffmpeg version 4.3.2.
Command:
ffmpeg -y
-i /usr/src/app/backgrounds/pink-blue.jpg
-i files/fuzzy-octopus-5/path/file.webm
-i files/fuzzy-octopus-5/path/file.webm
-i /usr/src/app/logo.png
-filter_complex "
[0]drawbox=x=-140:y=(((H-th)/2) - 205):w=840:h=490:[email protected]:t=fill,
drawbox=x=770:y=(((H-th)/2) - 205):w=840:h=490:[email protected]:t=fill[bg];
...
However I am getting the following errors?
Error while processing the decoded data for stream #3:0
Failed to inject frame into filter network: Invalid argument
Error reinitializing filters!
[Parsed_drawbox_0 @ 0x564a87058e80] Failed to configure input pad on Parsed_drawbox_0
[Parsed_drawbox_0 @ 0x564a87058e80] Error when evaluating the expression '(((H-th)/2) - 205)'.
Last message repeated 5 times
[Parsed_drawbox_0 @ 0x564a87058e80] [Eval @ 0x7ffcf25dc650] Undefined constant or missing '(' in 'H-th)/2)-205)'
I have the right amount of brackets and this definitely works on my local machine (macOS). It's only throwing this error in our deployed AWS EC2 linux instance.
Any ideas? Thanks!
Update: Tried replacing th
with h
but get the same error
Upvotes: 0
Views: 494
Reputation: 134013
You're using arbitrary, unsupported variables. Refer to the drawbox documentation for a list of supported variables (under the section "The parameters for x, y, w and h and t are expressions containing the following constants").
I can only guess what you are trying to do, but here is a simplified valid example:
ffmpeg -i input.mp4 -filter_complex "[0]drawbox=x=-140:y=(((ih-h)/2) - 205):w=840:h=490:[email protected]:t=fill" output.mp4
Upvotes: 1