Skip to content

The swiss army knife of lossless video/audio editing

only in simple mode

Mikael Finstad251102e13537
diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx
index 2469db25..296948d6 100644
--- a/src/renderer/src/App.tsx
+++ b/src/renderer/src/App.tsx
@@ -1136,7 +1136,7 @@ function App() {
openCutFinishedDialog({ filePath: revealPath, warnings, notices });
}
- shootConfetti({ ticks: 50 });
+ if (simpleMode && !prefersReducedMotion) shootConfetti({ ticks: 50 });
if (cleanupChoices.cleanupAfterExport) await cleanupFilesWithDialog();
@@ -1171,7 +1171,7 @@ function App() {
setWorking(undefined);
setProgress(undefined);
}
- }, [filePath, numStreamsToCopy, haveInvalidSegs, workingRef, setWorking, segmentsToChaptersOnly, outSegTemplateOrDefault, generateOutSegFileNames, cutMultiple, outputDir, customOutDir, fileFormat, fileDuration, isRotationSet, effectiveRotation, copyFileStreams, allFilesMeta, keyframeCut, segmentsToExport, shortestFlag, ffmpegExperimental, preserveMetadata, preserveMetadataOnMerge, preserveMovData, preserveChapters, movFastStart, avoidNegativeTs, customTagsByFile, paramsByStreamId, detectedFps, willMerge, enableOverwriteOutput, exportConfirmEnabled, mainFileFormatData, mainStreams, exportExtraStreams, areWeCutting, hideAllNotifications, cleanupChoices.cleanupAfterExport, cleanupFilesWithDialog, segmentsOrInverse.selected, t, mergedFileTemplateOrDefault, segmentsToChapters, invertCutSegments, generateMergedFileNames, concatCutSegments, autoDeleteMergedSegments, tryDeleteFiles, nonCopiedExtraStreams, extractStreams, showOsNotification, openCutFinishedDialog, handleExportFailed]);
+ }, [filePath, numStreamsToCopy, haveInvalidSegs, workingRef, setWorking, segmentsToChaptersOnly, outSegTemplateOrDefault, generateOutSegFileNames, cutMultiple, outputDir, customOutDir, fileFormat, fileDuration, isRotationSet, effectiveRotation, copyFileStreams, allFilesMeta, keyframeCut, segmentsToExport, shortestFlag, ffmpegExperimental, preserveMetadata, preserveMetadataOnMerge, preserveMovData, preserveChapters, movFastStart, avoidNegativeTs, customTagsByFile, paramsByStreamId, detectedFps, willMerge, enableOverwriteOutput, exportConfirmEnabled, mainFileFormatData, mainStreams, exportExtraStreams, areWeCutting, hideAllNotifications, simpleMode, prefersReducedMotion, cleanupChoices.cleanupAfterExport, cleanupFilesWithDialog, segmentsOrInverse.selected, t, mergedFileTemplateOrDefault, segmentsToChapters, invertCutSegments, generateMergedFileNames, concatCutSegments, autoDeleteMergedSegments, tryDeleteFiles, nonCopiedExtraStreams, extractStreams, showOsNotification, openCutFinishedDialog, handleExportFailed]);
const onExportPress = useCallback(async () => {
if (!filePath) return;
@@ -1199,13 +1199,13 @@ function App() {
? await captureFrameFromFfmpeg({ customOutDir, filePath, time: currentTime, captureFormat, quality: captureFrameQuality })
: await captureFrameFromTag({ customOutDir, filePath, time: currentTime, captureFormat, quality: captureFrameQuality, video });
- shootConfetti();
+ if (simpleMode && !prefersReducedMotion) shootConfetti();
if (!hideAllNotifications) openExportFinishedDialog({ filePath: outPath, children: `${i18n.t('Screenshot captured to:')} ${outPath}` });
}, i18n.t('Failed to capture frame'));
} finally {
setWorking(undefined);
}
- }, [filePath, workingRef, setWorking, withErrorHandling, getRelevantTime, videoRef, usingPreviewFile, captureFrameMethod, captureFrameFromFfmpeg, customOutDir, captureFormat, captureFrameQuality, captureFrameFromTag, hideAllNotifications, openExportFinishedDialog]);
+ }, [filePath, workingRef, setWorking, withErrorHandling, getRelevantTime, videoRef, usingPreviewFile, captureFrameMethod, captureFrameFromFfmpeg, customOutDir, captureFormat, captureFrameQuality, captureFrameFromTag, simpleMode, prefersReducedMotion, hideAllNotifications, openExportFinishedDialog]);
const extractSegmentsFramesAsImages = useCallback(async (segments: SegmentBase[]) => {
if (!filePath || detectedFps == null || workingRef.current || segments.length === 0) return;
diff --git a/src/renderer/src/components/BatchFilesList.tsx b/src/renderer/src/components/BatchFilesList.tsx
index 9f7c93fa..1230709c 100644
--- a/src/renderer/src/components/BatchFilesList.tsx
+++ b/src/renderer/src/components/BatchFilesList.tsx
@@ -36,7 +36,7 @@ function BatchFilesList({ selectedBatchFiles, filePath, width, batchFiles, setBa
onDrop: DragEventHandler<HTMLDivElement>,
}) {
const { t } = useTranslation();
- const { springAnimation } = useUserSettings();
+ const { springAnimation, simpleMode } = useUserSettings();
const [sortDesc, setSortDesc] = useState<boolean>();
const [draggingId, setDraggingId] = useState<UniqueIdentifier | undefined>();
@@ -94,7 +94,7 @@ function BatchFilesList({ selectedBatchFiles, filePath, width, batchFiles, setBa
<div style={{ flexGrow: 1 }} />
<FaHatWizard role="button" title={`${t('Convert to supported format')}...`} style={iconStyle} onClick={onBatchConvertToSupportedFormatClick} />
<SortIcon role="button" title={t('Sort items')} style={iconStyle} onClick={onSortClick} />
- <AiOutlineMergeCells className="export-animation" role="button" title={`${t('Merge/concatenate files')}...`} style={{ ...iconStyle, color: 'white', background: primaryColor, borderRadius: '.5em' }} onClick={onMergeFilesClick} />
+ <AiOutlineMergeCells className={simpleMode ? 'export-animation' : undefined} role="button" title={`${t('Merge/concatenate files')}...`} style={{ ...iconStyle, color: 'white', background: primaryColor, borderRadius: '.5em' }} onClick={onMergeFilesClick} />
<FaTimes role="button" title={t('Close batch')} style={{ ...iconStyle, color: 'var(--gray-11)' }} onClick={closeBatch} />
</div>
diff --git a/src/renderer/src/components/ConcatSheet.tsx b/src/renderer/src/components/ConcatSheet.tsx
index 60fed862..86f8ba76 100644
--- a/src/renderer/src/components/ConcatSheet.tsx
+++ b/src/renderer/src/components/ConcatSheet.tsx
@@ -44,7 +44,7 @@ function ConcatSheet({ isShown, onHide, paths, onConcat, alwaysConcatMultipleFil
maxLabelLength: number,
}) {
const { t } = useTranslation();
- const { preserveMovData, setPreserveMovData, segmentsToChapters, setSegmentsToChapters, preserveMetadataOnMerge, setPreserveMetadataOnMerge, safeOutputFileName, customOutDir } = useUserSettings();
+ const { preserveMovData, setPreserveMovData, segmentsToChapters, setSegmentsToChapters, preserveMetadataOnMerge, setPreserveMetadataOnMerge, safeOutputFileName, customOutDir, simpleMode } = useUserSettings();
const [includeAllStreams, setIncludeAllStreams] = useState(false);
const [fileMeta, setFileMeta] = useState<{ format: FFprobeFormat, streams: FFprobeStream[], chapters: FFprobeChapter[] }>();
@@ -191,7 +191,7 @@ function ConcatSheet({ isShown, onHide, paths, onConcat, alwaysConcatMultipleFil
title={t('Merge/concatenate files')}
onClosePress={onHide}
renderButton={() => (
- <Button className="export-animation" disabled={detectedFileFormat == null || !isOutFileNameValid} onClick={onConcatClick} style={{ fontSize: '1.3em', padding: '0 .3em', marginLeft: '1em', background: primaryColor, color: 'white', border: 'none' }}>
+ <Button className={simpleMode ? 'export-animation' : undefined} disabled={detectedFileFormat == null || !isOutFileNameValid} onClick={onConcatClick} style={{ fontSize: '1.3em', padding: '0 .3em', marginLeft: '1em', background: primaryColor, color: 'white', border: 'none' }}>
<AiOutlineMergeCells style={{ fontSize: '1.4em', verticalAlign: 'middle' }} /> {t('Merge!')}
</Button>
)}
diff --git a/src/renderer/src/components/ExportButton.tsx b/src/renderer/src/components/ExportButton.tsx
index 77c076be..daaf02c2 100644
--- a/src/renderer/src/components/ExportButton.tsx
+++ b/src/renderer/src/components/ExportButton.tsx
@@ -18,7 +18,7 @@ function ExportButton({ segmentsToExport, areWeCutting, onClick, size = 1 }: {
const { t } = useTranslation();
- const { autoMerge } = useUserSettings();
+ const { autoMerge, simpleMode } = useUserSettings();
let title = t('Export');
if (segmentsToExport.length === 1) {
@@ -31,7 +31,7 @@ function ExportButton({ segmentsToExport, areWeCutting, onClick, size = 1 }: {
return (
<div
- className="export-animation"
+ className={simpleMode ? 'export-animation' : undefined}
style={{ cursor: 'pointer', background: primaryColor, color: 'white', borderRadius: size * 5, paddingTop: size * 1, paddingBottom: size * 2.5, paddingLeft: size * 7, paddingRight: size * 7, fontSize: size * 13, whiteSpace: 'nowrap' }}
onClick={onClick}
title={title}
diff --git a/src/renderer/src/util.ts b/src/renderer/src/util.ts
index 0eceff20..a2e8610c 100644
--- a/src/renderer/src/util.ts
+++ b/src/renderer/src/util.ts
@@ -11,7 +11,6 @@ import isDev from './isDev';
import { ffmpegExtractWindow } from './util/constants';
import { appName } from '../../main/common';
import { Html5ifyMode } from '../../../types';
-import { prefersReducedMotion } from './animations';
import getSwal from './swal';
const { dirname, parse: parsePath, join, extname, isAbsolute, resolve, basename } = window.require('path');
@@ -491,8 +490,6 @@ export const mediaSourceQualities = ['HD', 'SD', 'OG']; // OG is original
export const splitKeyboardKeys = (keys: string) => keys.split('+');
export function shootConfetti(options?: confetti.Options) {
- if (prefersReducedMotion()) return;
-
confetti({
particleCount: 30,
angle: 110,