Changes between Version 14 and Version 15 of Scaling


Ignore:
Timestamp:
Jun 7, 2021, 3:39:26 AM (2 weeks ago)
Author:
Chris Varenc
Comment:

mention the very useful scale2ref filter

Legend:

Unmodified
Added
Removed
Modified
  • Scaling

    v14 v15  
    109109More examples can be found [https://superuser.com/a/1136305/48078 in this Super User answer].
    110110
     111== scale2ref ==
     112If you need to scale one video to match another without pre-defining the dimensions, see the [https://ffmpeg.org/ffmpeg-filters.html#scale2ref scale2ref filter].
     113
     114Two videos are provided for input and output. The 1st input is scaled and the 2nd input is unchanged, but used for reference. For example, to put 2 videos side-by-side and have the 2nd video scale to match the first:
     115
     116{{{
     117ffmpeg -i vid1.mp4 -i vid2.mp4 -filter_complex "[1:v][0:v]scale2ref=oh*mdar:h=in_h:[v1][v0];[v0][v1]hstack[vo]" -map "[vo]" ./output-video.mp4
     118}}}
     119
     120
    111121== Specifying scaling algorithm ==
    112122