From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id EE7A94D240 for ; Tue, 18 Feb 2025 16:43:48 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5C8F668BFBD; Tue, 18 Feb 2025 18:43:45 +0200 (EET) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E4B1368B870 for ; Tue, 18 Feb 2025 18:43:38 +0200 (EET) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4393dc02b78so38749545e9.3 for ; Tue, 18 Feb 2025 08:43:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739897018; x=1740501818; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Ig5cKiVGnSsp4LAJ4eVIc+xO/eupV43cypD0K+oIKsI=; b=kfqZtT0z/SpweYk9SDWF+zElNmRbmYT7B2RAuQQexTor7Q/OdMm3rBpxA8MEFGcIJU xQkPgqY3l2jp6T+7HUz8Xz/gRN1QBLseQdNjCJFuI54rl1EBJo6PjfTZ/j1GUJRkyLuR pOYOtUmpuRV0uJ0FtFoyf7GB6uTbrgRa5QCuAMRtjbvIPCjf6OXH5v28y1FptxFY2sTY LnKCUOEL5xvy8IaAhltGgUnlYCWYsSFXZjlxqcfkBnM9RsWAA5y3Ye07vYkraQiAG8bB tR29hm9Iu8fGOuvRRQh4jwbC67udDHkwx7WqhXX/o8ll2mQQn6n+iSEnsV047XQ1sBAP mjIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739897018; x=1740501818; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ig5cKiVGnSsp4LAJ4eVIc+xO/eupV43cypD0K+oIKsI=; b=Dty4aJtcpHqlkvvAFglqDJa+99HDLtcw0jGarRKdFnYY9CD9aPZ6L0DGwJv0WGAcxt 2jaoY6sXj7IclrLbXDy2yE5W0bAZ3kW1W4TkpH6yW3tPYXU2VwUdcUEB0gDEv1X9x46k 5DO6oCyTDyDXh0+sVdDXsAhAlh1BKv6Lk/wztqlxsWzjJ0/2DjTSh3HBFu9KNvHNj55a YfiX0MQ5XnDDXgUNLbUyFpYNivmwSvNrIgUcfsw+IJL4KAYnjAE3rTCx2oRd4IjpLorQ LJZJ/LNxE4pUVCGB389vcKTYLbXW2y5NLzNGzNHE4nDFmUXmC6s4EBTK1iHyPFk5Veqa OBoQ== X-Gm-Message-State: AOJu0YwDMxA/c1RcUhT8dOOzvIn6t3VxvLw+aPdiMHGfEa01g+ijW6h5 q/O7+7Mmqd7Zm1Vs38bfMudd4u1RAIaob9jsK223xWdBeMQoYhVNCb5NvHTD X-Gm-Gg: ASbGncvxDotAyfBv7L3RUdxRq0xo+enqf300q0W5SZLQuSxPrBGgJxILy19BtQEQObv bgP3eSR9rb7VthbLvCMJc3RKUayVfvP6aaun2cmxsrlKQzsprK9zhXFmXYRXXbQfm5HbXwzuOAC m6/MOgMMOI6w2xNE/zm2hyeFP1aVEts1IAJt+7LInaQN490JEKJwGepjwyS5ny0CN2KsoRoG3m1 29wieNQcLGEnRON6HBiOMeHTFcTghX5hJzyNJCmeKIzLUpSwARf7drWhm5G+SxYx4BkTZZPCDrb tuXa4xYOLHwp6AAKzGI/ihqyP0oXiPm+JRyW9fCtP+acO7VVtC7pdWUzDMpRPsKmYLH//tfF+Il mjqdraPGGsP5fkAMpmvLwai6vvxQ= X-Google-Smtp-Source: AGHT+IHAy2DW9mh/2MBGpVEkJoHbWwHz3xv40AGAQcbkotsv7sPmQqgERr1o+ogxRDteKNmZb9sWgw== X-Received: by 2002:a05:600c:3ca3:b0:434:a4b3:5ebe with SMTP id 5b1f17b1804b1-4396e75ad2fmr116937075e9.24.1739897017819; Tue, 18 Feb 2025 08:43:37 -0800 (PST) Received: from [192.168.178.30] (p200300cccf3990003d67bffa1f9e6422.dip0.t-ipconnect.de. [2003:cc:cf39:9000:3d67:bffa:1f9e:6422]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43996aa820dsm18175585e9.5.2025.02.18.08.43.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Feb 2025 08:43:37 -0800 (PST) From: epirat07@gmail.com To: FFmpeg development discussions and patches Date: Tue, 18 Feb 2025 17:43:35 +0100 X-Mailer: MailMate (1.14r6065) Message-ID: <1FF1C00A-C644-4D53-875A-80D1FA2CF066@gmail.com> In-Reply-To: <20250218124603.95398-4-ffmpeg@haasn.xyz> References: <20250218124603.95398-1-ffmpeg@haasn.xyz> <20250218124603.95398-4-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH v2 4/4] fftools/ffmpeg_filter: add -dump_filter_graph option X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 18 Feb 2025, at 13:46, Niklas Haas wrote: > From: Niklas Haas > > Debugging option to dump the filter graph after insertion of auto-filters. > Named such to avoid clashing with the existing -dumpgraph option on lavfi > devices. > --- > doc/ffmpeg.texi | 18 ++++++++++++++++++ > fftools/ffmpeg.h | 1 + > fftools/ffmpeg_filter.c | 13 +++++++++++++ > fftools/ffmpeg_opt.c | 4 ++++ > libavfilter/vf_libplacebo.c | 2 +- > 5 files changed, 37 insertions(+), 1 deletion(-) > > diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi > index da6549f043..298c736b47 100644 > --- a/doc/ffmpeg.texi > +++ b/doc/ffmpeg.texi > @@ -2768,6 +2768,24 @@ filter (scale, aresample) in the graph. > On by default, to explicitly disable it you need to specify > @code{-noauto_conversion_filters}. > > +@item -dump_filter_graph > +Print out the fully settled filter graph, after all automatic conversion > +and format restriction filters have been inserted. Accepts a key/value list of > +suboptions to influnce the output. > +@table @option > +@item format > +Choose the output format. Possible values are: > + > +@table @option > +@item none > +Don't print anything. > +@item pretty > +Pretty-print an ASCII art graph. This is the default. > +@item complex > +Print in a format suitable for consumption by @option{-filter_complex}. > +@end table > +@end table > + > @item -bits_per_raw_sample[:@var{stream_specifier}] @var{value} (@emph{output,per-stream}) > Declare the number of bits per raw sample in the given output stream to be > @var{value}. Note that this option sets the information provided to the > diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h > index 6cc0da05a0..d6be3df539 100644 > --- a/fftools/ffmpeg.h > +++ b/fftools/ffmpeg.h > @@ -715,6 +715,7 @@ extern char *filter_nbthreads; > extern int filter_complex_nbthreads; > extern int vstats_version; > extern int auto_conversion_filters; > +extern char *dump_filter_graph; > > extern const AVIOInterruptCB int_cb; > > diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c > index 800e2a3f06..5aa871c8ad 100644 > --- a/fftools/ffmpeg_filter.c > +++ b/fftools/ffmpeg_filter.c > @@ -23,6 +23,7 @@ > #include "ffmpeg.h" > > #include "libavfilter/avfilter.h" > +#include "libavfilter/filters.h" > #include "libavfilter/buffersink.h" > #include "libavfilter/buffersrc.h" > > @@ -1986,6 +1987,18 @@ static int configure_filtergraph(FilterGraph *fg, FilterGraphThread *fgt) > if ((ret = avfilter_graph_config(fgt->graph, NULL)) < 0) > goto fail; > > + /* Print the generated filter graph after insertion of auto filters */ > + if (dump_filter_graph) { > + char *graph = avfilter_graph_dump(fgt->graph, dump_filter_graph); > + if (graph) > + av_log(NULL, AV_LOG_INFO, "%s", graph); > + else > + av_log(NULL, AV_LOG_ERROR, "Failed dumping filtergraph!\n"); > + } > + > + avfilter_inout_free(&inputs); > + avfilter_inout_free(&outputs); > + > fgp->is_meta = graph_is_meta(fgt->graph); > > /* limit the lists of allowed formats to the ones selected, to > diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c > index 3c0c682594..aa8a6508ab 100644 > --- a/fftools/ffmpeg_opt.c > +++ b/fftools/ffmpeg_opt.c > @@ -76,6 +76,7 @@ char *filter_nbthreads; > int filter_complex_nbthreads = 0; > int vstats_version = 2; > int auto_conversion_filters = 1; > +char *dump_filter_graph; > int64_t stats_period = 500000; > > > @@ -1733,6 +1734,9 @@ const OptionDef options[] = { > { "auto_conversion_filters", OPT_TYPE_BOOL, OPT_EXPERT, > { &auto_conversion_filters }, > "enable automatic conversion filters globally" }, > + { "dump_filter_graph", OPT_TYPE_STRING, OPT_EXPERT, > + { &dump_filter_graph }, > + "dump filter graph after insertion of auto-filters" }, > { "stats", OPT_TYPE_BOOL, 0, > { &print_stats }, > "print progress report during encoding", }, > diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c > index e1c6629f6d..20f5c2cf75 100644 > --- a/libavfilter/vf_libplacebo.c > +++ b/libavfilter/vf_libplacebo.c > @@ -1288,7 +1288,7 @@ static const AVOption libplacebo_options[] = { > { "force_divisible_by", "enforce that the output resolution is divisible by a defined integer when force_original_aspect_ratio is used", OFFSET(force_divisible_by), AV_OPT_TYPE_INT, { .i64 = 1 }, 1, 256, STATIC }, > { "normalize_sar", "force SAR normalization to 1:1 by adjusting pos_x/y/w/h", OFFSET(normalize_sar), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, STATIC }, > { "pad_crop_ratio", "ratio between padding and cropping when normalizing SAR (0=pad, 1=crop)", OFFSET(pad_crop_ratio), AV_OPT_TYPE_FLOAT, {.dbl=0.0}, 0.0, 1.0, DYNAMIC }, > - { "fillcolor", "Background fill color", OFFSET(fillcolor), AV_OPT_TYPE_STRING, {.str = "black"}, .flags = DYNAMIC }, > + { "fillcolor", "Background fill color", OFFSET(fillcolor), AV_OPT_TYPE_STRING, {.str = "black@0.0"}, .flags = DYNAMIC }, Seems this is a leftover from your other patch that accidentally got in here. > { "corner_rounding", "Corner rounding radius", OFFSET(corner_rounding), AV_OPT_TYPE_FLOAT, {.dbl = 0.0}, 0.0, 1.0, .flags = DYNAMIC }, > { "extra_opts", "Pass extra libplacebo-specific options using a :-separated list of key=value pairs", OFFSET(extra_opts), AV_OPT_TYPE_DICT, .flags = DYNAMIC }, > > -- > 2.47.0 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".