From 66c149e64b66d35c47e51a9d56dd22280a842d3a Mon Sep 17 00:00:00 2001 From: Olha Omelianchuk Date: Mon, 18 Nov 2024 16:52:59 +0100 Subject: [PATCH] [#305] Bugfix: Possible codec issue on mp4 recording --- .../neodymium/common/recording/writers/VideoWriter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/xceptance/neodymium/common/recording/writers/VideoWriter.java b/src/main/java/com/xceptance/neodymium/common/recording/writers/VideoWriter.java index f058e1f4..54ee6a40 100644 --- a/src/main/java/com/xceptance/neodymium/common/recording/writers/VideoWriter.java +++ b/src/main/java/com/xceptance/neodymium/common/recording/writers/VideoWriter.java @@ -53,7 +53,7 @@ protected VideoWriter(RecordingConfigurations recordingConfigurations, String vi // check if ffmpeg binary is found p = new ProcessBuilder(((VideoRecordingConfigurations) recordingConfigurations).ffmpegBinaryPath(), "-h").start(); - pb = new ProcessBuilder(((VideoRecordingConfigurations) recordingConfigurations).ffmpegBinaryPath(), "-y", "-f", "image2pipe", "-r", " 5/1", "-i", "pipe:0", "-c:v", "libx264", videoFileName); + pb = new ProcessBuilder(((VideoRecordingConfigurations) recordingConfigurations).ffmpegBinaryPath(), "-y", "-f", "image2pipe", "-i", "pipe:0", "-c:v", "libx264", "-strict", "-2", "-preset", "slow", "-pix_fmt", "yuv420p", "-vf", "scale=trunc(iw/2)*2:trunc(ih/2)*2", "-f", "mp4", videoFileName); pb.redirectErrorStream(true); pb.redirectOutput(Redirect.appendTo(new File(((VideoRecordingConfigurations) recordingConfigurations).ffmpegLogFile()))); }