Skip to content

camera: C920 defaults to 2560×1472 at 2 FPS instead of 1080p/30 #21

Closed

Description

@lionel-arnaud

Summary

Monologue 0.3.1 automatically selects the largest advertised C920 format, which on this camera is raw YUYV 2560×1472 at 2 FPS. This produces an unusably choppy recording even though the same camera supports 1920×1080 MJPEG at 30 FPS. There is no UI control to select a different camera format.

Environment

  • Monologue: 0.3.1-1 (Arch Linux package)
  • OS: Arch Linux, kernel 7.2.11-arch1-1
  • Camera: Logitech HD Pro Webcam C920 on USB 2.0 (480M), /dev/video4
  • Capture stack: Qt Multimedia / FFmpeg and PipeWire

Reproduction

  1. Connect a Logitech C920.
  2. Open Monologue and select HD Pro Webcam C920.
  3. Record a short clip using the default automatic camera-format selection.
  4. Inspect the camera or output:
v4l2-ctl -d /dev/video4 --all
Format: 2560x1472, YUYV
Frames per second: 2.000
ffprobe output:
width=2560
height=1472
avg_frame_rate=2/1
nb_frames=476
duration=238.008833

Expected behavior

Monologue should select a practical recording format, for example the C920's 1920×1080 MJPEG at 30 FPS, rather than prioritising resolution alone. Ideally the UI would also allow selecting a camera format.

Actual behavior

Monologue records at 2 FPS. Its log also shows failed hardware-encoder format conversion for the raw source:

Cannot find software target format. sourceSWFormat: yuyv422 targetFormat: vaapi
Cannot find software target format. sourceSWFormat: yuyv422 targetFormat: vulkan

Additional context

The selection appears to come from media::bestFormat() in src/mediautils.cpp: it compares image area before frame rate, so the largest supported format wins unconditionally. The C920's advertised modes include:

  • YUYV 2560×1472: 2 FPS
  • MJPEG 1920×1080: 30 FPS

A heuristic that prefers formats able to reach the target frame rate (30 FPS), then reasonable resolution/compressed pixel formats, would avoid this regression.

Activity

  1. smarkson commented on Nov 6, 2026

    @smarkson

    Same here with a second C920, which advertises a different largest mode (2304×1536 rather than 2560×1472), so this isn't tied to one firmware revision. For me the live preview is already choppy, before recording anything.

    Environment

    • Monologue 0.3.1-1 (Arch package), Omarchy, kernel 7.2.15-1-omarchy
    • Logitech HD Pro Webcam C920 (046d:082d), USB 2.0 (480M) through a dock, /dev/video2

    Largest modes the camera advertises (v4l2-ctl --list-formats-ext)

    YUYV 2304x1536  2 fps    <- what bestFormat() picks
    YUYV 2304x1296  2 fps
    YUYV 1920x1080  5 fps
    MJPG 1920x1080  30 fps   <- usable
    

    Measured throughput (ffmpeg -f v4l2 -input_format <fmt> -video_size <size> -framerate 30 -i /dev/video2 -t 4 -f null -)

    mjpeg    1920x1080  frame=120  fps=30
    yuyv422  2304x1536  frame=7    fps=1.5
    

    The integrated camera on the same machine (Chicony 04f2:b5ab) is fine, because its largest size (1280×720) also has an MJPG 30 fps mode.

    Possible fix in media::bestFormat(): first drop formats whose maxFps can't reach a minimum usable rate (say 24 fps, or targetFps(...) < 24). Only fall back to the current area-first ranking if nothing passes, e.g.:

    const auto usable = [](const Format &f) { return f.maxFps >= 24; };
    const bool anyUsable = std::any_of(formats.begin(), formats.end(), usable);
    // in the loop:
    if (anyUsable && !usable(f)) continue;

    On the C920 this picks a 1920×1080 @ 30 mode: MJPG, or the camera's H.264 mode if Qt exposes that one and it sorts first. That would be worth a pixel-format tiebreak preferring MJPG. Cameras whose largest mode is already 30 fps are unaffected, and low-fps-only devices keep today's behaviour. A format/resolution picker in the UI would still be nice, but this default alone would fix it.

  2. RemyDuijkeren commented on Nov 7, 2026

    @RemyDuijkeren

    Confirming on a third C920 (046d:08e5, max mode 2560×1472 YUYV at 2 fps).

    I built Monologue locally with a 15 fps floor plus fallback, the same approach as #19 (and #18, which uses the same floor with a slightly different fallback), and tested it on the camera. Both test suites pass. Monologue now picks MJPEG 1920×1080 @ 30 and records smoothly. My duplicate issue #23 is closed in favour of this one.

    At that mode the C920 occasionally sends incomplete frames, which show up in recordings as garbage frames. That's a separate problem, filed as #24, with a driver workaround.

  3. dhh commented on Nov 12, 2026

    @dhh
    Contributor

    Fixed by #19: camera modes slower than 15 fps are skipped when a smoother one exists, so the C920 now records MJPEG 1920×1080 at 30 fps instead of the 2 fps still size. The garbled-frame problem some of you saw with MJPEG is tracked in #24.

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