Someone on IRC asked for a scale that would fit in a given box. This is the answer. I couldn't see it in the existing examples so I thought I would add it. --- doc/filters.texi | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/doc/filters.texi b/doc/filters.texi index dd1f203..56236c6 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -10298,6 +10298,12 @@ keeping the same aspect ratio as the input: @example scale=w='min(500\, iw*3/2):h=-1' @end example + +@item +Scale a video so that it fits within a 720x720 box and correct for aspect ratio: +@example +scale=w=if(gte(dar,1),720,720*dar):h=if(lte(dar,1),720,720/dar) +@end example @end itemize @subsection Commands -- 2.7.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel