From e42e7305c7fb74b4b3c050b644573e4456853c0b Mon Sep 17 00:00:00 2001 From: n00mkrad Date: Tue, 28 Sep 2021 11:26:47 +0200 Subject: [PATCH] Fixed ffprobe framerate parsing --- Code/Media/FfmpegCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/Media/FfmpegCommands.cs b/Code/Media/FfmpegCommands.cs index b4c037a..c65e0a6 100644 --- a/Code/Media/FfmpegCommands.cs +++ b/Code/Media/FfmpegCommands.cs @@ -92,7 +92,7 @@ namespace Flowframes { string ffprobeOutput = await GetVideoInfo.GetFfprobeInfoAsync(inputFile, GetVideoInfo.FfprobeMode.ShowStreams, "r_frame_rate"); string fpsStr = ffprobeOutput.SplitIntoLines().First(); - string[] numbers = fpsStr.Split('=')[1].Split('/'); + string[] numbers = fpsStr.Split('/'); Logger.Log($"Fractional FPS from ffprobe: {numbers[0]}/{numbers[1]} = {((float)numbers[0].GetInt() / numbers[1].GetInt())}", true, false, "ffmpeg"); ffprobeFps = new Fraction(numbers[0].GetInt(), numbers[1].GetInt()); }