ni_quadra_scale2ref
The ni_quadra_scale2ref filter is to scale (resize) the input video, based on a reference video.
See the ni_quadra_scale filter for available options, ni_quadra_scale2ref supports the same but uses the reference video instead of the main input as a basis. The ni_quadra_scale2ref only supports hardware AVFrames as input and output and only supports limited range YUV.
Parameters
The following are the ni_quadra_scale2ref parameters:
main_w , main_h
The main input video’s width and height
main_a
The same as main_w / main_h.
main_sar
The main input video’s sample aspect ratio
main_dar, mdar
The main input video’s display aspect ratio. Calculated from (main_w / main_h) * main_sar.
main_hsub , main_vsub
The main input video’s horizontal and vertical chroma subsample values. For example, for the pixel format "yuv422p" hsub is 2 and vsub is 1.
main_n, main_t, main_pos
Not Supported
The following example shows how to use a ni_quadra_scale2ref filter.
ffmpeg -c:v h264_ni_quadra_dec -xcoder-params out=hw -i input_1080p.h264 -c:v h264_ni_quadra_dec -xcoder-params out=hw -i input_720p.h264 -filter_complex "[1:v][0:v]ni_quadra_scale2ref=main_w:main_h[scaled][ref]" -map "[scaled]" -c:v h264_ni_quadra_enc out.h264 -map "[ref]" -c:v h264_ni_quadra_enc out_ref.h264