SHA256
Improve Support for Floating-point FPS
This commit is contained in:
1 parent
b10f72b529
commit
5ee4a7fc51
3 files changed
+18
-14
No files matched your search
@@ -246,14 +246,16 @@ namespace ADOFAIRenderer.Component
|
||||
{
|
||||
try
|
||||
{
|
||||
var workingFps = (float)(targetFps % videoFps == 0.0 ? videoFps : targetFps);
|
||||
var videoFFmpeg = new VideoFFmpeg(Configuration.RenderWidth, Configuration.RenderHeight, (int)workingFps, (int)videoFps, selectedCodec);
|
||||
var quotient = targetFps / videoFps;
|
||||
var isMultiple = Math.Abs(quotient - Math.Round(quotient)) < 1e-9;
|
||||
var workingFps = isMultiple ? videoFps : targetFps;
|
||||
var videoFFmpeg = new VideoFFmpeg(Configuration.RenderWidth, Configuration.RenderHeight, workingFps, videoFps, selectedCodec);
|
||||
|
||||
SetupCaptureDirectory();
|
||||
|
||||
videoFFmpeg.Start(_currentOutPath, bitrate);
|
||||
|
||||
int num = targetFps % videoFps != 0.0 ? 1 : (int)(targetFps / videoFps);
|
||||
var num = isMultiple ? (int)Math.Round(quotient) : 1;
|
||||
|
||||
while (true)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user