[GH-ISSUE #43] ERROR: SampleCB() - buffer sizes do not match #34

Open
opened 2026-03-02 04:08:55 +03:00 by kerem · 1 comment
Owner

Originally created by @misov1 on GitHub (Jan 7, 2023).
Original GitHub issue: https://github.com/gen2brain/cam2ip/issues/43

Hello. First of all, I inform you that I am writing this article through a translator. Please excuse me.

A few days ago, I was using a program that was released as cam2ip-1.6-64bit-cv2.zip, but there was a power outage once due to an accident, and after that, the console displays an ERROR: SampleCB() - buffer sizes do not match error, and it is not running normally.

To solve this problem, I have downgraded to 1.5 version, no cv2 version, and run to 32bit version, but no progress has been made.

The main command to use is cam2ip.exe -width 640 -height 360, and using cam2ip without any further syntax did not run normally. and i'm using Windows 10
image

Originally created by @misov1 on GitHub (Jan 7, 2023). Original GitHub issue: https://github.com/gen2brain/cam2ip/issues/43 Hello. First of all, I inform you that I am writing this article through a translator. Please excuse me. A few days ago, I was using a program that was released as cam2ip-1.6-64bit-cv2.zip, but there was a power outage once due to an accident, and after that, the console displays an ERROR: SampleCB() - buffer sizes do not match error, and it is not running normally. To solve this problem, I have downgraded to 1.5 version, no cv2 version, and run to 32bit version, but no progress has been made. The main command to use is cam2ip.exe -width 640 -height 360, and using cam2ip without any further syntax did not run normally. and i'm using Windows 10 ![image](https://user-images.githubusercontent.com/70870640/211127165-885a2486-b6ee-4420-acde-a8171c0728cc.png)
Author
Owner

@gen2brain commented on GitHub (Jan 12, 2023):

Hello, as I understand you, it used to work then stopped after a power outage, right? This might help you, from here https://opencv.yahoogroups.narkive.com/Yc8H2P6w/error-samplecb-buffer-sizes-do-not-match

This seems to be a problem with the videoInput library that happens only
with some cameras. Do you happen to be using a Microsoft VX-6000 (or
something similar)? It is a result of the setting of the capture size
not working. If you set the capture size to e.g. 640x480, this setting
somehow does not propagate to the driver. The error message happens when
OpenCV receives a frame which does have a size that is different from
what it is expecting. (If you have a debugger, try setting a breakpoint
there and you can see the different buffer sizes)

The only workaround I have found so far is to set the camera's
resolution manually beforehand by using the Webcam software that came
with the camera. Somehow, that setting is remembered by the driver.
<!-- gh-comment-id:1379886263 --> @gen2brain commented on GitHub (Jan 12, 2023): Hello, as I understand you, it used to work then stopped after a power outage, right? This might help you, from here https://opencv.yahoogroups.narkive.com/Yc8H2P6w/error-samplecb-buffer-sizes-do-not-match ``` This seems to be a problem with the videoInput library that happens only with some cameras. Do you happen to be using a Microsoft VX-6000 (or something similar)? It is a result of the setting of the capture size not working. If you set the capture size to e.g. 640x480, this setting somehow does not propagate to the driver. The error message happens when OpenCV receives a frame which does have a size that is different from what it is expecting. (If you have a debugger, try setting a breakpoint there and you can see the different buffer sizes) The only workaround I have found so far is to set the camera's resolution manually beforehand by using the Webcam software that came with the camera. Somehow, that setting is remembered by the driver. ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cam2ip#34
No description provided.