Skip to content

C920 at 1080p cuts frames short, which #40 turns into stutter: step down to a size the camera delivers whole #45

Closed as not planned

Description

@RemyDuijkeren

What happens

On 0.4.0 my Logitech C920 records MJPEG 1920 × 1080, which #19 picks correctly. The takes stutter. Since #40 the incomplete frames from #24 no longer show as a colour grid, but every skipped frame holds the one before, and at 1080p the C920 here cuts enough of them short that you see it.

Take (0.4.0 + #43) Size Frame rate Gaps over 45 ms
7.2 s 1920 × 1080 27.4 fps 13
9.8 s 1920 × 1080 28.5 fps 15

I needed #43 to record at all: plain 0.4.0 stopped both my takes after about 0.4 s with "Audio encoding cannot keep up".

Measurements

Incomplete frames per size, 10 s each with ffmpeg -f v4l2 -input_format mjpeg -video_size <size> -framerate 30 -i /dev/video0 -t 10 -f null -, counting "corrupted data" warnings (uvcvideo at its default nodrop=1):

Size Incomplete
1920 × 1080 14 / 300 (4.7%)
1600 × 896 7 / 300 (2.3%)
1280 × 720 2 / 300 (0.7%)

Same as in #24: the rate follows the amount of data per frame. What I ruled out at 1080p:

  • Exposure: dynamic frame rate off, then manual exposure at 1/50 s. Still 8 gaps per 8 s.
  • Autofocus off: still 8 gaps per 8 s.
  • USB: same result through a hub and plugged straight into the PC.

720p is the usual advice for C920 frame drops, so I don't think it's only my machine (OBS forum, a Mac user with incomplete frames at 1080p but not 720p). Plenty of C920s are fine at 1080p though, so I don't think a model list is the answer.

Suggested fix

#40 already spots every frame the camera cut short, so Monologue can use that count to pick the mode. It's the same idea as #19, based on the frames the camera actually sends instead of the modes it lists, and it adds no control (#14, #3).

  1. Count frames cut short, in the preview and during a take.
  2. Once 4 arrive within 300 frames (over 1%), hold this camera below the current size: bestFormat takes a maximum area and picks the next size down. Outside a take the camera restarts at once. During a take only the limit is saved, and the next start uses it.
  3. Remember the limit under the camera's ID in the settings, so the next start goes straight to it.

The decision comes as soon as the fourth frame arrives, so at 1080p it takes about 3 s, and a size that delivers keeps running without any wait. With 720p at 0.7%, the threshold leaves it alone.

I've been running this locally on 0.4.0 with #43 (and #44 for the last two takes below). The C920 went 1920 × 1080, then 1600 × 896, then 1280 × 720, learning during my first two takes. Since then:

Take Size Frame rate Gaps
8.3 s 1280 × 720 30.0 fps 0
5.7 s 1280 × 720 30.0 fps 0
5.4 s 1280 × 720 30.0 fps 0

It's 43 lines across 5 files, with a formatSelection case built from the C920's real mode list. All backend tests pass. One thing to know: the camera ID is the device node (/dev/video0), so another camera that later gets the same node inherits the limit.

I can open a PR if this is the direction you want.

Environment

Activity

  1. RemyDuijkeren commented on Nov 14, 2026

    @RemyDuijkeren
    Author

    Closing this myself. The frame loss at 1080p is real (about 5% of frames on my C920), but I can't see it in a normal talking-head take, so 1080p is fine for me.

    What I actually heard as stutter was the audio crackle that #44 fixes. I checked whether the clicks lined up with the cut frames, and they don't: in three 1080p takes the clicks landed near a cut frame no more often than chance would put them there. A 720p take with no cut frames at all still crackled until I applied #44. I've confirmed that on #44.

    The step-down patch works, if anyone runs into a camera where the cut frames do show. As it stands, the extra logic isn't worth it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions