Skip to content

Commit b3cec7c

Browse files
committed
fix: use -count_packets instead of -count_frames in ffprobe verification
-count_frames decodes every frame which times out on large sessions (422+ frames). -count_packets reads the container index and is near-instant. Also bumped the ffprobe timeout from 30s to 60s as a safety margin.
1 parent 72fac73 commit b3cec7c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/worker/src/compile.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,16 @@ async function verifyVideo(
6262
[
6363
"-v",
6464
"error",
65-
"-count_frames",
65+
"-count_packets",
6666
"-select_streams",
6767
"v:0",
6868
"-show_entries",
69-
"stream=nb_read_frames",
69+
"stream=nb_read_packets",
7070
"-of",
7171
"csv=p=0",
7272
filePath,
7373
],
74-
{ timeout: 30_000 },
74+
{ timeout: 60_000 },
7575
);
7676

7777
const frameCount = parseInt(frameCountStr.trim(), 10);

0 commit comments

Comments
 (0)