]> git.sesse.net Git - ffmpeg/commitdiff
Add -vf scale example for making pixels square
authorTomas Härdin <tjoppen@acc.umu.se>
Mon, 19 Feb 2018 17:42:25 +0000 (18:42 +0100)
committerTomas Härdin <tjoppen@acc.umu.se>
Wed, 21 Feb 2018 22:38:49 +0000 (23:38 +0100)
This is a common use case.

doc/filters.texi

index bd93e0ab84f390afb89cd18fd5fdf8852879abb0..8a9b78d778b98774cf3c5b40a398986a82bd2c5c 100644 (file)
@@ -13721,6 +13721,19 @@ keeping the same aspect ratio as the input:
 @example
 scale=w='min(500\, iw*3/2):h=-1'
 @end example
+
+@item
+Make pixels square by combining scale and setsar:
+@example
+scale='trunc(ih*dar):ih',setsar=1/1
+@end example
+
+@item
+Make pixels square by combining scale and setsar,
+making sure the resulting resolution is even (required by some codecs):
+@example
+scale='trunc(ih*dar/2)*2:trunc(ih/2)*2',setsar=1/1
+@end example
 @end itemize
 
 @subsection Commands