summaryrefslogtreecommitdiff
path: root/fftools/ffmpeg_filter.c
diff options
context:
space:
mode:
authorLinjie Fu <linjie.fu@intel.com>2020-06-08 16:58:05 +0800
committerLinjie Fu <linjie.fu@intel.com>2020-06-18 16:31:09 +0800
commit0b511bd9a5487c672fe199ffb2a78a50fc5b2d9f (patch)
tree0172a1ed2c537b1e84544c86d0973b3d8790f5ee /fftools/ffmpeg_filter.c
parenta37109d55574a3c388f3e65610244d10dac8dd59 (diff)
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 <sw@jkqxz.net> Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Diffstat (limited to 'fftools/ffmpeg_filter.c')
-rw-r--r--fftools/ffmpeg_filter.c2
1 files changed, 1 insertions, 1 deletions
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;