From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 3643E4B0F7 for <ffmpegdev@gitmailbox.com>; Sat, 1 Mar 2025 10:04:05 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D542F68E099; Sat, 1 Mar 2025 12:02:54 +0200 (EET) Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E3A3468DF8A for <ffmpeg-devel@ffmpeg.org>; Sat, 1 Mar 2025 12:02:52 +0200 (EET) Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-2232aead377so56711405ad.0; Sat, 01 Mar 2025 02:02:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740823371; x=1741428171; 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=HoTuEt9i7KLMjiqcKEb2mM9E6tAT0ptnS11H1RhIaglSEkGido2Q40FAeEtMZJB56a YO7/vLl/NUVf8dOqhTIoH9irxA3axWsUdB2Xxtfp7+TiBlJVynDldB1hI/jiwZTakeK9 j3C4hQXduDEd3YPh4py0CU95R9giga9Vf2AjJdgrllCrt5bY05u9iV+Iyura71joFsgd FaiCG3aausTWUScLcUBam3fEfB+VP9MUxTpQ3CpIV7V79T4K43dHlwcQU746b4v+AmJI NbeMcju8kyq5BEf8R3kG0CaBBsargKLtf9cxu0Q0PWrSCHUlNeidFjAIdOXsbpHUZSpd BooA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740823371; x=1741428171; 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=XNceTnZfTAFzMo6Ry8tJqEgBkrP2aRzz7WiXfCQWKSSAJj1S30eC6LSpXH+O53V5dd U2PLz4RyccoCyPxBGEWEIM1EAO615n9/5YLnZazLDwL5xIzL1PmBWhmktpgVVQciLeYT 5jLIzHIdQgfqfET4DFUnWdC+XAy37tdw3KdMGko761f1K0cGR7n7Q4uyru0l0QPT1zKG D6h8ufOPLkqAs6njCUvH4OVc8Q2gFvy57FY0J1BPQ7IWLeOpOWPw3uQUBOQTYaDmPyjd cut/FKOQkiNG41GsFrsak51+oV+M7qLNOcqWKkqPRWNVB3wyfKZtU/SVnMUoV3ePVeMe OUSw== X-Forwarded-Encrypted: i=1; AJvYcCVZiiZp1+k3/GY6J7Ti/aN3txsd9A5boISA6mHVx1vcPvdlBK8jw/1vVcMzmeWdDhu0aq/zFEGxhWVZ1+Gg4LV4tyZMDHn7vVM=@ffmpeg.org X-Gm-Message-State: AOJu0Yw57xHRhT8s4Orz8QsHW415C6S27YlurBtVqVtCA97VecmWeDIT EfUaEaDqu0rZG/hUhMgarVLXU1dkAd9WdfVWIaieMrSTYRNbXiOqALev/A== X-Gm-Gg: ASbGncvcyqNP1whC/HblILVfPBlwRX3thdLKeETBfShwAigJpeB0+Dm/MxYUap6ieRy EmpbJPeLhStarHnHeol/RoUrjqsDo+iQR8MYx5lzkl/pqX4ZkE4cRfcLK8A39yWFei+jO4aeC0t gEXPj2cOeJIclAQB8oLfYNBLoQFXzpvUoD3BTRPPArDepbAkffy5TUyo9uJ/k5suq4NgJtkp8BR hkFHD9464AypJDWjHgtKBqHvgIvLm36rhoVqCILLwAnJAReizroQ4ng7+/Opro/pC1c6pJm915i g+Fq6I0td3Tjoglx1yIRQIFDac3cVlASBTRTTDa092X8geSAi/XsaVOFZRInVWI= X-Google-Smtp-Source: AGHT+IEor3I4bxOpQ4ddEd4ImWa7gl5ot3cN4iFQ0/9N3giTMeSaZgEo/DXZtmogng/PYsyNa1ydmg== X-Received: by 2002:a17:902:dacf:b0:220:c178:b3e with SMTP id d9443c01a7336-22368f748bdmr99640615ad.16.1740823371008; Sat, 01 Mar 2025 02:02:51 -0800 (PST) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2235050f210sm46024605ad.205.2025.03.01.02.02.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Mar 2025 02:02:50 -0800 (PST) From: softworkz <ffmpegagent@gmail.com> X-Google-Original-From: softworkz <softworkz@hotmail.com> Message-Id: <049f720ae7060415653737b2f8ce73bb23b55fed.1740823324.git.ffmpegagent@gmail.com> In-Reply-To: <pull.52.v3.ffstaging.FFmpeg.1740823324.ffmpegagent@gmail.com> References: <pull.52.v2.ffstaging.FFmpeg.1740137232.ffmpegagent@gmail.com> <pull.52.v3.ffstaging.FFmpeg.1740823324.ffmpegagent@gmail.com> Date: Sat, 01 Mar 2025 10:02:04 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v3 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 <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: Soft Works <softworkz-at-hotmail.com@ffmpeg.org>, softworkz <softworkz@hotmail.com>, Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> Archived-At: <https://master.gitmailbox.com/ffmpegdev/049f720ae7060415653737b2f8ce73bb23b55fed.1740823324.git.ffmpegagent@gmail.com/> List-Archive: <https://master.gitmailbox.com/ffmpegdev/> List-Post: <mailto:ffmpegdev@gitmailbox.com> From: softworkz <softworkz@hotmail.com> Enables filtergraph printing and adds the options to the docs Signed-off-by: softworkz <softworkz@hotmail.com> --- 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".