You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Recording fails at 1080p on slower machines: MJPEG is encoded as 4:4:4 in software; no way to lower resolution #3
On a webcam that only offers 1080p as MJPEG, recording fails about a second in with:
Video encoding cannot keep up at this camera's maximum resolution. The take has been stopped and kept.
This happened on a modest machine, so it likely affects anyone with a slower CPU. Because the maximum resolution is always chosen and there is no way to change it, there is no way to work around it from the UI.
The MJPEG frames reach Qt's encoder as compressed Format_Jpeg. Qt decodes them itself inside the encoder, and for this camera that produces 4:4:4 (yuvj444p). The Intel hardware H.264 encoders (VAAPI and QSV) cannot take 4:4:4, so Qt rejects them ("Could not initialize encoder" when forced) and falls back to software libx264. The resulting file was High 4:4:4 Predictive, 10-bit 4:4:4, which is very expensive to encode and also doesn't play in most browsers or phones.
Writer fails the take once 6 frames are queued, which is what the 4:4:4 software encode hits within a second.
Rough numbers for 5 s of synthetic 1080p30 on this machine (ffmpeg, testsrc2): x264 4:4:4 10-bit took 6.5 s (slower than real time), x264 4:2:0 took 3.6 s, and VAAPI H.264 took 0.8 s.
Cameras with 4:2:2 or 4:2:0 MJPEG would be unaffected, which is probably why this isn't seen on faster hardware.
Proposed fix
Decode the MJPEG frames in Writer and hand the encoder plain 8-bit 4:2:0 NV12. Do the decode and conversion on a small worker pool (not the GUI thread), keeping frames in order. The output is standard High-profile yuv420p.
Add a resolution dropdown beside Camera and Microphone, listing the sizes the camera offers. The maximum stays the default and an explicit choice is remembered, so this doesn't change the "never silently reduced" behavior; it is only a user-chosen option.
I have this working and tested locally (a real 4 s take with a pause went from failing to completing at ~29 fps, and ./bin/test passes) and will open a PR.
#32 now hands the encoder 8-bit 4:2:0 frames. That lets VA-API apply on Intel, and it roughly halves the cost of software encoding if Qt still falls back to x264. Could you retest 1080p on current master? If it still stops, please run it with QT_FFMPEG_DEBUG=1 and paste which encoder opens. We've decided against a resolution menu to keep the controls minimal (see #14), but #19 does now skip camera modes that can't sustain 15 fps.
On Intel/AMD this is probably Qt 6.12.0 falling back to libx264 because it never selects VA-API. With a one-function Qt patch, a Celeron N4020 records 720p with hardware encoding at ~38% CPU. Details in #8: #8 (comment)
Activity
dhh commentedon Nov 12, 2026
#32 now hands the encoder 8-bit 4:2:0 frames. That lets VA-API apply on Intel, and it roughly halves the cost of software encoding if Qt still falls back to x264. Could you retest 1080p on current master? If it still stops, please run it with
QT_FFMPEG_DEBUG=1and paste which encoder opens. We've decided against a resolution menu to keep the controls minimal (see #14), but #19 does now skip camera modes that can't sustain 15 fps.hjbarraza commentedon Nov 13, 2026
On Intel/AMD this is probably Qt 6.12.0 falling back to libx264 because it never selects VA-API. With a one-function Qt patch, a Celeron N4020 records 720p with hardware encoding at ~38% CPU. Details in #8: #8 (comment)