macOS: camera track fails with 'Frame dimension mismatch' / NotWriting when Insta360 Virtual Camera changes frame size (studio recording, 0.6.0)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- rust
- Lĩnh vực
- audio-video-rtc, backend
Hướng nghiên cứu
Start by tracing camera capture in cap_recording::feeds::camera and the macOS MP4 encoder in cap_enc_avfoundation::mp4, where the logs show the negotiated and delivered frame sizes disagreeing. Check how the encoder handles mismatched dimensions and what camera recording tests cover this path. Done means frames are adopted or scaled consistently and the camera track finishes successfully when the virtual camera changes size.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
On macOS, with the Insta360 Virtual Camera as the camera input, studio recordings sometimes lose the whole camera track. Cap's camera feed reports 1280x720, but the virtual camera delivers frames at a different size (3840x2160) partway into the start of the recording, or the encoder is initialised at 3840x2160 and then receives 1280x720 frames. Every mismatched frame is dropped ("to protect writer"), and when the recording stops the camera track fails with NotWriting. The screen and mic tracks are fine, so the result is a recording with no usable camera video.
Expected: the camera encoder should adopt the actual frame size (or scale frames to the encoder size) instead of dropping every frame once the size changes.
Reproduction
I don't have a deterministic repro. Observed 4 studio recordings in about 20 minutes with the same camera and settings; 2 of the 4 hit the bug, the other 2 recorded normally:
| Recording (UTC) | Camera encoder init | Frames received | Result |
|---|---|---|---|
| 00:06 | 1280x720 | 3840x2160 | mismatch from the first frame, 200+ dropped, camera track failed |
| 00:08 | 3840x2160 | 1280x720 | mismatch from the first frame, 100+ dropped, camera track failed |
| 00:10 | 1280x720 | 1280x720 | OK |
| 00:23 | 1280x720 | 1280x720 | OK (43 s, 1283 frames) |
In every case Starting camera capture logged width=1280 height=720 frame_rate=30.0 pixel_format="BGRA", so the feed's advertised size and the delivered frame size disagree.
Log excerpts
INFO cap_recording::feeds::camera: Starting camera capture camera="Insta360 Virtual Camera" width=1280 height=720 frame_rate=30.0 pixel_format="BGRA"
INFO cap_enc_avfoundation::mp4: Initializing AVFoundation MP4 encoder (VideoToolbox hardware encoding) width=1280 height=720 pixel_format=BGRA frame_rate=Rational(30/1) ...
WARN cap_enc_avfoundation::mp4: Frame dimension mismatch, dropping frame to protect writer expected_width=1280 expected_height=720 frame_width=3840 frame_height=2160 mismatch_count=1
...
WARN cap_enc_avfoundation::mp4: Frame dimension mismatch, dropping frame to protect writer expected_width=1280 expected_height=720 frame_width=3840 frame_height=2160 mismatch_count=200
WARN cap_recording::output_pipeline::macos: Failed to finish camera MP4 encoder: NotWriting
WARN cap_recording::studio_recording: Optional recording track failed during stop track=Camera error=Failed to finish camera MP4 encoder: NotWriting
The second failing recording is the same with the sizes swapped (expected 3840x2160, frame 1280x720).
Additional Context
- Cap version: 0.6.0 (the latest release at the time of writing)
- Operating system, version: macOS 27.0.1 (26A434), Apple Silicon (Mac16,8, M4 Pro, 24 GB)
- Camera: Insta360 Virtual Camera (model id vid D91F / pid B4D3 in Cap's logs)
- Mode: Studio recording, screen + camera + Elgato Wave:3 mic
I have not checked whether the physical camera, without the virtual camera layer, reproduces this. The same pattern (a frame size that differs from what the feed negotiated) could affect any virtual camera that switches output size. Related but different: #2606 (main-thread panic in tauri-runtime-wry).
- Ngôn ngữ chính
- Rust
- Star
- 25k
- Fork
- 2.4k
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 676
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của CapSoftware/Cap
-
Captions panel does not offer to show an existing transcriptCó thể đã có người làm @thedavidweng đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
CapSoftware/Cap#4276 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Download, FAQ, privacy and terms pages have no meta descriptionCó thể đã có người làm @patrickballard đã nhận 13 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
CapSoftware/Cap#3675 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
self hosting
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
CapSoftware/Cap#2384 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Dashboard pagination causes full page reloads on self-hosted CapCó thể đã có người làm @DipanshuAmbilkar03 đã nhận 11 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
CapSoftware/Cap#2305 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
CapSoftware/Cap#1714 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của CapSoftware/Cap
Issue tương tự
-
benchmark-review
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:filesystem bug need-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
libracoder/kiri#364 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
matrix-org/matrix-rust-sdk#7495 ·
Maintainer thường phản hồi trong vòng 1 ngày