Commit d6d99c8
committed
Fix screen-recording capture on macOS without Homebrew ffmpeg
The user's "EE4802 screen recording not captured" bug wasn't in the
download path — it was in frame_extractor.py, which still used bare
"ffmpeg" and "ffprobe" subprocess literals. On macOS users whose only
ffmpeg comes from the imageio-ffmpeg wheel (which doesn't ship ffprobe),
every scene-detection / frame-extraction call silently FileNotFoundError'd.
The output PNG never appeared, so the video got classified as "camera"
(no frames = default), screen-recording frame extraction was skipped, and
notes ended up with no slide content.
frame_extractor.py:
- Add _resolve_ffmpeg() / _resolve_ffprobe() / _parse_ffmpeg_duration(),
mirroring the resolver introduced in extract_caption.py for issue #7.
- Cache resolved paths at module level (hot path: one call per scene frame).
- Replace all 4 "ffmpeg" and 1 "ffprobe" literals with resolved paths.
- get_video_duration falls back to parsing ffmpeg stderr when ffprobe absent.
downloader.py (_run_ffmpeg_hls hardening):
- Add -y flag (idempotent against stale partial files).
- Add -loglevel error + -map 0 (keep all selected-variant streams).
- Check output-file size after FfmpegProgress run — progress library
doesn't raise on non-zero exit, so a silent failure would otherwise
write a 0-byte mp4 that downstream stages mangled.
- Surface last 10 lines of stderr when returncode != 0 in the
no-progress-library fallback.
test/test_v0_12_fixes.py: +15 tests (now 65 total)
- Frame-extractor resolver coverage (cache, system/imageio fallback, errors).
- get_video_duration cross-validation (both paths agree, zero on garbage).
- _run_ffmpeg_hls hardening (raises on missing/tiny output, -y presence,
stderr surfaced on non-zero exit).
- Source scan asserts no bare ["ffmpeg", ...] / ["ffprobe", ...] launch
lists remain in frame_extractor.py.
Release: v0.12.10.1 parent 2ee0573 commit d6d99c8
4 files changed
Lines changed: 413 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
946 | 946 | | |
947 | 947 | | |
948 | 948 | | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
949 | 955 | | |
950 | 956 | | |
951 | 957 | | |
| |||
954 | 960 | | |
955 | 961 | | |
956 | 962 | | |
957 | | - | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
958 | 974 | | |
959 | 975 | | |
960 | 976 | | |
961 | 977 | | |
962 | 978 | | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
963 | 986 | | |
964 | | - | |
965 | 987 | | |
966 | | - | |
967 | | - | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
968 | 997 | | |
969 | 998 | | |
970 | 999 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
46 | 137 | | |
47 | 138 | | |
48 | 139 | | |
| |||
115 | 206 | | |
116 | 207 | | |
117 | 208 | | |
| 209 | + | |
118 | 210 | | |
119 | 211 | | |
120 | 212 | | |
121 | | - | |
| 213 | + | |
122 | 214 | | |
123 | 215 | | |
124 | 216 | | |
| |||
287 | 379 | | |
288 | 380 | | |
289 | 381 | | |
| 382 | + | |
290 | 383 | | |
291 | | - | |
| 384 | + | |
292 | 385 | | |
293 | 386 | | |
294 | 387 | | |
| |||
348 | 441 | | |
349 | 442 | | |
350 | 443 | | |
351 | | - | |
| 444 | + | |
352 | 445 | | |
353 | 446 | | |
354 | 447 | | |
| |||
409 | 502 | | |
410 | 503 | | |
411 | 504 | | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
417 | 529 | | |
418 | | - | |
| 530 | + | |
| 531 | + | |
419 | 532 | | |
420 | 533 | | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
| 534 | + | |
| 535 | + | |
425 | 536 | | |
426 | 537 | | |
427 | 538 | | |
| |||
658 | 769 | | |
659 | 770 | | |
660 | 771 | | |
661 | | - | |
| 772 | + | |
662 | 773 | | |
663 | 774 | | |
664 | 775 | | |
| |||
0 commit comments