B0332 the resolution can't be changed

  1. Where did you get the camera module(s)? -Amazon

  2. Model number of the product(s)?-B0332

  3. What hardware/platform were you working on?-Debian, DietPi

  4. Instructions you have followed. (link/manual/etc.)

  5. Problems you were having?

This camera is advertised as having multiple resolutions available. Running v4l2-ctl --list-formats-ext -d 4 lists all formats available, but this camera only ever runs at 1280x800. All attempts to change the resolution via OpenCV and command line v4l2 commands do not change the resolution. Is this camera capable of changing it’s resolution as advertised or not. If so, how?

  1. The dmesg log from your hardware?

  2. Troubleshooting attempts you’ve made?

In therminal I entered v4l2-ctl -d 4 --set-fmt-video=width=640,height=480,pixelformat=MJPG , no change. In a python script I entered cam.set(cv2.CAP_PROP_FRAME_WIDTH, 640) and cam.set(cv2.CAP_PROP_FRAME_HEIGHT, 480). Again, no change, just 1280x800.

  1. What help do you need?

Confirm whether this camera operates as advertised, and explain how.

You can try the command below:

v4l2-ctl --device /dev/video0 --set-fmt-video=width=640,height=480,pixelformat=MJPG --stream-mmap --stream-to=640*480.jpg --stream-count=1


Thanks Dion,
Running that command makes no difference.
If I check the configuration immediately after running it, I see the changes were made.

[email protected]i:~# v4l2-ctl -d 4 --get-fmt-video
Format Video Capture:
        Width/Height      : 640/480
        Pixel Format      : 'MJPG' (Motion-JPEG)
        Field             : None
        Bytes per Line    : 0
        Size Image        : 614989
        Colorspace        : Default
        Transfer Function : Default (maps to Rec. 709)
        YCbCr/HSV Encoding: Default (maps to ITU-R 601)
        Quantization      : Default (maps to Full Range)
        Flags             :

But as soon as I run my Python script to actually start acquiring the stream, it reverts back to YUYV at 1280x720.

[email protected]:~# v4l2-ctl -d 4 --get-fmt-video
Format Video Capture:
        Width/Height      : 1280/720
        Pixel Format      : 'YUYV' (YUYV 4:2:2)
        Field             : None
        Bytes per Line    : 2560
        Size Image        : 1843200
        Colorspace        : sRGB
        Transfer Function : Rec. 709
        YCbCr/HSV Encoding: ITU-R 601
        Quantization      : Default (maps to Limited Range)
        Flags             :

That is where I am having difficulty.
I even made a .sh that I call as a subprocess right before acquireing the stream in my script, but still no joy, it reverts back to YUYV at 1280x720. The configuration doesn’t stick.

Bill K.


May you provide us with your script? We’d like to look into it. If it is private, you can send it to us by contacting [email protected]


Well I posted it. I went to make one edit to make it more readable, and your spam filter robot, Akismet,hid it. Hopefully it will be back soon.

Try to contact [email protected] and cc [email protected] again.

Thanks for your collaboration.