From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Subject: Re: [FFmpeg-devel] [PATCH 2/3] fftools/ffmpeg_graphprint: Add options for filtergraph printing Date: Fri, 21 Feb 2025 10:22:33 +0100 Message-ID: <AS8P250MB074405D4ADECB60BA5A180608FC72@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw) In-Reply-To: <0750b971f9ae0fc38917e0a3b3ccb7ad2e8cd221.1739959172.git.ffmpegagent@gmail.com> softworkz: > From: softworkz <softworkz@hotmail.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 > > Note: This commit includes only the default and JSON writers. > > Signed-off-by: softworkz <softworkz@hotmail.com> > --- > fftools/Makefile | 1 + > fftools/ffmpeg.h | 3 + > fftools/ffmpeg_graphprint.c | 1152 +++++++++++++++++++++++++++++++++++ > fftools/ffmpeg_graphprint.h | 224 +++++++ > fftools/ffmpeg_opt.c | 12 + > 5 files changed, 1392 insertions(+) > create mode 100644 fftools/ffmpeg_graphprint.c > create mode 100644 fftools/ffmpeg_graphprint.h > > diff --git a/fftools/Makefile b/fftools/Makefile > index 4499799818..189feb4e2a 100644 > --- a/fftools/Makefile > +++ b/fftools/Makefile > @@ -19,6 +19,7 @@ OBJS-ffmpeg += \ > fftools/ffmpeg_mux_init.o \ > fftools/ffmpeg_opt.o \ > fftools/ffmpeg_sched.o \ > + fftools/ffmpeg_graphprint.o \ > fftools/sync_queue.o \ > fftools/thread_queue.o \ > > diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h > index 6cc0da05a0..432954b4cc 100644 > --- a/fftools/ffmpeg.h > +++ b/fftools/ffmpeg.h > @@ -714,6 +714,9 @@ extern float max_error_rate; > extern char *filter_nbthreads; > extern int filter_complex_nbthreads; > extern int vstats_version; > +extern int print_graphs; > +extern char* print_graphs_file; > +extern char* print_graphs_format; > extern int auto_conversion_filters; > > extern const AVIOInterruptCB int_cb; > diff --git a/fftools/ffmpeg_graphprint.c b/fftools/ffmpeg_graphprint.c > new file mode 100644 > index 0000000000..77f143b8c2 > --- /dev/null > +++ b/fftools/ffmpeg_graphprint.c > @@ -0,0 +1,1152 @@ > +/* > + * Copyright (c) 2018 - softworkz > + * > + * This file is part of FFmpeg. > + * > + * FFmpeg is free software; you can redistribute it and/or > + * modify it under the terms of the GNU Lesser General Public > + * License as published by the Free Software Foundation; either > + * version 2.1 of the License, or (at your option) any later version. > + * > + * FFmpeg is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + * Lesser General Public License for more details. > + * > + * You should have received a copy of the GNU Lesser General Public > + * License along with FFmpeg; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA > + */ > + > +/** > + * @file > + * output writers for filtergraph details > + */ > + > +#include "config.h" > + > +#include <string.h> > + > +#include "ffmpeg_graphprint.h" > +#include "ffmpeg_filter.h" > + > +#include "libavutil/avassert.h" > +#include "libavutil/avstring.h" > +#include "libavutil/opt.h" > +#include "libavutil/pixdesc.h" > +#include "libavutil/dict.h" > +#include "libavutil/intreadwrite.h" > +#include "libavutil/common.h" > +#include "libavfilter/avfilter.h" > +#include "libavfilter/filters.h" That's an internal header which must not be used by fftools. > +#include "libavutil/buffer.h" > +#include "libavutil/hwcontext.h" > + _______________________________________________ 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".
next prev parent reply other threads:[~2025-02-21 9:22 UTC|newest] Thread overview: 128+ messages / expand[flat|nested] mbox.gz Atom feed top 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 [this message] 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-24 10:41 ` Nicolas George 2025-02-24 13:19 ` Soft Works 2025-02-26 14:42 ` Nicolas George 2025-02-27 13:11 ` 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 2025-03-01 10:01 ` [FFmpeg-devel] [PATCH v3 0/7] print_graphs: Complete Filtergraph Printing ffmpegagent 2025-03-01 10:01 ` [FFmpeg-devel] [PATCH v3 1/7] fftools/textformat: Extract and generalize textformat api from ffprobe.c softworkz 2025-03-02 17:54 ` Stefano Sabatini 2025-03-02 19:44 ` Soft Works 2025-03-05 20:20 ` Stefano Sabatini 2025-03-05 20:58 ` Soft Works 2025-03-08 14:00 ` Stefano Sabatini 2025-03-08 15:01 ` Soft Works 2025-03-08 14:36 ` Stefano Sabatini 2025-03-08 15:30 ` Soft Works 2025-03-08 18:12 ` Stefano Sabatini 2025-03-08 19:25 ` Soft Works 2025-03-09 18:55 ` Soft Works 2025-03-01 10:01 ` [FFmpeg-devel] [PATCH v3 2/7] fftools/ffprobe: Change to use textformat api softworkz 2025-03-08 14:18 ` Stefano Sabatini 2025-03-01 10:02 ` [FFmpeg-devel] [PATCH v3 3/7] fftools/ffprobe: Rename writer_print_section_* and WriterContext softworkz 2025-03-08 14:46 ` Stefano Sabatini 2025-03-08 15:46 ` Soft Works 2025-03-08 17:54 ` Soft Works 2025-03-01 10:02 ` [FFmpeg-devel] [PATCH v3 4/7] fftools/ffmpeg_filter: Move some declaration to new header file softworkz 2025-03-01 10:02 ` [FFmpeg-devel] [PATCH v3 5/7] avfilter/avfilter Add avfilter_link_get_hw_frames_ctx() softworkz 2025-03-01 10:02 ` [FFmpeg-devel] [PATCH v3 6/7] fftools/ffmpeg_graphprint: Add options for filtergraph printing softworkz 2025-03-01 10:02 ` [FFmpeg-devel] [PATCH v3 7/7] fftools: Enable filtergraph printing and update docs softworkz 2025-03-01 22:54 ` [FFmpeg-devel] [PATCH v4 0/7] print_graphs: Complete Filtergraph Printing ffmpegagent 2025-03-01 22:54 ` [FFmpeg-devel] [PATCH v4 1/7] fftools/textformat: Extract and generalize textformat api from ffprobe.c softworkz 2025-03-01 22:54 ` [FFmpeg-devel] [PATCH v4 2/7] fftools/ffprobe: Change to use textformat api softworkz 2025-03-01 22:54 ` [FFmpeg-devel] [PATCH v4 3/7] fftools/ffprobe: Rename writer_print_section_* and WriterContext softworkz 2025-03-01 22:54 ` [FFmpeg-devel] [PATCH v4 4/7] fftools/ffmpeg_filter: Move some declaration to new header file softworkz 2025-03-01 22:54 ` [FFmpeg-devel] [PATCH v4 5/7] avfilter/avfilter: Add avfilter_link_get_hw_frames_ctx() softworkz 2025-03-01 22:54 ` [FFmpeg-devel] [PATCH v4 6/7] fftools/ffmpeg_graphprint: Add options for filtergraph printing softworkz 2025-03-01 22:54 ` [FFmpeg-devel] [PATCH v4 7/7] fftools: Enable filtergraph printing and update docs softworkz 2025-03-08 17:55 ` [FFmpeg-devel] [PATCH v5 0/8] print_graphs: Complete Filtergraph Printing ffmpegagent 2025-03-08 17:55 ` [FFmpeg-devel] [PATCH v5 1/8] fftools/textformat: Extract and generalize textformat api from ffprobe.c softworkz 2025-03-08 19:08 ` Stefano Sabatini 2025-03-08 19:49 ` Soft Works 2025-03-08 17:55 ` [FFmpeg-devel] [PATCH v5 2/8] fftools/ffprobe: Change to use textformat api softworkz 2025-03-08 19:23 ` Stefano Sabatini 2025-03-08 17:55 ` [FFmpeg-devel] [PATCH v5 3/8] fftools/ffprobe: Rename writer_print_section_* and WriterContext softworkz 2025-03-08 19:24 ` Stefano Sabatini 2025-03-08 17:55 ` [FFmpeg-devel] [PATCH v5 4/8] fftools/ffmpeg_filter: Move some declaration to new header file softworkz 2025-03-08 17:55 ` [FFmpeg-devel] [PATCH v5 5/8] avfilter/avfilter: Add avfilter_link_get_hw_frames_ctx() softworkz 2025-03-08 17:55 ` [FFmpeg-devel] [PATCH v5 6/8] fftools/ffmpeg_graphprint: Add options for filtergraph printing softworkz 2025-03-08 17:55 ` [FFmpeg-devel] [PATCH v5 7/8] fftools: Enable filtergraph printing and update docs softworkz 2025-03-08 17:55 ` [FFmpeg-devel] [PATCH v5 8/8] fftools/ffprobe: Rename AVTextFormatContext variables (w => tc) softworkz 2025-03-08 19:30 ` Stefano Sabatini 2025-03-08 20:16 ` [FFmpeg-devel] [PATCH v6 0/8] print_graphs: Complete Filtergraph Printing ffmpegagent 2025-03-08 20:16 ` [FFmpeg-devel] [PATCH v6 1/8] fftools/textformat: Extract and generalize textformat api from ffprobe.c softworkz 2025-03-08 20:16 ` [FFmpeg-devel] [PATCH v6 2/8] fftools/ffprobe: Change to use textformat api softworkz 2025-03-08 20:16 ` [FFmpeg-devel] [PATCH v6 3/8] fftools/ffprobe: Rename writer_print_section_* and WriterContext softworkz 2025-03-08 20:16 ` [FFmpeg-devel] [PATCH v6 4/8] fftools/ffmpeg_filter: Move some declaration to new header file softworkz 2025-03-10 21:47 ` Stefano Sabatini 2025-03-08 20:16 ` [FFmpeg-devel] [PATCH v6 5/8] avfilter/avfilter: Add avfilter_link_get_hw_frames_ctx() softworkz 2025-03-10 22:11 ` Stefano Sabatini 2025-03-08 20:16 ` [FFmpeg-devel] [PATCH v6 6/8] fftools/ffmpeg_graphprint: Add options for filtergraph printing softworkz 2025-03-10 23:03 ` Stefano Sabatini 2025-03-12 4:01 ` Soft Works 2025-03-08 20:16 ` [FFmpeg-devel] [PATCH v6 7/8] fftools: Enable filtergraph printing and update docs softworkz 2025-03-10 23:04 ` Stefano Sabatini 2025-03-10 23:23 ` Soft Works 2025-03-08 20:16 ` [FFmpeg-devel] [PATCH v6 8/8] fftools/ffprobe: Rename AVTextFormatContext variables (w => tfc) softworkz 2025-03-10 21:46 ` [FFmpeg-devel] [PATCH v6 0/8] print_graphs: Complete Filtergraph Printing Stefano Sabatini 2025-03-12 4:04 ` [FFmpeg-devel] [PATCH v7 0/7] " ffmpegagent 2025-03-12 4:04 ` [FFmpeg-devel] [PATCH v7 1/7] fftools/textformat: Extract and generalize textformat api from ffprobe.c softworkz 2025-03-12 4:04 ` [FFmpeg-devel] [PATCH v7 2/7] fftools/ffprobe: Change to use textformat api softworkz 2025-03-13 11:55 ` Michael Niedermayer 2025-03-12 4:04 ` [FFmpeg-devel] [PATCH v7 3/7] fftools/ffprobe: Rename writer_print_section_* and WriterContext softworkz 2025-03-12 4:04 ` [FFmpeg-devel] [PATCH v7 4/7] fftools/ffmpeg_filter: Move some declaration to new header file softworkz 2025-03-12 4:04 ` [FFmpeg-devel] [PATCH v7 5/7] avfilter/avfilter: Add avfilter_link_get_hw_frames_ctx() softworkz 2025-03-12 4:04 ` [FFmpeg-devel] [PATCH v7 6/7] fftools/ffmpeg_graphprint: Add options for filtergraph printing softworkz 2025-03-12 4:04 ` [FFmpeg-devel] [PATCH v7 7/7] fftools/ffprobe: Rename AVTextFormatContext variables (w => tfc) softworkz 2025-03-19 17:04 ` [FFmpeg-devel] [PATCH v8 0/4] print_graphs: Complete Filtergraph Printing ffmpegagent 2025-03-19 17:04 ` [FFmpeg-devel] [PATCH v8 1/4] fftools/textformat: Extract and generalize textformat api from ffprobe.c softworkz 2025-03-19 17:04 ` [FFmpeg-devel] [PATCH v8 2/4] fftools/ffprobe: Change to use textformat api softworkz 2025-03-22 1:22 ` Michael Niedermayer 2025-03-22 1:36 ` Soft Works 2025-03-22 2:04 ` Soft Works 2025-03-22 17:29 ` Michael Niedermayer 2025-03-22 23:11 ` Soft Works 2025-03-27 0:58 ` softworkz . 2025-03-28 23:27 ` Michael Niedermayer 2025-03-28 23:28 ` softworkz . 2025-03-19 17:04 ` [FFmpeg-devel] [PATCH v8 3/4] fftools/ffprobe: Rename writer_print_section_* and WriterContext softworkz 2025-03-19 17:04 ` [FFmpeg-devel] [PATCH v8 4/4] fftools/ffprobe: Rename AVTextFormatContext variables (w => tfc) softworkz 2025-03-21 18:04 ` [FFmpeg-devel] [PATCH v8 0/4] print_graphs: Complete Filtergraph Printing Stefano Sabatini 2025-03-21 18:52 ` Soft Works 2025-03-22 0:12 ` Michael Niedermayer 2025-03-22 0:46 ` Soft Works 2025-03-28 21:45 ` Michael Niedermayer 2025-03-31 19:27 ` softworkz . 2025-04-07 22:05 ` Stefano Sabatini 2025-04-08 10:53 ` softworkz . 2025-04-11 1:26 ` softworkz . 2025-03-23 3:42 ` [FFmpeg-devel] [PATCH v9 " ffmpegagent 2025-03-23 3:42 ` [FFmpeg-devel] [PATCH v9 1/4] fftools/textformat: Extract and generalize textformat api from ffprobe.c softworkz 2025-03-23 3:42 ` [FFmpeg-devel] [PATCH v9 2/4] fftools/ffprobe: Change to use textformat api softworkz 2025-03-23 3:42 ` [FFmpeg-devel] [PATCH v9 3/4] fftools/ffprobe: Rename writer_print_section_* and WriterContext softworkz 2025-03-23 3:42 ` [FFmpeg-devel] [PATCH v9 4/4] fftools/ffprobe: Rename AVTextFormatContext variables (w => tfc) softworkz 2025-04-02 1:13 ` [FFmpeg-devel] [PATCH v9 0/4] print_graphs: Complete Filtergraph Printing softworkz . 2025-04-02 7:24 ` Andreas Rheinhardt 2025-04-02 7:48 ` softworkz . 2025-04-02 8:54 ` softworkz . 2025-04-02 9:30 ` softworkz . 2025-04-02 10:07 ` softworkz . 2025-04-06 21:42 ` softworkz . 2025-04-10 3:30 ` [FFmpeg-devel] [PATCH v10 " ffmpegagent 2025-04-10 3:30 ` [FFmpeg-devel] [PATCH v10 1/4] fftools/textformat: Extract and generalize textformat api from ffprobe.c softworkz 2025-04-10 3:30 ` [FFmpeg-devel] [PATCH v10 2/4] fftools/ffprobe: Change to use textformat api softworkz 2025-04-10 3:30 ` [FFmpeg-devel] [PATCH v10 3/4] fftools/ffprobe: Rename writer_print_section_* and WriterContext softworkz 2025-04-10 3:30 ` [FFmpeg-devel] [PATCH v10 4/4] fftools/ffprobe: Rename AVTextFormatContext variables (w => tfc) softworkz
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=AS8P250MB074405D4ADECB60BA5A180608FC72@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM \ --to=andreas.rheinhardt@outlook.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
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