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 13BB24E15D for ; Sat, 8 Mar 2025 20:18:20 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9D45D68E7AF; Sat, 8 Mar 2025 22:17:23 +0200 (EET) Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7D75468E7A8 for ; Sat, 8 Mar 2025 22:17:21 +0200 (EET) Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-22403cbb47fso56517655ad.0 for ; Sat, 08 Mar 2025 12:17:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741465040; x=1742069840; 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=DaFRUAHPjb2lZhTYZIe0/aKmXjmEQwBMRO/3n72x98oxYPSoy51rbU1lFtxZROAVan izirfmZu0W2ORnthM3J0MhApIPfRbBbQCl8LhBj8JTG77bTwabUjcRWPtvNP3+Zb8FZq XbXnoxwolg5ZY4AG8MFpqR9+ssrTEwER70f9k1NDXbj0srXOLSsnW15MWZaGStlQicL5 rx13TyLMSwyTRGoqrsayvI8y5ffjTdv5hyM2aGUijm0AydJbJi9/j7M8DhnDTjoU5Mnf TbiLNaSa7EpQhMn3N3l4/8lT03nw7fL8orECE/rcE4c0nvj09gWnUtRSy+w+Kssl8UYA zgnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741465040; x=1742069840; 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=OlaulpLOFL1tq0GJWm3rQmM1H7avYAiW2GeBvksH3Fr0F08h7EelIZQT15qIDDFSsW Y6OSp6njJS/+1aop2C/fOnhnFoSgv1yJb+WltyNPRuAHXFHkU6mXh5tUIVrCsRXD3xKk d0F8eOplwn4mucN07ipJ8PcDYMI6vo28CzImrmlzICxTouBvZIsiQWRIqMnRwExkqxNm imIXC8n/mSy00emII7i2SAMgT/3FvK//cT5S5MyKrWBYQUDU0hOljvqefr/X06pd/hOE W2zys82GmH6DTLrSbBbfVQAE3LTDOeGvr6lFCy3OiFgK70gsLnFugGb4wJfvQClD6qB6 WDBQ== X-Gm-Message-State: AOJu0Yz6BTObypHioqSYlqpps+4dX0FTyfxBdcaSFG0Fr4eVUSuHQgns NN2mEf4aXlTTPHKcvwwQ0hfbsOSr0NBDvp1Am6uDcwEXvDI9deRrJHXdljqQ X-Gm-Gg: ASbGnctcRed228EtbAYhBPFU5l0rT5wp/3oi2E7G/vwTd34b5s0Vo3OOF6YvMTkdTAs +X8XpvNvy8NtIYfhzCsKwOpHagPpuCRlBw43aONDzWjxNEQNbRpOtckclfOdpWoxjtvP6DWwoex b1vwmTPzjnjmD5GbbyCnhiwcKCpJubtS2Srq72GV2mPx1HOMCbh/Bt2q4NLaTCoYPYVRE0XEP7j o0QE0q001QxBGqkcf+FOCNE3nxD05Ix2sD06QVMpBCMMCm50QWuO5nduvmxMuyrviTmHFbGXyE8 GK8B5JEYfPqlneUIhG+AOP/yZxyo/P0/46XpfFWI/jWU9NQwo1qza7C8eo9N/DM= X-Google-Smtp-Source: AGHT+IE1iXcM/Lhk0GomZtBJXvghtigJWkWhWN3xTSYWuCjt2flCzLhAADPveBwEt21lGymm7CP5GQ== X-Received: by 2002:a05:6a21:164a:b0:1f5:60fb:8d9 with SMTP id adf61e73a8af0-1f560fb098fmr3361223637.33.1741465039595; Sat, 08 Mar 2025 12:17:19 -0800 (PST) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af287434048sm3896005a12.27.2025.03.08.12.17.19 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Mar 2025 12:17:19 -0800 (PST) From: softworkz X-Google-Original-From: softworkz Message-Id: <03663768dd212cb0bec245f616f31e464ad3a700.1741464994.git.ffmpegagent@gmail.com> In-Reply-To: References: Date: Sat, 08 Mar 2025 20:16:33 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v6 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".