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 A12424D2AD
	for <ffmpegdev@gitmailbox.com>; Wed, 19 Feb 2025 09:59:44 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E59C868C100;
	Wed, 19 Feb 2025 11:59:40 +0200 (EET)
Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com
 [209.85.214.176])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0812868C07A
 for <ffmpeg-devel@ffmpeg.org>; Wed, 19 Feb 2025 11:59:35 +0200 (EET)
Received: by mail-pl1-f176.google.com with SMTP id
 d9443c01a7336-220dc3831e3so10992365ad.0
 for <ffmpeg-devel@ffmpeg.org>; Wed, 19 Feb 2025 01:59:34 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1739959173; x=1740563973; darn=ffmpeg.org;
 h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from
 :message-id:from:to:cc:subject:date:message-id:reply-to;
 bh=i5NmEoNujYmVUTQPZU/9fUDzFX/Fzho99I+DprKeDQI=;
 b=Fmkdvfv0z5yz/HiHuMIP1VOEC5BpHe2kEEr6YNN06yn9FK0APU4/ZQqCQa1ehdEkIj
 aE0Wy7yLsJQ7J8EF3GoRxHatHtYLFEnhnAiLwft3u3zCdqXbLMWSmmBiT9sxKk5Oe0+f
 23kMIRomkhurtRcx2OGq1kJhxB/wMcsGJkkXeTDd3iYZSYpHnjpFLEnNGA2LYLwFJRjU
 xcrbYJM+SmIw1W1+TnU1/sbMkcPJhGhKqDSfPYZdDw/qb7VWWOcUWrcC0/8LSvZ6BLKQ
 TuMw1UocQ4XMHdOLrzklIn6h0C6HzYVW2OvAFHwQaEQk7xFxG83tyYP3Oj8N4nRbgbCC
 6z7A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1739959173; x=1740563973;
 h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from
 :message-id:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=i5NmEoNujYmVUTQPZU/9fUDzFX/Fzho99I+DprKeDQI=;
 b=r6ICE+1VWlmAx4usAWjuACsF4VsY6Pi4tEJBNOM25wSn2uzXRK9EPlc9jfSKizz7yH
 SryIRc8Km90Ioa+JcjSvOlZMu1GdpNZobOMWwg6eja4oarnTFUCnPN3m2iQzGTC4sd0E
 mUwRJG4i0eif+uFBryRe8dEEgkx/ESpaF+SYXdMWPUgz3OLFAd/ub0xFLbsdJt5TQ7JX
 FEg9jit990wVQm3wo9SdPEh32IphmNGkhlD374VNFoHtJkPG2id3fWckOzp+DsHnnCTH
 RwynJvPKlVbt5P9CVC6Pifz2riRqdmi6hQQ6bnvZOP7H1OhDUHsKZUpzBRbKVxQGmFcU
 4Oaw==
X-Gm-Message-State: AOJu0YwIktqlHWtcSCs/LHCwuKrYNjdW7Zc9J+NBRBs6IoQCNx+Av94C
 O+XTCmPI5ICEiDiP179fw89VtWjlX0h6QBuNzQQeTgLKuW3dLCKWWElp9A==
X-Gm-Gg: ASbGncvsPsS6gRXi6Lb+gOAlcDkwcjZPdUYMNSzkVnO9MP1d2+eYhPOdKCAVZ/TSB6+
 kBrmAzrq7DeRqhmzPoTPhxNZqAWzC7h4cihskBN4u4Z5pDWwx4KVVKRok9f0CWnJJARcAyiZ1L+
 kwykGndsQZVbgIjIcrkzd9uKRL+07zabNNdX/9cZPcygre4YsvRVhHDJBoyTfFhF6F/EvS/mInK
 CCcjkJdpsbCT7kqinmKIpwHaq1NT8JAtzVqyxAxw+v2prpj5e21As9zues4OmqIh8pQBqA/Xyq7
 fJmrZZHvpEooDM7R5yJOO+oJw26co8izSg==
