From: softworkz <softwo...@hotmail.com> Enables filtergraph printing and adds the options to the docs
Signed-off-by: softworkz <softwo...@hotmail.com> --- doc/ffmpeg.texi | 10 ++++++++++ fftools/ffmpeg.c | 4 ++++ fftools/ffmpeg_filter.c | 5 +++++ 3 files changed, 19 insertions(+) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index da6549f043..6398b4ed92 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -1388,6 +1388,16 @@ It is on by default, to explicitly disable it you need to specify @code{-nostats @item -stats_period @var{time} (@emph{global}) Set period at which encoding progress/statistics are updated. Default is 0.5 seconds. +@item -print_graphs (@emph{global}) +Prints filtergraph details to stderr in the format set via -print_graphs_format. + +@item -print_graphs_file @var{filename} (@emph{global}) +Writes filtergraph details to the specified file in the format set via -print_graphs_format. + +@item -print_graphs_format @var{format} (@emph{global}) +Sets the output printing format (available formats are: default, compact, csv, flat, ini, json, xml) +The default format is json. + @item -progress @var{url} (@emph{global}) Send program-friendly progress information to @var{url}. diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index dc321fb4a2..b4bc76d788 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -81,6 +81,7 @@ #include "ffmpeg.h" #include "ffmpeg_sched.h" #include "ffmpeg_utils.h" +#include "ffmpeg_graphprint.h" const char program_name[] = "ffmpeg"; const int program_birth_year = 2000; @@ -308,6 +309,9 @@ const AVIOInterruptCB int_cb = { decode_interrupt_cb, NULL }; static void ffmpeg_cleanup(int ret) { + if (print_graphs || print_graphs_file) + print_filtergraphs(filtergraphs, nb_filtergraphs, output_files, nb_output_files); + if (do_benchmark) { int64_t maxrss = getmaxrss() / 1024; av_log(NULL, AV_LOG_INFO, "bench: maxrss=%"PRId64"KiB\n", maxrss); diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 6de4e87ade..7198416ae9 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -22,6 +22,7 @@ #include "ffmpeg.h" #include "ffmpeg_filter.h" +#include "ffmpeg_graphprint.h" #include "libavfilter/avfilter.h" #include "libavfilter/buffersink.h" @@ -2970,6 +2971,10 @@ read_frames: } finish: + + if (print_graphs || print_graphs_file) + print_filtergraph(fg, fgt.graph); + // EOF is normal termination if (ret == AVERROR_EOF) ret = 0; -- ffmpeg-codebot _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".