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 DBB2E4C30B for ; Sat, 8 Mar 2025 17:57:11 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CD2ED68E75B; Sat, 8 Mar 2025 19:56:23 +0200 (EET) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3FDC168E721 for ; Sat, 8 Mar 2025 19:56:22 +0200 (EET) Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-223f4c06e9fso50785095ad.1 for ; Sat, 08 Mar 2025 09:56:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741456580; x=1742061380; darn=ffmpeg.org; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date :references:in-reply-to:message-id:from:from:to:cc:subject:date :message-id:reply-to; bh=7eRX6zRim3zdHypOnsYMvOtNAsrtyg9kyiBO0lxAryI=; b=cn5y8anThR2hB3Ofv5BZ1r2GpI8HX1EpqUP0VTKCDVeKzDObpXcujOXHqiJTcRmSNf xWFWOA6NlvQ41QyUMxwSrHQ3frQWw1ZQBxfBXW38+uZnCbtt3+HSlhzaAx8D1TSqY32U +a8XqMOivCdepWaOLakP7VkG6Pz2pXEcAkSycy9Y+IyXPtnw4Un7WUZ2N5Bi9GHLbDHV XwCjyazxGf6HWKNFg1t+wtnvIC7HgC9wTYXmuIPqKTtFBbcaZ7fO1uoe8Bt9DkwRb0z+ GsWRevZpApISHdk/6bNyHN8eYPFIOC042Nmib1SLNadYuQkd4fvssbBVBECNaQBiwq+8 vXHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741456580; x=1742061380; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date :references:in-reply-to:message-id:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=7eRX6zRim3zdHypOnsYMvOtNAsrtyg9kyiBO0lxAryI=; b=W1fxtPHzTYhYNZMIoTqa/SBudPshUCQiGQSPrNNUM1g/VuiiABDtIQ0ta7KwfG/W1K fLXMc2HEvSybXVpt7lBcNsVqI6YH6gq5TFewJogdq3VgK0Q+riiVEYwXbZL9+DTkRAUY y+s3VujhxqC2sJob3GvMN69OyMX1JcEKvoQQDEMqBURRaLVoNI6G7CW3WEgRXvFQrKhm WTgfE66lCU2qrPzvFrz9rz3ufwCYwhatM00Pi8yrkJrgR94fmoICZD6xHn3CpObQ1VjN P9rBg7reZRcA3fphkkQ1xpEeXk5SDGxE8etka2vTCiFbDQaUrCy/9GxYtt8/LHEYIFj2 QVJQ== X-Gm-Message-State: AOJu0YzHWXxhRNLgeVCC+ZOn9VEgPxzIwj2XrRX6dj4+jdyoM4+UPaKc QJ8jnNq9C4A8eivMHuSB4FOIpx1mxE/AOTWgi2eEu2CW6PEycf3YYxAt2mI0 X-Gm-Gg: ASbGncv/nYvUbOfbXQ1X5VYZRG5exbfPpvr7VIg4Fzw9v17cKtCckLitwCIAZ4GJevr bII3rs0Ji69VoTTEEmGZDeuokyJro0R8yKY+cin6/VYf2WF8m+JysSnykzq+OGJ+evk8VZ8G7bw U1JEFRgz2+57UUsC+hLKc14I5QLuGp0efi3HAZFwc8wjqeDgM1/WMKjXIKtEiA6ABe52HmOT41x pf1KuCNhKf6H9P82+Mc14lKjNC3BJtS0A65f3pYThCo4/iwdaD8Zo6BTGC1cG6PG903Bqi6DEa8 l05k62/GBsLfjsTrIgnzMWJQP23gWXo1p2qGVue51niojRXVBgQUPj0/PTFe1Gk= X-Google-Smtp-Source: AGHT+IHrmQjCHwNQE2eeNdGwEB249wUyz13aaPbsDh2AVeKbKVKTimXa1pjTCbHKdxwBFO1vtw1jSg== X-Received: by 2002:a17:902:eccd:b0:223:517a:d4ed with SMTP id d9443c01a7336-2246450b581mr51963135ad.15.1741456580482; Sat, 08 Mar 2025 09:56:20 -0800 (PST) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-224109e9fe2sm49300075ad.94.2025.03.08.09.56.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Mar 2025 09:56:20 -0800 (PST) From: softworkz X-Google-Original-From: softworkz Message-Id: <03663768dd212cb0bec245f616f31e464ad3a700.1741456535.git.ffmpegagent@gmail.com> In-Reply-To: References: Date: Sat, 08 Mar 2025 17:55:34 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v5 7/8] fftools: Enable filtergraph printing and update docs 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 Cc: softworkz 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: From: softworkz Enables filtergraph printing and adds the options to the docs Signed-off-by: softworkz --- 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 fca220a334..0f1a253183 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-request@ffmpeg.org with subject "unsubscribe".