It blew my mind when I recently came across something new about FFmpeg despite having used it for years - the fact that it comes out of the box with advanced conditionals like if statements and lt/gt for filters. To me this has to be its most underrated feature, or at least it would be if the documentation mentioned anything about them and how they worked.
I want to take advantage of them in my FFmpeg scripts to upscale videos intelligently based on their height: if a video's height is less than 720 pixels, to upscale it to -1:720 (that is, a height of 720 and a proportional width that maintains its aspect ratio), and to leave it unchanged if it's 720 pixels or greater. What would a scale filter to do this with if and lt/gt look like?
iwandihare input widht and input height for thescalefilter, but I don't see how people know this on a quick scan of the documentation. Admittedly, I have not read the docs "cover to cover" – Yorik Sep 02 '21 at 18:28padfilter worries me because I'm not sure from slhck's wording in what situation the padding is actually applied, and it sounds like it will end up either padding or cropping my videos. – Hashim Aziz Sep 02 '21 at 18:35ifandltand whether they would make for a simpler command. – Hashim Aziz Sep 02 '21 at 18:50