diff mbox

[FFmpeg-devel] Add -vf scale example for making pixels square

Message ID 1519062311.30136.1.camel@acc.umu.se
State New
Headers show

Commit Message

Tomas Härdin Feb. 19, 2018, 5:45 p.m. UTC

Comments

Michael Niedermayer Feb. 20, 2018, 1:35 a.m. UTC | #1
On Mon, Feb 19, 2018 at 06:45:11PM +0100, Tomas Härdin wrote:
> 

>  filters.texi |   13 +++++++++++++
>  1 file changed, 13 insertions(+)
> af8d1d10b307cc4123fda3f8a0d5cd3c9e86b7d7  0001-Add-vf-scale-example-for-making-pixels-square.patch
> From 9605df7c8402fb8d5fdbb55ae05639338a1ae0a1 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <tjoppen@acc.umu.se>
> Date: Mon, 19 Feb 2018 18:42:25 +0100
> Subject: [PATCH] Add -vf scale example for making pixels square
> 
> This is a common use case.
> ---
>  doc/filters.texi | 13 +++++++++++++
>  1 file changed, 13 insertions(+)

should be ok

thx

[...]
Tomas Härdin Feb. 21, 2018, 10:42 p.m. UTC | #2
tis 2018-02-20 klockan 02:35 +0100 skrev Michael Niedermayer:
> On Mon, Feb 19, 2018 at 06:45:11PM +0100, Tomas Härdin wrote:
> > 
> >  filters.texi |   13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> > af8d1d10b307cc4123fda3f8a0d5cd3c9e86b7d7  0001-Add-vf-scale-
> > example-for-making-pixels-square.patch
> > From 9605df7c8402fb8d5fdbb55ae05639338a1ae0a1 Mon Sep 17 00:00:00
> > 2001
> > From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <tjoppen@acc.umu.se>
> > Date: Mon, 19 Feb 2018 18:42:25 +0100
> > Subject: [PATCH] Add -vf scale example for making pixels square
> > 
> > This is a common use case.
> > ---
> >  doc/filters.texi | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> 
> should be ok
> 
> thx

pushed

/Tomas
diff mbox

Patch

From 9605df7c8402fb8d5fdbb55ae05639338a1ae0a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <tjoppen@acc.umu.se>
Date: Mon, 19 Feb 2018 18:42:25 +0100
Subject: [PATCH] Add -vf scale example for making pixels square

This is a common use case.
---
 doc/filters.texi | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/doc/filters.texi b/doc/filters.texi
index bd93e0ab84..8a9b78d778 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -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
-- 
2.11.0