This commit is contained in:
手瓜一十雪 committed 2024-11-14 11:35:10 +08:00
1 parent b463140de7
commit 937c594ff7
3 files changed
+6 -62

No files matched your search

+1 -1
View File
@@ -20,7 +20,7 @@ export async function getVideoInfo(filePath: string, logger: LogWrapper) {
ffmpeg.setFfmpegPath(ffmpegPath);
ffmpeg(filePath).ffprobe((err: any, metadata: ffmpeg.FfprobeData) => {
if (err) {
reject(err);
reject(new Error('无法获取视频信息。'));
} else {
const videoStream = metadata.streams.find((s: FfprobeStream) => s.codec_type === 'video');
if (videoStream) {