From 0e5e7dffea5f52329a7953f28c406bbe076af605 Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Tue, 22 Oct 2024 15:07:02 +0200 Subject: [PATCH] warn about adjusting fps and cutting closes #2190 --- src/renderer/src/App.tsx | 2 +- src/renderer/src/components/ExportConfirm.tsx | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx index 5906c3f11c..302ffea0c4 100644 --- a/src/renderer/src/App.tsx +++ b/src/renderer/src/App.tsx @@ -2596,7 +2596,7 @@ function App() { /> - + setStreamsSelectorShown(false)} maxWidth={1000}> {mainStreams && filePath != null && ( diff --git a/src/renderer/src/components/ExportConfirm.tsx b/src/renderer/src/components/ExportConfirm.tsx index a395c189d9..05265c18c8 100644 --- a/src/renderer/src/components/ExportConfirm.tsx +++ b/src/renderer/src/components/ExportConfirm.tsx @@ -63,6 +63,7 @@ function ExportConfirm({ smartCutBitrate, setSmartCutBitrate, toggleSettings, + outputPlaybackRate, } : { areWeCutting: boolean, selectedSegments: InverseCutSegment[], @@ -90,6 +91,7 @@ function ExportConfirm({ smartCutBitrate: number | undefined, setSmartCutBitrate: Dispatch>, toggleSettings: () => void, + outputPlaybackRate: number, }) { const { t } = useTranslation(); @@ -113,8 +115,12 @@ function ExportConfirm({ if (areWeCutting && outFormat === 'flac') { ret.push(t('There is a known issue in FFmpeg with cutting FLAC files. The file will be re-encoded, which is still lossless, but the export may be slower.')); } + if (areWeCutting && outputPlaybackRate !== 1) { + ret.push(t('Adjusting the output FPS and cutting at the same time will cause incorrect cuts. Consider instead doing it in two separate steps.')); + } return ret; - }, [areWeCutting, outFormat, t]); + }, [areWeCutting, outFormat, outputPlaybackRate, t]); + const exportModeDescription = useMemo(() => ({ segments_to_chapters: t('Don\'t cut the file, but instead export an unmodified original which has chapters generated from segments'), merge: t('Auto merge segments to one file after export'), @@ -231,7 +237,7 @@ function ExportConfirm({ {warnings.map((warning) => ( -
{warnings.join('\n')}
+
{warning}