From 0b511bd9a5487c672fe199ffb2a78a50fc5b2d9f Mon Sep 17 00:00:00 2001 From: Linjie Fu Date: Mon, 8 Jun 2020 16:58:05 +0800 Subject: fftools/ffmpeg_filter: add -autoscale to disable/enable the default scale Currently, ffmpeg inserts scale filter by default in the filter graph to force the whole decoded stream to scale into the same size with the first frame. It's not quite make sense in resolution changing cases if user wants the rawvideo without any scale. Using autoscale/noautoscale as an output option to indicate whether auto inserting the scale filter in the filter graph: -noautoscale or -autoscale 0: disable the default auto scale filter inserting. ffmpeg -y -i input.mp4 out1.yuv -noautoscale out2.yuv -autoscale 0 out3.yuv Update docs. Suggested-by: Mark Thompson Reviewed-by: Nicolas George Signed-off-by: U. Artie Eoff Signed-off-by: Linjie Fu --- fftools/ffmpeg_filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fftools/ffmpeg_filter.c') diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 422e1268e9..4784e8a575 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -470,7 +470,7 @@ static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter, if (ret < 0) return ret; - if (ofilter->width || ofilter->height) { + if ((ofilter->width || ofilter->height) && ofilter->ost->autoscale) { char args[255]; AVFilterContext *filter; AVDictionaryEntry *e = NULL; -- cgit v1.2.3