Skip to content

The swiss army knife of lossless video/audio editing

run "power on self test" on startup

Mikael Finstad9666ce4a2cb0
diff --git a/src/App.jsx b/src/App.jsx
index 92a9e417..c6de1072 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -49,7 +49,7 @@ import { captureFrameFromTag, captureFrameFfmpeg } from './capture-frame';
import {
defaultProcessedCodecTypes, getStreamFps, isCuttingStart, isCuttingEnd,
readFileMeta, getFormatData, renderThumbnails as ffmpegRenderThumbnails,
- extractStreams, getAllStreams,
+ extractStreams, getAllStreams, runStartupCheck,
isStreamThumbnail, isAudioDefinitelyNotSupported, isIphoneHevc, tryReadChaptersToEdl,
getDuration, getTimecodeFromStreams, createChaptersFromSegments, extractSubtitleTrack,
} from './ffmpeg';
@@ -2096,6 +2096,10 @@ const App = memo(() => {
if (!isStoreBuild) loadMifiLink().then(setMifiLink);
}, []);
+ useEffect(() => {
+ runStartupCheck().catch((err) => handleError('LosslessCut is installation is broken', err));
+ }, []);
+
useEffect(() => {
// Testing:
// if (isDev) loadMedia({ filePath: '/Users/mifi/Downloads/inp.MOV', customOutDir });
diff --git a/src/ffmpeg.js b/src/ffmpeg.js
index 50a7ef30..e1bb14e5 100644
--- a/src/ffmpeg.js
+++ b/src/ffmpeg.js
@@ -660,3 +660,7 @@ export function getTimecodeFromStreams(streams) {
});
return foundTimecode;
}
+
+export async function runStartupCheck() {
+ await runFfmpeg(['-hide_banner', '-f', 'lavfi', '-i', 'nullsrc=s=256x256:d=1', '-f', 'null', '-']);
+}