fix: video colors — use BGRA pixel format for FFmpeg, remove swap

Swapchain format is B8G8R8A8_SRGB — vkCmdCopyImageToBuffer gives BGRA
data. Was converting BGRA→RGBA in C# and telling FFmpeg 'rgba' —
but SRGB data needs to stay as-is. Now:
- No BGRA→RGBA swap in ReadCapturedBuffer
- FFmpeg pixel_format=bgra (matches swapchain)
- FFmpeg handles SRGB→yuv420p conversion correctly
This commit is contained in:
emil28092005
2026-06-19 09:07:19 +03:00
parent b41e64db4a
commit 277c8aea93
3 changed files with 5 additions and 9 deletions
+1 -1
View File
@@ -329,7 +329,7 @@ class Program
var w = window.Width;
var h = window.Height;
var fps = (int)Math.Round(1000.0 / timing.DeltaTime);
var ffmpegArgs = $"-y -f rawvideo -pixel_format rgba -video_size {w}x{h} -framerate {Math.Min(fps, 60)} -i - -c:v libx264 -preset fast -crf 23 -pix_fmt yuv420p -vf fps=30 {recordingPath}";
var ffmpegArgs = $"-y -f rawvideo -pixel_format bgra -video_size {w}x{h} -framerate {Math.Min(fps, 60)} -i - -c:v libx264 -preset fast -crf 23 -pix_fmt yuv420p -vf fps=30 {recordingPath}";
var psi = new ProcessStartInfo
{