Don't call ffprobe unless mediaTranscode is enabled

This commit is contained in:
Alex Gleason 2025-03-01 18:03:57 -06:00
parent 3035ecaca9
commit c2e6e10a3a
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -44,7 +44,7 @@ export async function uploadFile(
const [baseType] = file.type.split('/'); const [baseType] = file.type.split('/');
perf.mark('probe-start'); perf.mark('probe-start');
const probe = await analyzeFile(file.stream(), { ffprobePath }).catch(() => null); const probe = mediaTranscode ? await analyzeFile(file.stream(), { ffprobePath }).catch(() => null) : null;
const video = probe?.streams.find((stream) => stream.codec_type === 'video'); const video = probe?.streams.find((stream) => stream.codec_type === 'video');
perf.mark('probe-end'); perf.mark('probe-end');