summaryrefslogtreecommitdiff
path: root/avconv_opt.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2015-04-29 17:59:01 +0300
committerMartin Storsjö <martin@martin.st>2015-05-02 22:09:06 +0300
commit16302246b1fcb7ad4e6f7bd31c49956a455336d2 (patch)
treec5c5a29b3f25d02b7e56cf0aa2bc679a07ac5d2d /avconv_opt.c
parente2d50fc2f5f3600e13055acf1a10fec35e941f37 (diff)
avconv: Add an option for automatically rotating video according to display matrix
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ö <martin@martin.st>
Diffstat (limited to 'avconv_opt.c')
-rw-r--r--avconv_opt.c6
1 files changed, 6 insertions, 0 deletions
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 },