|
|
|
@ -21590,79 +21590,6 @@ Scale a logo to 1/10th the height of a video, while preserving its display aspec |
|
|
|
|
@end example |
|
|
|
|
@end itemize |
|
|
|
|
|
|
|
|
|
@section scale2ref |
|
|
|
|
|
|
|
|
|
Scale (resize) the input video, based on a reference video. |
|
|
|
|
|
|
|
|
|
See the scale filter for available options, scale2ref supports the same but |
|
|
|
|
uses the reference video instead of the main input as basis. scale2ref also |
|
|
|
|
supports the following additional constants for the @option{w} and |
|
|
|
|
@option{h} options: |
|
|
|
|
|
|
|
|
|
@table @var |
|
|
|
|
@item main_w |
|
|
|
|
@item main_h |
|
|
|
|
The main input video's width and height |
|
|
|
|
|
|
|
|
|
@item main_a |
|
|
|
|
The same as @var{main_w} / @var{main_h} |
|
|
|
|
|
|
|
|
|
@item main_sar |
|
|
|
|
The main input video's sample aspect ratio |
|
|
|
|
|
|
|
|
|
@item main_dar, mdar |
|
|
|
|
The main input video's display aspect ratio. Calculated from |
|
|
|
|
@code{(main_w / main_h) * main_sar}. |
|
|
|
|
|
|
|
|
|
@item main_hsub |
|
|
|
|
@item main_vsub |
|
|
|
|
The main input video's horizontal and vertical chroma subsample values. |
|
|
|
|
For example for the pixel format "yuv422p" @var{hsub} is 2 and @var{vsub} |
|
|
|
|
is 1. |
|
|
|
|
|
|
|
|
|
@item main_n |
|
|
|
|
The (sequential) number of the main input frame, starting from 0. |
|
|
|
|
Only available with @code{eval=frame}. |
|
|
|
|
|
|
|
|
|
@item main_t |
|
|
|
|
The presentation timestamp of the main input frame, expressed as a number of |
|
|
|
|
seconds. Only available with @code{eval=frame}. |
|
|
|
|
|
|
|
|
|
@item main_pos |
|
|
|
|
The position (byte offset) of the frame in the main input stream, or NaN if |
|
|
|
|
this information is unavailable and/or meaningless (for example in case of synthetic video). |
|
|
|
|
Only available with @code{eval=frame}. |
|
|
|
|
@end table |
|
|
|
|
|
|
|
|
|
@subsection Examples |
|
|
|
|
|
|
|
|
|
@itemize |
|
|
|
|
@item |
|
|
|
|
Scale a subtitle stream (b) to match the main video (a) in size before overlaying |
|
|
|
|
@example |
|
|
|
|
'scale2ref[b][a];[a][b]overlay' |
|
|
|
|
@end example |
|
|
|
|
|
|
|
|
|
@item |
|
|
|
|
Scale a logo to 1/10th the height of a video, while preserving its display aspect ratio. |
|
|
|
|
@example |
|
|
|
|
[logo-in][video-in]scale2ref=w=oh*mdar:h=ih/10[logo-out][video-out] |
|
|
|
|
@end example |
|
|
|
|
@end itemize |
|
|
|
|
|
|
|
|
|
@subsection Commands |
|
|
|
|
|
|
|
|
|
This filter supports the following commands: |
|
|
|
|
@table @option |
|
|
|
|
@item width, w |
|
|
|
|
@item height, h |
|
|
|
|
Set the output video dimension expression. |
|
|
|
|
The command accepts the same syntax of the corresponding option. |
|
|
|
|
|
|
|
|
|
If the specified expression is not valid, it is kept at its current |
|
|
|
|
value. |
|
|
|
|
@end table |
|
|
|
|
|
|
|
|
|
@section scale2ref_npp |
|
|
|
|
|
|
|
|
|
Use the NVIDIA Performance Primitives (libnpp) to scale (resize) the input |
|
|
|
|