mirror of
https://github.com/n00mkrad/flowframes.git
synced 2026-07-11 04:52:54 +02:00
Prefer FFmpeg FPS readout over FFprobe for GIF, APNG, AWEBP
This commit is contained in:
@@ -309,11 +309,14 @@ namespace Flowframes.IO
|
||||
|
||||
public static async Task<Fraction> GetVideoFramerate (string path)
|
||||
{
|
||||
string[] preferFfmpegReadoutFormats = new string[] { ".gif", ".png", ".apng", ".webp" };
|
||||
bool preferFfmpegReadout = preferFfmpegReadoutFormats.Contains(Path.GetExtension(path).ToLower());
|
||||
|
||||
Fraction fps = new Fraction();
|
||||
|
||||
try
|
||||
{
|
||||
fps = await FfmpegCommands.GetFramerate(path);
|
||||
fps = await FfmpegCommands.GetFramerate(path, preferFfmpegReadout);
|
||||
Logger.Log("Detected FPS of " + Path.GetFileName(path) + " as " + fps + " FPS", true);
|
||||
}
|
||||
catch
|
||||
|
||||
Reference in New Issue
Block a user