Changes between Version 44 and Version 45 of Scaling


Ignore:
Timestamp:
May 4, 2024, 10:35:16 PM (2 years ago)
Author:
MasterQuestionable
Comment:

Clean-up.

Legend:

Unmodified
Added
Removed
Modified
  • Scaling

    v44 v45  
    1919'''Warning:'''
    2020* https://trac.ffmpeg.org/ticket/10993
    21 * When using `-filter_complex`/`-lavfi`, the default scaling flags are not applied, so the default algorithm is not `bicubic`, but `bilinear`. To achieve the same results for complex filter chains, you have to explicitly set the scaling algorithm via the `flags=bicubic` option. That was fixed in 9f14396a5103ec80893db801035ece5d14c0d3c5.
    22 * In some cases, FFmpeg will set the Sample Aspect Ratio to compensate for the ratio change. You have to manually set the SAR value to 1:1 to make the players display it in the way you want. For example:
    23 {{{
    24 ffmpeg -i input.mp4 -vf scale=320:240,setsar=1:1 output.mp4
    25 }}}
    26   The above example is highly misleading because `setsar=1:1` is equivalent to `setsar=r=1:max=1`. In this special case it accidentally gives the correct result SAR=1:1, but for example `setsar=2:3` would give the wrong result SAR=2:1. The correct syntax for SAR=2:3 is `setsar=2/3`, or `setsar=1` for the above example.
     21* When using "-lavfi" ("-filter_complex"):\\
     22  The default scaling flags wouldn't be applied, so the default scaling algorithm would be "bilinear" instead of "bicubic".\\
     23  To achieve the same: specifying the algorithm via "flags=bicubic" alike.\\
     24  The default algorithm during when has changed to "bicubic" since 9f14396a5103ec80893db801035ece5d14c0d3c5.
     25* In some cases, FFmpeg may set the Sample Aspect Ratio to compensate for ratio change.\\
     26  Expressly state SAR 1:1 to make things work intended.\\
     27  E.g.
     28{{{#!shell
     29ffmpeg -i "${In}" -vf "scale=320:240,setsar=1:1" "${Out}"
     30}}}
     31  Note above highly misleading, for "[https://ffmpeg.org/ffmpeg-filters.html#setdar_002c-setsar setsar]=1:1" actually means "setsar=r=1:max=1":\\
     32  Which happened to achieve the desired SAR 1:1.\\
     33  For "setsar=2:3" alike it shall give the wrong SAR 2:1, or else.\\
     34  Correct syntax for SAR 2:3 is "setsar=2/3"; or "setsar=1" for 1:1.
    2735
    2836* When going from BGR (not RGB) to yuv420p the conversion may be off-by-1. Use "-sws_flags +accurate_rnd" alike to avoid.