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 006424D063 for <ffmpegdev@gitmailbox.com>; Tue, 18 Mar 2025 02:32:28 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A3104687B58; Tue, 18 Mar 2025 04:32:24 +0200 (EET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12olkn2067.outbound.protection.outlook.com [40.92.23.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B6DCC687AFD for <ffmpeg-devel@ffmpeg.org>; Tue, 18 Mar 2025 04:32:18 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YslMRHTwjgejhVBTMj+bHh6EHrGlhmRwJp0q7obAWlKTOVyYSfiIjyWJZfQMmhWc0f+zOok5HOuIpsvsW8HuCapfPXC+yddSD+jGU1VECxgNXW0KRxDTOo2SMpy5ImsK8qC3pfl1AVBmK3GSQBYJ4KUvjRpMoi8bpuNV6KuXWmDki7oxj215LLkNtI40bx1zaprxdOgY+wr1/uc7F2PLJbMM8nNmxGOcWbRVubXMBN2L2o1MiesJZgwGcwHnI0iBYR90FjEfa1gvdLrq8VdaQMiz/xS9aFsQbctOgjAFSHdtstE/FONPKTO+ZsYxZSQRLz8/Pr4CbaK5nFwUS4jf0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QXWNO7da4ohaZINEKX4SqnNxWbtfJ5lsCW5GRt/f0fc=; b=CMA266/Z9Gyd1SwPjd/xL8pKEsF8fEN5NQ9IYfu4e621B1XPosU2Nwjot8c0mSdzbVmDf2PFakykIcc6/HrzSbMZmwHd2S3pGZE2ZtBska5sN6rB2uNgJs7YfTW4gP6r40ZzS0+RtCUH07esKBEDe7zh7NHxWnLudHm7hra2vc9VxnNdImwRIE7WxVZhzwyKd1fEhNS52hwNvwJn81csbx/pweP040h3QDVzkmV+GqUFenCDoVuie5qjb6y/qrPMKlELprVD6tYT0GfsbHOYhlknXi+o5ck4n1JYGXKWkNJm8iBgofOBNNVVtuS0ZmQjqbzL1n5KYW6ZtEcVabJ7Xw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QXWNO7da4ohaZINEKX4SqnNxWbtfJ5lsCW5GRt/f0fc=; b=lPc2nGQBE05pZGzwKAPTsUwofJTN4aYeOLVTwo78G9V/+pC6uo5r7ma0QpVCSemt4pyV34qlI3Xl69f4IRD586zw666iwwcYYZ6RIzebCCm9e6mdnpfHJaOkBy1VjdHhK6bQb5NBlpkxWIp1PjR7d9rlsQzHcxtiicLTnxXRNQlpVFMr2+o/18cQ81MhgqMoI3+YWcK4w1e3zoEnW002O3GtDfFDOkJUd6QF/Wisl5tMj40FCdT3Aj8iEECxWJ3kOq+kC3zQ+q57zUz3T5TwQQ2pBkFWG+UjGsrXQM6ROU3f623v0dcioLTwL76XpXnU7ubb/lqMhkpHJPPLMx3d7Q== Received: from DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM (2603:10b6:8:b::20) by MN0P223MB0462.NAMP223.PROD.OUTLOOK.COM (2603:10b6:208:3ca::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.33; Tue, 18 Mar 2025 02:32:13 +0000 Received: from DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM ([fe80::bf09:8e9:b07f:98a7]) by DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM ([fe80::bf09:8e9:b07f:98a7%7]) with mapi id 15.20.8534.031; Tue, 18 Mar 2025 02:32:13 +0000 From: Soft Works <softworkz-at-hotmail.com@ffmpeg.org> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Thread-Topic: [RFC] FFmpeg Execution Graph Visualization Thread-Index: AduXnlObQK5dsG0ZQZicU/lpURDPYQ== Date: Tue, 18 Mar 2025 02:32:13 +0000 Message-ID: <DM8P223MB0365AB64AECCC838CF7CB41DBADE2@DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM8P223MB0365:EE_|MN0P223MB0462:EE_ x-ms-office365-filtering-correlation-id: ab3c4ce3-20dd-4caf-7aec-08dd65c5177e x-microsoft-antispam: BCL:0; ARA:14566002|7092599003|15080799006|19110799003|461199028|8060799006|8062599003|56899033|102099032|1602099012|10035399004|4302099013|3412199025|440099028; x-microsoft-antispam-message-info: =?us-ascii?Q?aA81UV6yOpFR4KjjpvRkhpMpycSlNnu2VFSaWi7+MFL/UyjiDyqksZUd2lbY?= =?us-ascii?Q?Fg17BHe4vHxObEeqOpUKQC+RzAh609WPtKUC6D7gnj81aSBGfBDOzxOjIOje?= =?us-ascii?Q?KoMXV7WLaZnd0+oBM+qNAeFjCTd9+ZVEeoKupd5gsvd9s5Yv9HNhWQ/5vlVe?= =?us-ascii?Q?FqQYiv+0DUoc0MPS7NFThrwXMSuX1/WN6YEsC79stFDjHh2IDDRkYL7qXQ9k?= =?us-ascii?Q?mQfZaMQs0zL/tM/h5avF0KRGxcCwUopn1KHqA6MEjZbgCZ0vnWJDG44X0aKp?= =?us-ascii?Q?ZiWimlKlCFRgOFwe7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+iUc?= =?us-ascii?Q?SP7y8L8ZZpOBpmEbK+pFKJSloz4FOFw4PhScslyhAAE73GzRmuN/IQeVjZo?= =?us-ascii?Q?=3D?= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?l36/eopQ7NMOIcAOU1WVxWiQbc3wS7EBRCgN5kFE0b5yI6CYetyHACGY+UVN?= =?us-ascii?Q?3kdFGjR00zk0L0KKfSNo/ohteyWn9VqaeC0PhGIwOM7tUO1o6rvX/zllW/+8?= =?us-ascii?Q?wdRdBpQ6YL76Y0oTXw77FF3z6C9hJQNrmUEusSQGtgLaTDO7FNkJ8e/SjrnT?= =?us-ascii?Q?1f8pmTR/oGsu059NmmbZJPlyGdN0cwfl3ebwJiqKN5YwKUV0Ao7Amm+16eqw?= =?us-ascii?Q?WRIgs3Bjn8b1On8DuTeNlusTn5jVcxH3j0bzN1hynUQ30TQb8QizUJz9R/Uq?= =?us-ascii?Q?GOhYgxaZVKyfY/fuBjDzmYqm/8Zyq5PoMxjsU4KTMDXik/33XC26N+LnWrAK?= =?us-ascii?Q?5LwWYJNRRWP62jiqz+szyCo6+elvJjlwbVI/32dJkMJPwwo/GjsGVyqDhxa5?= =?us-ascii?Q?0F4NbDHTcZ37+/xgaRVVFdkJIDf0OPn9srlgfdufuelgv/LjNo5FXx71ZUDP?= =?us-ascii?Q?SaEhROwdyNCxcNZsg9n5pq2LjvTmyPo8MliruJUb2zQQS1ysFwxAQL/vIJPo?= =?us-ascii?Q?y5uWBssCJNANfjR1Xvtq2WCL00uL0ZXikPGEIBdmAihVOJXNCDkzOVwPigbX?= =?us-ascii?Q?H4xACi46CRxEA0kRpKiBDL0lPQA0gQxiuxOA5kTPxC4IzUDhmDvqiVsJDG9Y?= =?us-ascii?Q?25/YwUH1TS6yQpjZJmC0UAyQ8es34xo0FjmY02JxPKx+u7xQruGtTzTmZLML?= =?us-ascii?Q?ufW/Wgzt8qi8b+HxLNkQmvao8pPJMfJeH175q7ndTNc2BOWnrib5d9kcj+/5?= =?us-ascii?Q?8brr4G9Kz+apmUgxSuFrvafG7URPwXDRBe+Whf5au8O21B7uIMM5Ocj/t7w4?= =?us-ascii?Q?3zDOg6IngxtStfSZ2yO1lKakndYsqDTLUfyIOxJSuWv6U2ZWpesYS59aK6KQ?= =?us-ascii?Q?XxASrY0uk7xInAsy+dctdkqFQ5VlvEvoefv0bxlHuDgwpp2NQCTeOMN9E8Tv?= =?us-ascii?Q?Z2JEYLpPWCiU03x900GJyEKaEKf3dRKHDOwfPR6H5RjOEm0YhGt3f3uqncaH?= =?us-ascii?Q?sedQ0wH/UWIj0CnlJZ9MTpeXgAqfezYZdP38NbIqfu7sm5v5kmfyYIptdHFB?= =?us-ascii?Q?U609eEZ/7Qmd45p01LKcleHfqSVhFt6UPExnbuBTjrw8w0SwUJg9+WJuYnxh?= =?us-ascii?Q?2qeJ13pX7VWarZBIZN0XQeQ1k/LKrZgQADM7D4046sfNSqwTb41/yBc1ZN5S?= =?us-ascii?Q?g1U2e6ACam/i3jpgjBeUJEKrIYUue8ZYALMuYNcunKvLvDfDNFhWIbEoxW8?= =?us-ascii?Q?=3D?= MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-1ff67.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: ab3c4ce3-20dd-4caf-7aec-08dd65c5177e X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Mar 2025 02:32:13.3011 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0P223MB0462 Subject: [FFmpeg-devel] [RFC] FFmpeg Execution Graph Visualization 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> 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/DM8P223MB0365AB64AECCC838CF7CB41DBADE2@DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM/> List-Archive: <https://master.gitmailbox.com/ffmpegdev/> List-Post: <mailto:ffmpegdev@gitmailbox.com> Hello everybody, working on the subject of writing out filtergraph information obviously implies the goal of being able to visualize that data in some way. While I do have something for long, it's tailored for specific workflows and is hardly useful for most. Anyway, it shouldn't be required to use once another software for visualize the output. This decimates the usability for any such feature by far. Few days ago, I was thinking about ways for making this feature really useful for everybody without needing to jump through any extra hoops. We have that range of writers (now "text formatters"), and so I wondered whether there isn't some text format that is meant to directly represent a graph for visualization, which finally reminded me about MERMAID Had used it just twice or thrice on GitHub for simple things, and as I found out later, it's by far less capable than I would have expected (more than a decade of age, current version 11.x) --- but: it has a number of unique selling points: - The format is simple and transparent - It's hand-editable and easily readable - There's quite an ecosystem around it with many integrations and tools available The #1 for me though is: - It goes hand-in-hand with Markdown => almost everywhere Markdown is supported, Mermaid diagrams are supported as well Practically, this means that you can paste a Mermaid diagram into any message field on GitHub (for example; forgejo supports it as well as many others) - and the diagram is rendered automatically with a kind of interactive viewer. Enough reason to give it a try and I also had some quick success. Writing that format fits rather well into the logic of the existing text formatters without major changes. That way I ended up with a new avtextformatter_mermaid ("mermaidwriter" in old terminology) Most of the mentioned deficiencies could be remedied by CSS styling (even though it's been really tedious). Now well - when viewing filtergraphs, you often want to know details about the input and output streams. For that other tool I was parsing out this information from the ffmpeg log lines describing the streams on startup. But this work is happening right at the source of information, so I added input/output files and streams to the filtergraph printing as well (just as much detail as needed for graphing). The unthankful effect: by that, it became apparent that something else is missing: encoders and decoders - added those as well and eventually got reasonable results. Remained one last part: Usability Of course, it's still not a great experience when you need to copy/paste the generated diagram code in some web portal. To solve that, I've created once another textformatter(writer): mermaidhtml. It's just an extension to the Mermaid formatter which wraps the diagram as an html file for local viewing (yet not fully offline). The final idea would be to simplify usage as much as possible, so that all you need to do is adding a small option to the Ffmpeg command line, like -sg ('show graph') which would cause Ffmpeg to create such mermaid html file on exit and automatically launches the browser (if any) to view that file. While working or trying a range of commands, after another, this will also create a browser tab for each run, allowing for easy comparison between recent commands. Examples I've created a Gist with some examples of the output here: https://gist.github.com/softworkz/a196b2d0e9e2df49f766abd92f508551 (also includes a zip with html file examples) Questions I'm curious what you think about it! - What's good, what's bad, what should be changed/improved? - What about the displayed information, should something be added? - I'm folding out the buffer source/sink filters to simplify the view, is that ok? Should the TRIM filters be excluded as well? - Since it's no longer just about filter graphs - what do you think about the term "Ffmpeg Execution Graph"? (other ideas welcome) - Does anybody have some complex command lines for me to test? (no need to include media files, I can try to replicate something similar) Thanks, sw _______________________________________________ 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".