Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 0/3] print_graphs: Complete Filtergraph Printing
@ 2025-02-19  9:59 ffmpegagent
  2025-02-19  9:59 ` [FFmpeg-devel] [PATCH 1/3] fftools/ffmpeg_filter: Move some declaration to new header file softworkz
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: ffmpegagent @ 2025-02-19  9:59 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: softworkz

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".

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2025-02-21 13:49 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-19  9:59 [FFmpeg-devel] [PATCH 0/3] print_graphs: Complete Filtergraph Printing ffmpegagent
2025-02-19  9:59 ` [FFmpeg-devel] [PATCH 1/3] fftools/ffmpeg_filter: Move some declaration to new header file softworkz
2025-02-19  9:59 ` [FFmpeg-devel] [PATCH 2/3] fftools/ffmpeg_graphprint: Add options for filtergraph printing softworkz
2025-02-21  9:22   ` Andreas Rheinhardt
2025-02-21  9:42     ` Soft Works
2025-02-21 11:11       ` Andreas Rheinhardt
2025-02-21 11:25         ` Soft Works
2025-02-21 13:09   ` Nicolas George
2025-02-21 13:49     ` Soft Works
2025-02-19  9:59 ` [FFmpeg-devel] [PATCH 3/3] fftools: Enable filtergraph printing and update docs softworkz
2025-02-21 11:27 ` [FFmpeg-devel] [PATCH v2 0/4] print_graphs: Complete Filtergraph Printing ffmpegagent
2025-02-21 11:27   ` [FFmpeg-devel] [PATCH v2 1/4] fftools/ffmpeg_filter: Move some declaration to new header file softworkz
2025-02-21 11:27   ` [FFmpeg-devel] [PATCH v2 2/4] avfilter/avfilter Add avfilter_link_get_hw_frames_ctx() softworkz
2025-02-21 11:27   ` [FFmpeg-devel] [PATCH v2 3/4] fftools/ffmpeg_graphprint: Add options for filtergraph printing softworkz
2025-02-21 11:27   ` [FFmpeg-devel] [PATCH v2 4/4] fftools: Enable filtergraph printing and update docs softworkz

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git