Zend certified PHP/Magento developer

Getting original height after a crop filter, chaining filters

I am having a bit of trouble with my FFMPEG command, what I require is to grab the 2 pixels at the 20% from the bottom, then scale that up to fill out everything from that to the bottom.

I’m using ffmpeg version 4.2.7-0ubuntu0.1

I was originally doing this by exporting twice (once to create the overlay and then to put it on top of the original) but that has become to inefficient.

But have got it down to work in one export

My current command is:

ffmpeg -i "input.mp4" -filter_complex "
[0:v]crop=iw:2:0:ih*0.8[cropped];
[cropped]scale=iw:538,setsar=1:1[bot];
[0:v][bot]overlay=0:H-(H*0.2)" 
"output.mp4"

as you can see in the crop filter I do get the 2 pixels and then pipe that into the scale filter, then at the end apply the cropped and scaled part on top of the original video.

I can set the iw as that has not changed from the original width, but the 538 is what bothers me with this.

This is where I am not able to use ih*0.2 because the value of ih is being taken from the crop filter which is 2px.

I have tried using multiple inputs to the scale filter to get [0:v]’s height, but scale does not accept multiple inputs.

I got suggested set= and expr= for making variables inside ffmpeg, but they all return with errors ( no such filter: ‘set’ & option ‘expr’ not found)

So is there a way to get and use the size of the input file inside of the scale filter(in my case) or in the middle of a filter chain?