From 16302246b1fcb7ad4e6f7bd31c49956a455336d2 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Wed, 29 Apr 2015 17:59:01 +0300 Subject: avconv: Add an option for automatically rotating video according to display matrix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The option is enabled by default, but can be disabled. If this is enabled, such side data isn't copied into the output stream (except when doing stream copy). Signed-off-by: Martin Storsjö --- avconv_opt.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'avconv_opt.c') diff --git a/avconv_opt.c b/avconv_opt.c index 16254299e2..29fc2be6dd 100644 --- a/avconv_opt.c +++ b/avconv_opt.c @@ -488,6 +488,9 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic) ist->ts_scale = 1.0; MATCH_PER_STREAM_OPT(ts_scale, dbl, ist->ts_scale, ic, st); + ist->autorotate = 1; + MATCH_PER_STREAM_OPT(autorotate, i, ist->autorotate, ic, st); + MATCH_PER_STREAM_OPT(codec_tags, str, codec_tag, ic, st); if (codec_tag) { uint32_t tag = strtol(codec_tag, &next, 0); @@ -2372,6 +2375,9 @@ const OptionDef options[] = { { "hwaccel_device", OPT_VIDEO | OPT_STRING | HAS_ARG | OPT_EXPERT | OPT_SPEC | OPT_INPUT, { .off = OFFSET(hwaccel_devices) }, "select a device for HW acceleration" "devicename" }, + { "autorotate", HAS_ARG | OPT_BOOL | OPT_SPEC | + OPT_EXPERT | OPT_INPUT, { .off = OFFSET(autorotate) }, + "automatically insert correct rotate filters" }, /* audio options */ { "aframes", OPT_AUDIO | HAS_ARG | OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_audio_frames }, -- cgit v1.2.3