Changes between Version 12 and Version 13 of Scaling
- Timestamp:
- Nov 8, 2020, 10:21:43 AM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Scaling
v12 v13 6 6 }}} 7 7 8 In all the examples, the starting image (input.jpg) will be this one (535 ⨉346 pixels):8 In all the examples, the starting image (input.jpg) will be this one (535×346 pixels): 9 9 10 10 [[Image(input.jpg)]] … … 12 12 == Simple Rescaling == 13 13 14 If you need to simply resize your video to a specific size (e.g 320 ⨉240), you can use the scale filter in its most basic form:14 If you need to simply resize your video to a specific size (e.g 320×240), you can use the scale filter in its most basic form: 15 15 {{{ 16 16 ffmpeg -i input.avi -vf scale=320:240 output.avi … … 34 34 }}} 35 35 36 will set the width of the output image to 320 pixels and will calculate the height of the output image according to the aspect ratio of the input image. The resulting image will have a dimension of 320 ⨉207 pixels.36 will set the width of the output image to 320 pixels and will calculate the height of the output image according to the aspect ratio of the input image. The resulting image will have a dimension of 320×207 pixels. 37 37 38 38 [[Image(output_320.png)]] … … 44 44 }}} 45 45 46 The output will now be 320 ⨉206 pixels.46 The output will now be 320×206 pixels. 47 47 48 48 == Using Variables == … … 86 86 * `increase`: The output video dimensions will automatically be increased if needed. 87 87 88 This allows you to force the image to fit into a 320 x240 box, downscaling it with the correct aspect ratio:88 This allows you to force the image to fit into a 320×240 box, downscaling it with the correct aspect ratio: 89 89 90 90 {{{ … … 92 92 }}} 93 93 94 This produces our 320 x207 image that we had seen before.94 This produces our 320×207 image that we had seen before. 95 95 96 96 [[Image(output_320.png)]]
