Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: softworkz <ffmpegagent-at-gmail.com@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: softworkz <softworkz@hotmail.com>
Subject: [FFmpeg-devel] [PATCH 2/3] tools/ffmpeg-sg: Add show-graph wrapper script for Windows
Date: Mon, 09 Jun 2025 19:23:47 +0000
Message-ID: <e7f6cd1b247611af75ee7c081ce6198c8ea562fb.1749497028.git.ffmpegagent@gmail.com> (raw)
In-Reply-To: <pull.95.ffstaging.FFmpeg.1749497028.ffmpegagent@gmail.com>

From: softworkz <softworkz@hotmail.com>

Signed-off-by: softworkz <softworkz@hotmail.com>
---
 tools/ffmpeg-sg.cmd | 73 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)
 create mode 100644 tools/ffmpeg-sg.cmd

diff --git a/tools/ffmpeg-sg.cmd b/tools/ffmpeg-sg.cmd
new file mode 100644
index 0000000000..1268ac05c9
--- /dev/null
+++ b/tools/ffmpeg-sg.cmd
@@ -0,0 +1,73 @@
+@echo off
+setlocal EnableDelayedExpansion
+REM
+REM ffmpeg-sg - FFmpeg Show-Graph Wrapper (aka killer feature)
+REM             Show the FFmpeg execution graph in default browser 
+REM
+REM Copyright (c) 2025 softworkz
+REM
+REM This file is part of FFmpeg.
+REM
+REM FFmpeg is free software; you can redistribute it and/or
+REM modify it under the terms of the GNU Lesser General Public
+REM License as published by the Free Software Foundation; either
+REM version 2.1 of the License, or (at your option) any later version.
+REM
+REM FFmpeg is distributed in the hope that it will be useful,
+REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+REM Lesser General Public License for more details.
+REM
+REM You should have received a copy of the GNU Lesser General Public
+REM License along with FFmpeg; if not, write to the Free Software
+REM Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+REM
+
+REM Check for ffmpeg.exe in folder
+if not exist "ffmpeg.exe" (
+    echo Error: ffmpeg.exe not found in current directory.
+    exit /b 1
+)
+
+REM Check params
+set "conflict_found="
+for %%i in (%*) do (
+    if /i "%%i"=="-print_graphs_file" set "conflict_found=1"
+    if /i "%%i"=="-print_graphs_format" set "conflict_found=1"
+)
+
+if defined conflict_found (
+    echo Error: -print_graphs_file or -print_graphs_format parameter already provided.
+    echo This script manages graph file generation automatically.
+    exit /b 1
+)
+
+REM Validate temp dir
+if not exist "%TEMP%" (
+    echo Error: Temp directory not accessible
+    exit /b 1
+)
+
+REM Generate HTML filename
+set "date_part=%date:~-4,4%-%date:~-10,2%-%date:~-7,2%"
+set "time_part=%time:~0,2%-%time:~3,2%-%time:~6,2%"
+set "date_part=%date_part:/=-%"
+set "time_part=%time_part: =0%"
+
+set "html_file=%TEMP%\ffmpeg_graph_%date_part%_%time_part%_%RANDOM%.html"
+
+REM Execute ffmpeg
+REM Use start /wait /b to avoid "Terminate batch job" prompt on Ctrl-C
+start /wait /b ffmpeg.exe -print_graphs_file "%html_file%" -print_graphs_format mermaidhtml %*
+set "ffmpeg_exit_code=%ERRORLEVEL%"
+
+REM Open browser if HTML file was created
+if exist "%html_file%" (
+    echo "Execution graph opened in browser: %html_file%
+    start "FFmpeg Graph" "%html_file%"
+) else (
+    echo Warning: FFmpeg completed but no graph file was generated.
+)
+
+REM Exit with ffmpeg exit code
+exit /b %ffmpeg_exit_code%
-- 
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".

  parent reply	other threads:[~2025-06-09 19:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-09 19:23 [FFmpeg-devel] [PATCH 0/3] tools/ffmpeg-sg: Add show-graph wrapper scripts (aka killer feature) ffmpegagent
2025-06-09 19:23 ` [FFmpeg-devel] [PATCH 1/3] tools/ffmpeg-sg: Add show-graph wrapper script for Linux softworkz
2025-06-09 19:23 ` softworkz [this message]
2025-06-09 19:23 ` [FFmpeg-devel] [PATCH 3/3] tools/ffmpeg-sg: Include show-graph wrapper script in build output softworkz
2025-06-11 19:18   ` Marton Balint
2025-06-11 20:58     ` softworkz .
2025-06-11 21:14       ` Kieran Kunhya via ffmpeg-devel
     [not found]       ` <CABGuwEm72Ynf=anVta4rj0pOPThHeM0aweAbYVTBuvLsQSbJ4Q@mail.gmail.com>
2025-06-11 21:39         ` softworkz .
2025-06-11 22:04         ` softworkz .
2025-06-12  7:40       ` Nicolas George
2025-06-12 18:42         ` softworkz .
2025-06-12 19:06           ` Nicolas George
2025-06-12 19:20             ` softworkz .
2025-06-09 22:49 ` [FFmpeg-devel] [PATCH 0/3] tools/ffmpeg-sg: Add show-graph wrapper scripts (aka killer feature) Kieran Kunhya via ffmpeg-devel
2025-06-11 14:42   ` Nicolas George
     [not found] ` <CABGuwEnDSAKEEP6e5yUzeXM_bp5EKV2bPHaL8+wM+Pbmm5KBPQ@mail.gmail.com>
2025-06-10 13:31   ` softworkz .
2025-06-10 15:28     ` 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=e7f6cd1b247611af75ee7c081ce6198c8ea562fb.1749497028.git.ffmpegagent@gmail.com \
    --to=ffmpegagent-at-gmail.com@ffmpeg.org \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=softworkz@hotmail.com \
    /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