improve error msg

pull/1364/head
Mikael Finstad 2022-11-22 22:10:30 +08:00
rodzic a9341e801b
commit f6251983cc
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 25AB36E3E81CBC26
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -12,6 +12,7 @@ function mapInputToOutputCodec(inputCodec) {
// eslint-disable-next-line import/prefer-default-export
export async function getSmartCutParams({ path, videoDuration, desiredCutFrom, streams }) {
const videoStreams = getRealVideoStreams(streams);
if (videoStreams.length === 0) throw new Error('Smart cut only works on videos');
if (videoStreams.length > 1) throw new Error('Can only smart cut video with exactly one video stream');
const videoStream = videoStreams[0];