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:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user