[FFmpeg-user] scale video filter and force_original_aspect_ratio option

James Darnley james.darnley at gmail.com
Fri Nov 29 23:54:05 CET 2013


On 2013-11-28 21:06, Lou wrote:
> On Wed, Nov 27, 2013, at 01:05 PM, James Darnley wrote:
>> Does the force_original_aspect_ratio option of the scale filter work as
>> described in the online docs?
>>
>>> One useful instance of this option is that when you know a specific
>>> device’s maximum allowed resolution, you can use this to limit the
>>> output video to that, while retaining the aspect ratio. For example,
>>> device A allows 1280x720 playback, and your video is 1920x800. Using
>>> this option (set it to decrease) and specifying 1280x720 to the
>>> command line makes the output 1280x533.
>>
>> I read that to be "If and only if the video is larger than the size you
>> set it will be scaled to fit within the size you set."  Is that reading
>> wrong?  I've been trying to get it to work when encoding a random set of
>> files, some smaller and some larger, than what I want but all are
>> resized to fit.
> 
> Also:
> 
>   ‘force_original_aspect_ratio’
>    Enable decreasing or increasing output video width or height if
>    necessary to keep the original aspect ratio.
> 
> Keywords "if necessary" seem to imply that smaller sized inputs will not
> be increased when decrease is used, but the docs do not indicate what
> occurs in this case.

It is slightly reassuring that it wasn't just me that read it like this.

I went on to do a little further experimenting.

> In my example below we can clearly see that a video of 704x576 is
> resized up to 880x720 when I requested 1280x720 with
> force_original_aspect_ratio=decrease

After trying the increase value I now see what it does.  With increase I
get 1280x1047.  It now fits the larger dimension.

> I read that to be "If and only if the video is larger than the size you
> set it will be scaled to fit within the size you set."  Is that reading
> wrong?

So yes this reading is wrong.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 683 bytes
Desc: OpenPGP digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20131129/2f9adcef/attachment.asc>


More information about the ffmpeg-user mailing list