@@ -735,6 +735,10 @@ Technical note -- attachments are implemented as codec extradata, so this
option can actually be used to extract extradata from any stream, not just
attachments.
+@item -dump_filtergraph (@emph{global})
+Dump filter graph to stderr. It is off by default, the option is mostly useful
+for debugging filter graph purposes
+
@item -noautorotate
Disable automatically rotating video based on file metadata.
@@ -606,6 +606,7 @@ extern AVIOContext *progress_avio;
extern float max_error_rate;
extern char *videotoolbox_pixfmt;
+extern int dump_filtergraph;
extern int filter_nbthreads;
extern int filter_complex_nbthreads;
extern int vstats_version;
@@ -1106,6 +1106,13 @@ int configure_filtergraph(FilterGraph *fg)
if ((ret = avfilter_graph_config(fg->graph, NULL)) < 0)
goto fail;
+ if (dump_filtergraph) {
+ char *dump = avfilter_graph_dump(fg->graph, NULL);
+ fputs(dump, stderr);
+ fflush(stderr);
+ av_free(dump);
+ }
+
/* limit the lists of allowed formats to the ones selected, to
* make sure they stay the same if the filtergraph is reconfigured later */
for (i = 0; i < fg->nb_outputs; i++) {
@@ -161,6 +161,7 @@ int copy_ts = 0;
int start_at_zero = 0;
int copy_tb = -1;
int debug_ts = 0;
+int dump_filtergraph = 0;
int exit_on_error = 0;
int abort_on_flags = 0;
int print_stats = -1;
@@ -3548,6 +3549,8 @@ const OptionDef options[] = {
{ "dump_attachment", HAS_ARG | OPT_STRING | OPT_SPEC |
OPT_EXPERT | OPT_INPUT, { .off = OFFSET(dump_attachment) },
"extract an attachment into a file", "filename" },
+ { "dump_filtergraph", OPT_BOOL, { &dump_filtergraph },
+ "dump filter graph to stderr" },
{ "stream_loop", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_INPUT |
OPT_OFFSET, { .off = OFFSET(loop) }, "set number of times input stream shall be looped", "loop count" },
{ "debug_ts", OPT_BOOL | OPT_EXPERT, { &debug_ts },