From fdb6d554546169cef94f06a3f270194b3b8a2f44 Mon Sep 17 00:00:00 2001 From: whimsical-c4lic0 Date: Thu, 12 Feb 2026 09:50:59 -0600 Subject: [PATCH] Fix ffmpeg logs path on windows --- OF DL.Core/Services/DownloadService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OF DL.Core/Services/DownloadService.cs b/OF DL.Core/Services/DownloadService.cs index 631fb20..5fedd5a 100644 --- a/OF DL.Core/Services/DownloadService.cs +++ b/OF DL.Core/Services/DownloadService.cs @@ -146,10 +146,10 @@ public class DownloadService( if (logLevelArgs.Contains("-report", StringComparison.OrdinalIgnoreCase)) { - // Direct ffmpeg report files into the same logs directory Serilog uses (relative to current working directory) - string logDir = Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, "logs")); + // Use a relative path so FFREPORT parsing works on Windows (drive-letter ':' breaks option parsing). + string logDir = Path.Combine(Environment.CurrentDirectory, "logs"); Directory.CreateDirectory(logDir); - string ffReportPath = Path.Combine(logDir, "ffmpeg-%p-%t.log"); // ffmpeg will replace %p/%t + string ffReportPath = Path.Combine("logs", "ffmpeg-%p-%t.log").Replace("\\", "/"); Environment.SetEnvironmentVariable("FFREPORT", $"file={ffReportPath}:level=32"); Log.Debug("FFREPORT enabled at: {FFREPORT} (cwd: {Cwd})", Environment.GetEnvironmentVariable("FFREPORT"), Environment.CurrentDirectory);