Changes between Version 6 and Version 7 of Scaling (resizing) with ffmpeg


Ignore:
Timestamp:
Jul 15, 2016, 10:59:07 PM (16 months ago)
Author:
thebombzen
Comment:

added force_original_aspect_ratio documentation

Legend:

Unmodified
Added
Removed
Modified
  • Scaling (resizing) with ffmpeg

    v6 v7  
    5656-vf scale=-1:240 
    5757}}} 
     58 
     59However, you can also achieve this with the force_original_aspect_ratio option. From the documentation: 
     60 
     61    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. 
     62 
     63This allows you to force the image to fit into a 320x240 box: 
     64 
     65{{{ 
     66ffmpeg -i input.jpg -vf scale=w=320:h=240:force_original_aspect_ratio=decrease output_320.png 
     67}}} 
     68 
     69This produces our 320x207 image that we had seen before: 
     70 
     71[[Image(output_320.png)]] 
     72 
     73