Skip to content

The swiss army knife of lossless video/audio editing

Allow fractions like 30000/1001 in Change FPS dialog

Claude51a7b8a4ca77
diff --git a/src/renderer/src/dialogs/index.tsx b/src/renderer/src/dialogs/index.tsx
index 400b6593..9ee9a17d 100644
--- a/src/renderer/src/dialogs/index.tsx
+++ b/src/renderer/src/dialogs/index.tsx
@@ -7,6 +7,7 @@ import ky from 'ky';
import pMap from 'p-map';
import { formatDuration } from '../util/duration';
+import { parseRatio } from '../../../common/util';
import { parseYouTube } from '../edlFormats';
import { appPath, isMasBuild, isStoreBuild, isWindows, isWindowsStoreBuild, testFailFsOperation, trashFile, unlinkWithRetry } from '../util';
import type { ParseTimecode } from '../types';
@@ -504,7 +505,7 @@ export async function askForPlaybackRate({ detectedFps, outputPlaybackRate }: {
function parseValue(v: string) {
if (v.trim() === '') return 1; // default to 1 if empty
- const newFps = parseFloat(v);
+ const newFps = parseRatio(v) ?? parseFloat(v); // allow e.g. 30000/1001
if (!Number.isNaN(newFps)) {
return newFps / fps;
}