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 E3A2B4DC20 for ; Sat, 1 Mar 2025 22:56:44 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5ACBA68E234; Sun, 2 Mar 2025 00:55:39 +0200 (EET) Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1389668E215 for ; Sun, 2 Mar 2025 00:55:38 +0200 (EET) Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-22334203781so67811635ad.0; Sat, 01 Mar 2025 14:55:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740869736; x=1741474536; 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=BNmwaFemtoaZxTGipVbuNZTs0ssnnY3D2PbS4ZA6PFZXXG2BDWIe49lrTITKIdwB1I bOgTyN7QCuVh3RgasiuiuY1Kz5nBAp86QQ2RcZD/VIrCACIH6em4DcBXwmPeEfocNwBO oLsYsrY3dwzh/QY8b5i5M9DGW4C9x4ExG/p6ZUefYXarpedSnK46jfVHSEd7YQnmm98c +sA4k/guSta7BlTRe/UOmQKRruqDUnxuYlUYIk+QEBw0qGWk1930mHDw1u+ivakes7K6 NahlGT9OMdRpHdg+7ZzfMd8avLKCZw7vFtYVgt9OrQw5HElBShwUUdD42p7hyBQ1RxhL nTVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740869736; x=1741474536; 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=jdbvLWGJXewvKBWLwu0qXlOVfY6PTke7OaLbs0JDW4RritanodK49HjaNwAda1xWyT OCtwUa6PFNjd04NkUVAQ9qNX2+ftX9Aa2BnVjeTLvERnBy9WZLQcia6ZnMYPkRXOUjWK RCalZ7/qfLeyfDXf06CJf7NDpDvE4nuRGJVPD4hAnwVh8xlMGLgh40FtHg8iE37qbWFZ BeElNZbUd38BsgtGtnq/SyeMV9K9dbrVGDwjn2mT+El24yDZ14mjmqQ86wzpDgJE7Wkh 4OIxx8Y1x7TzpGuYIGAHdNL28My8GCvzO0GR66pPxHcwJRqnqTw0olUiCMUbK5UT8qWp xWkQ== X-Forwarded-Encrypted: i=1; AJvYcCWo6oL7yKpUBXqI6YIGqXHc/UHT1djZYEfJgv0kHzYXgZXllZXQJA5aQjiZezsSvbCU4yAWtwkzYjWV6y2dSkTUUl+wRRMNxww=@ffmpeg.org X-Gm-Message-State: AOJu0YxOG98/Nx3hQM/frOKfFQXM/O8Jks/He1vrA5NzGF29DNJICGZG xRR3h/apjZ+Dpv/bWc7NY/lXyNkLjKyYFJi5zPmd3VjmFcxMzIO0kMU7Bg== X-Gm-Gg: ASbGncuH1l02iygF5Cz+ADB2CQfeMz9KAX9OsYY/05bmJJXxqXCxqxmCpQfwvLi+ilR nZximF37qHKpilFYusrm3fI0r7fa477MKj3OfjlGGP4dPmZgUdL0udqMyjH234n1yfOCOyTExsz nvCtF7OmGUOy8dUFmEcs2gnRoVGYBInxSaftGu6MAcpxjIq9ziPY9qWsWTSOgpmPBStPYln0jbz ddgmDyYRND0h3SaLTLdosToQr/aTTS/Mu3Cd4KrVf8SET5bTf53NvXodtJOrFT/2VZIR/652sqZ wKwv8iyQlnfFbYes+GpC17XOQhEUPhKkhhUgjF6hu7epZG7X564DdpMBUHEKS/M= X-Google-Smtp-Source: AGHT+IENM4xYtBuH7Z9cUKyq7YonqEktIhDc/K1V+B18trkumQ5OJO2YAQkE2erEgN/Wgxfhpul3kg== X-Received: by 2002:a17:903:fb0:b0:220:fffc:7296 with SMTP id d9443c01a7336-223674346bfmr117609045ad.6.1740869736369; Sat, 01 Mar 2025 14:55:36 -0800 (PST) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-223504c5b43sm52959315ad.129.2025.03.01.14.55.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Mar 2025 14:55:36 -0800 (PST) From: softworkz X-Google-Original-From: softworkz Message-Id: In-Reply-To: References: Date: Sat, 01 Mar 2025 22:54:51 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v4 7/7] 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: Soft Works , softworkz , Andreas Rheinhardt 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".