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
Actual capture frame interval differs from VIDIOC_G_PARM #49
The frame interval reported by VIDIOC_G_PARM does not match the actual
capture timing.
The default timeperframe is 1001/30000 seconds, approximately
33.367 ms per frame. However, reading 61 consecutive frames produces an
average interval of approximately 29.989 ms.
Environment
vcam commit: 1b02973
Kernel: Linux 6.17.0-35-generic
Format: 640x480 RGB24
Result
Format: 640x480 RGB3
Stride/bytesperline: reported=1920 expected=1920 [PASS]
Sizeimage: reported=921600 expected=921600 [PASS]
Frame interval: reported=33.367 ms measured=29.989 ms error=10.1% [FAIL]
Expected behavior
The actual capture interval should be close to the value reported by VIDIOC_G_PARM.
Cause
dev->output_fps stores a V4L2 timeperframe value in seconds per frame,
despite its name suggesting frames per second.
For 1001/30000, this produces approximately 29.97 frames per second, but
the result is subsequently treated as milliseconds. This causes the actual
capture speed to differ from the configured and reported frame interval.
The variable should be renamed to reflect its actual meaning, and the timing
calculation should be corrected so that the configured value, reported value,
and observed capture speed are consistent.
Activity