From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 524774E406 for ; Mon, 9 Jun 2025 19:24:31 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 604B468CF00; Mon, 9 Jun 2025 22:24:14 +0300 (EEST) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id BE72668CE0A for ; Mon, 9 Jun 2025 22:24:07 +0300 (EEST) Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-747ef5996edso3556580b3a.0 for ; Mon, 09 Jun 2025 12:24:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1749497046; x=1750101846; darn=ffmpeg.org; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date :references:in-reply-to:message-id:from:from:to:cc:subject:date :message-id:reply-to; bh=ip4d3GIh/WhIERC4x9wXmfT1Wged8pYWzI0TF9qhiKE=; b=WQ2dHzL39xj9PZ2xYQj6Ed5d1GDYNKDXz/BR86LYg3Lrht/po9Npj3eEqVFqhP/DA5 +V0ZC0cakO6EqPts07lDNFeVS1MvZjdiR6X9uMDMh+UI1sjNMuc3ftDNBbAntGbc0UFG LjTW+XZQ78iVJUX024vHY+2VdyuY0GxBO4/bes2llf9paTXcw4lTjw+0nAesIC5E7yrM 8JZMj66FzpXUD7SK5wqV9RsEk5DTQClUXfH/EfUFFoVwjsiIEmEBjgDNXohLQrUMk6u/ lG5lfpeX/OAzcgR9OZT380xM2mXHnBspVR68Ly/H1hXuV90vW9KQ9MruF0q1j6Miz24/ d0qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749497046; x=1750101846; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date :references:in-reply-to:message-id:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=ip4d3GIh/WhIERC4x9wXmfT1Wged8pYWzI0TF9qhiKE=; b=w/qxSfIHoezjumP1wm4aeYd2RfheVisJL+6YMdMwwZgDKv/kwIGQocI/guIvJ3dmGm phf2pWLeBSTvVAjep1Xa5RHGJjgYw5DvZE/PCjTM4IGb+W82mgJkgJj6aUJyWYfMCqEK 8S1xYD9525Dt2eoiGzLiGDhm0Ihb3+B2Xp4+caYLAIPHMhfeSgn8RSQHj+fWq7VOndnf vZVAGsLQpOmyHOgxLmzftP1R4jooe3bA54dy+DQpNgN7/4/+stArIbzBOL2PZSnXhD1I xWzZnqvC02kUWdsmdPIwMfBh8kiXE9MNAYWmVI5OefNT+J5w5NLLo8Fxe0oFNqSKM0RH 9YNw== X-Gm-Message-State: AOJu0YxxKAFhskHBibZSIw8hBlfQP/Y3CQaz23Kk9ugJ1YXi6GvpzPxh B8l3pDqCTpXT97sRcqk4qw5+HzWl1Wwk4p8ZoQqLojcjIQKliDHi3plip/k4Tw== X-Gm-Gg: ASbGncsrcCth/15/6C12k/nX47Hr1/dhJ6lKrst5DKjLZpZQGTO+BwX27Fypn6gNi/E 3SIwUsuLpp3vlRpQ/gacaaWXq3DeLzcUAB4SSnPcTcYdtUOa4tWOET7ost59iSQ/LxeGGPAoCal tMAMh8GE8dTwnU1iDKQPQM8cONdutV09h4CT+KG5T6ql9kAvkumjLPNq60P9K7Vss35XK+wytvf DxSvfqnCiHZqb8+bgQzZv2Aoo3N502exF2ia8JbaboVXQq1reRT7CHd1IX4LKc4Cq/AI2pGlTZs XnshdYABsDCgo0PQeUdMJt1GL7rujrlc6PIfPvZNUlD/KyrlZ3iUCoFRN2Hh4NkM02i2YKASZDk 2lmDo X-Google-Smtp-Source: AGHT+IFPSpOITJCvZka/SJY/oTo/lY0/b7MSwuIyS5ubBVqL+wIz+9ivSP3iiitRJHMcHCVq4YDeCw== X-Received: by 2002:a05:6300:6c03:b0:21f:54aa:2004 with SMTP id adf61e73a8af0-21f54aa2170mr8766891637.2.1749497046099; Mon, 09 Jun 2025 12:24:06 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7482b0c061esm6093140b3a.117.2025.06.09.12.24.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jun 2025 12:24:05 -0700 (PDT) From: softworkz X-Google-Original-From: softworkz Message-Id: In-Reply-To: References: Date: Mon, 09 Jun 2025 19:23:47 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH 2/3] tools/ffmpeg-sg: Add show-graph wrapper script for Windows X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: softworkz Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: softworkz Signed-off-by: softworkz --- 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".