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 32CF84D297 for ; Wed, 19 Feb 2025 10:00:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9F14968C17C; Wed, 19 Feb 2025 11:59:44 +0200 (EET) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 645D568C147 for ; Wed, 19 Feb 2025 11:59:36 +0200 (EET) Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-220e989edb6so133234145ad.1 for ; Wed, 19 Feb 2025 01:59:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739959175; x=1740563975; 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=G3xKHbW/w1rWaP1FiY6RhVk/HczYLilUuRYCZaCWHug=; b=QPWwUsqKPj2WqL8PTvWarnP+YNqwU/EsxzeD2gSHlTgUvr2sEUijflGfXDN4TxBNg9 /WvdpOhyrW2Qr+M3M8BKiUs0Ww6pAhtrewUcrjdH+gOUl12TdoK4TDoLI2bPk5QOgxzp xLIE+RVFAisxjGDN/F4zgmRDk20P3s7LKpkwNJbbDWEEpKm1kO7D3RJ+c+sx1V2t2jh6 DPG+rIqlQfivZPYWRFjqR+gwZ+5mZPCVrT9PdK9AU8zUKnEASC2yh254jSLwKyuEoYbo puEgHYbGJLS3o7oF7z2RMWBoJ3TSGdc2oEhUbh4Rj/V6tn2HANGOq17s3vr4/4mhWy+R 9rRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739959175; x=1740563975; 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=G3xKHbW/w1rWaP1FiY6RhVk/HczYLilUuRYCZaCWHug=; b=ek8m+TMP8OEzWM15ib+JH7+7CN5RhyrHgGjVWSrAur9cvFNUI2Z1vyuilhtBYYGrWx IoABb6h32U4gwgnY0c9aVh6naTVqamavggrinkrypuDszO5A0ezzadv9CaEkI7fszboR Ftdpkd1tg8H1mesKv7xh85YWeKISdCoSKW6/edXNVOg2APwtZTck7rex3swCCy6Q2PPC /zTQoo8BEVbv+g9gqMiAFxb2x2WvZW7w38cC40wexWOtT5smjvBcBTOBdqnTp/oSE54i HwpXqqsF1oWWPw5GQaz35AAU7cjsiZrEe3UsY4HoyQL6GLIbeNuPqqkQDF9GMRNpkRj0 GF2Q== X-Gm-Message-State: AOJu0YynLLVNR5/sqhZ/vGGLdCOmzt0v3Tm/8FXeIph3bMPudLo1X/+0 ljBQUFhwxnt5RdCPKnsCr+khAFPQgzF6/WblUtsxLYUGb6cMlpNZNcu7DA== X-Gm-Gg: ASbGncvHdbibWmpP6lchmSgZTwxvDgb0QaV7h99jayRvFQqsU+mLr1M5Ezn0qLStXAs GjW7t3gzgtIZJdJHEkF2aXT93R4hJa/Ih3cg0tQb764+ppl4/ni2UjQcrmAEOyVWvVWBzCOvf7U e7AEtNXCZ/laObmcoNhO8vYCzZj1Z9FmbRT8amRG1BrOeRh33bN3uCF9S1TZ6AGuZ6Zvn+84fLO WnIP8oqdeDOjx9dhNsY1uMgGrQvLl9VltULEKMf2dz3ONIeeoBFRWuZCoqCREc8b9Gg+7FcT439 3gP+3yP9e3sNsVlRVJyySumVdy/ufzn8Fw== X-Google-Smtp-Source: AGHT+IGUaFjCg0D2/566Ja4ikMp2tXMRATK6km0gHqf88Vr5jQyti9Lxxb8g9KV1YXEtAAUk4Di+sA== X-Received: by 2002:a05:6a20:918e:b0:1e4:80a9:3fb8 with SMTP id adf61e73a8af0-1ee8cb5d194mr29220762637.16.1739959174543; Wed, 19 Feb 2025 01:59:34 -0800 (PST) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7324273e30dsm11869273b3a.99.2025.02.19.01.59.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Feb 2025 01:59:34 -0800 (PST) From: softworkz X-Google-Original-From: softworkz Message-Id: <7eea20993cd6606a50fe1e4aa4f34662a98b2ff7.1739959172.git.ffmpegagent@gmail.com> In-Reply-To: References: Date: Wed, 19 Feb 2025 09:59:32 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH 3/3] 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 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-request@ffmpeg.org with subject "unsubscribe".