Skip to content

Commit

Permalink
Fixed fractional frame rates
Browse files Browse the repository at this point in the history
  • Loading branch information
N00MKRAD committed Jan 17, 2021
1 parent e8c8c1c commit 4720b36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Code/FFmpeg/FFmpegCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static async Task FramesToMp4 (string inputDir, bool useH265, int crf, fl
int nums = IOUtils.GetFilenameCounterLength(Directory.GetFiles(inputDir, "*.png")[0], prefix);
string enc = "libx264";
if (useH265) enc = "libx265";
string args = " -framerate " + fps.RoundToInt() + " -i \"" + inputDir + "\\" + prefix + "%0" + nums + "d.png\" -c:v " + enc
string args = " -framerate " + fps.ToString().Replace(",", ".") + " -i \"" + inputDir + "\\" + prefix + "%0" + nums + "d.png\" -c:v " + enc
+ " -crf " + crf + " -pix_fmt yuv420p -movflags +faststart -vf \"crop = trunc(iw / 2) * 2:trunc(ih / 2) * 2\" -c:a copy \"" + inputDir + ".mp4\"";
await FFmpeg.Run(args);
if (delSrc)
Expand Down

0 comments on commit 4720b36

Please sign in to comment.