From c20c8f75ec05ec044f02758b515a1fa0fd30c153 Mon Sep 17 00:00:00 2001 From: N00MKRAD Date: Mon, 23 Nov 2020 19:48:39 +0100 Subject: [PATCH] Reduced FFmpeg PNG compression level to speed up frame extraction by 50% --- Code/AudioVideo/FFmpegCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/AudioVideo/FFmpegCommands.cs b/Code/AudioVideo/FFmpegCommands.cs index 59fa5ff..f210b0d 100644 --- a/Code/AudioVideo/FFmpegCommands.cs +++ b/Code/AudioVideo/FFmpegCommands.cs @@ -38,7 +38,7 @@ namespace Flowframes if (deDupe) deDupeStr = "-vf mpdecimate"; string fmtStr = ""; if (rgb8) fmtStr = "-pix_fmt rgb8"; - string args = $"-i {inputFile.Wrap()} {hdrStr} -vsync 0 {fmtStr} {deDupeStr} -s {w}x{h} \"{frameFolderPath}/%08d.png\""; + string args = $"-i {inputFile.Wrap()} -compression_level 3 {hdrStr} -vsync 0 {fmtStr} {deDupeStr} -s {w}x{h} \"{frameFolderPath}/%08d.png\""; await AvProcess.RunFfmpeg(args, AvProcess.LogMode.OnlyLastLine); await Task.Delay(1); if (delSrc)