Fixed ffprobe framerate parsing

This commit is contained in:
n00mkrad
2021-09-28 11:26:47 +02:00
parent d075d70c1e
commit e42e7305c7

View File

@@ -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());
}