Aspect Ratio of input Video required to e.g. automatically add correct letterbox/pillarbox when rescaling video
|Reported by:||Pae8uuW5||Owned by:|
|Blocking:||Reproduced by developer:||no|
|Analyzed by developer:||yes|
When converting videos of unknown size and aspect ratio, one needs to know the aspect ratio of the source video to calculate the size of letterbox or pillarbox bars to be added (if any). For source videos with non square pixels, a alone, which is just in_w/in_h, is insufficient. The trivial patch enclosed below adds a new variable "d" (rename as you like) to represent the input sample aspect ratio. With this, one can use a simple chain of a scale and a pad filter to always add correct pillar/letterboxes.