X-Google-Smtp-Source: AGHT+IF0ipRoYBfHgSURjG61DHTit9N+qhy+TIVWHKpLPLi2N0GDMxl+8qWFVdjdNNC3ctWtNjHluQ==
X-Received: by 2002:a05:6a00:14c7:b0:725:41c4:dbc7 with SMTP id
 d2e1a72fcca58-7329cd966d6mr5260627b3a.4.1739959172995; 
 Wed, 19 Feb 2025 01:59:32 -0800 (PST)
Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50])
 by smtp.gmail.com with ESMTPSA id
 d2e1a72fcca58-7325ce41326sm8896089b3a.93.2025.02.19.01.59.32
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 19 Feb 2025 01:59:32 -0800 (PST)
Message-Id: <pull.52.ffstaging.FFmpeg.1739959172.ffmpegagent@gmail.com>
From: ffmpegagent <ffmpegagent@gmail.com>
Date: Wed, 19 Feb 2025 09:59:29 +0000
Fcc: Sent
MIME-Version: 1.0
To: ffmpeg-devel@ffmpeg.org
Subject: [FFmpeg-devel] [PATCH 0/3] print_graphs: Complete Filtergraph
 Printing
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: softworkz <softworkz@hotmail.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/pull.52.ffstaging.FFmpeg.1739959172.ffmpegagent@gmail.com/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.com>

The key benefits are:

 * Different to other graph printing methods, this is outputting:
   * all graphs with runtime state
     (including auto-inserted filters)
   * each graph with its inputs and outputs
   * all filters with their in- and output pads
   * all connections between all input- and output pads
   * for each connection:
     * the runtime-negotiated format and media type
     * the hw context
     * if video hw context, both: hw pixfmt + sw pixfmt
 * Output can either be printed to stdout or written to specified file
 * Output is machine-readable
 * Use the same output implementation as ffprobe, supporting multiple
   formats
   (this commit includes only the default and JSON writers)

Right after filtergraph configuration, the connection details are often not
complete yet. On the other side, when waiting too long or if an error occurs
somewhere, the graph info might never be printed. Experience has shown, that
the most suitable and realiable point in time for printing graph information
is right before cleanup.

Due to the changes for multi-threading, this is no longer doable as easy as
before, so the following method is used: Each filtergraph initiates its own
graph printing short before cleanup into a buffer. Before final cleanup in
ffmpeg.c, the outputs from the individual graphs are pieced together for the
actual output to file or console. (the structure according to the output
format remains valid)

Example output:
https://gist.github.com/softworkz/2a9e8699b288f5d40fa381c2a496e165

softworkz (3):
  fftools/ffmpeg_filter: Move some declaration to new header file
  fftools/ffmpeg_graphprint: Add options for filtergraph printing
  fftools: Enable filtergraph printing and update docs

 doc/ffmpeg.texi             |   10 +
 fftools/Makefile            |    1 +
 fftools/ffmpeg.c            |    4 +
 fftools/ffmpeg.h            |    3 +
 fftools/ffmpeg_filter.c     |  193 +-----
 fftools/ffmpeg_filter.h     |  232 +++++++
 fftools/ffmpeg_graphprint.c | 1152 +++++++++++++++++++++++++++++++++++
 fftools/ffmpeg_graphprint.h |  224 +++++++
 fftools/ffmpeg_opt.c        |   12 +
 9 files changed, 1644 insertions(+), 187 deletions(-)
 create mode 100644 fftools/ffmpeg_filter.h
 create mode 100644 fftools/ffmpeg_graphprint.c
 create mode 100644 fftools/ffmpeg_graphprint.h


base-commit: e18f87ed9f9f61c980420b315dc8ecb308831bc5
Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-52%2Fsoftworkz%2Fsubmit_print_graphs5-v1
Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-52/softworkz/submit_print_graphs5-v1
Pull-Request: https://github.com/ffstaging/FFmpeg/pull/52
-- 
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".