Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Pi Camera 3 #217

Open
dansinclair25 opened this issue Jan 12, 2023 · 12 comments
Open

Support for Pi Camera 3 #217

dansinclair25 opened this issue Jan 12, 2023 · 12 comments

Comments

@dansinclair25
Copy link

I recently purchased the new Pi Camera 3, and after reading the docs it looks like it doesn't use the same libs as the previous versions. Is there a plan to support the camera 3 at all?

@kbingham
Copy link

"yes".

@joriswvanrijn
Copy link

joriswvanrijn commented Apr 5, 2023

Would love that as well!

I am quite new to this and have no idea if it's hard to implement. If you could give me some pointers I would glady contribute!

@kbingham
Copy link

kbingham commented Apr 6, 2023

https://gitlab.freedesktop.org/camera/uvc-gadget works with libcamera and the Raspberry Pi cameras v3

This needs integration with SMWC perhaps in a branch and then further development to consider other features that SMWC had which may likely not be supported in this version of uvc gadget. Uvc-gadget is now a library and the fire code can be used by another/ custom application to implement other features for SMWC

@willnotremember
Copy link

Hello there!
I hope it's ok to ask some advice, because I have been following this tutorial: https://www.raspberrypi.com/tutorials/plug-and-play-raspberry-pi-usb-webcam/ that uses the uvcgadget (@kbingham ) but unfortunately on my Raspberry Pi 4 with a Raspberry Pi Camera V3 Wide Noir it is not working. In VLC it shows "UVC Camera" but won't open a stream. Is there anything I have to be aware of?
Thank you so much!

https://gitlab.freedesktop.org/camera/uvc-gadget works with libcamera and the Raspberry Pi cameras v3

This needs integration with SMWC perhaps in a branch and then further development to consider other features that SMWC had which may likely not be supported in this version of uvc gadget. Uvc-gadget is now a library and the fire code can be used by another/ custom application to implement other features for SMWC

@kbingham
Copy link

@willnotremember Are you using Show me webcam? or just uvc-gadget directly? If you're just using uvc-gadget directly and having issues - then please raise an issue at https://gitlab.freedesktop.org/camera/uvc-gadget/-/issues/new

@willnotremember
Copy link

willnotremember commented May 31, 2023

@kbingham Thank you for the fast reply! I actually tried both – with the same outcome. Other cameras worked, so it's most likely the Module 3 :-/ Will raise the issue!

@kbingham
Copy link

Please make sure you provide full logs and output of what messages you get from the uvc-gadget application.

@willnotremember
Copy link

Hhm that is a bit the point, everything seems to be working and I receive no error messages. There is just no stream after plugging the Raspberry Pi with V3 in.

@acketon
Copy link

acketon commented Jul 11, 2023

I tried this tutorial: https://www.raspberrypi.com/tutorials/plug-and-play-raspberry-pi-usb-webcam/ with a Raspberry Pi Zero W (1st gen) and a Camera Module 3. It worked but was unusable due to choppy and slow video.

In contrast using ShowMeWebCam on a Raspberry Pi Zero W (1st gen) with a Camera Module 2, the performance is excellent.

@kbingham
Copy link

Yes, unfortunately - the hardware JPEG encoder is not exposed in the new camera stack from Raspberry Pi - so it's falling back to software encode and isn't as good performance on the Pi Zero 1st gen. I've used it on the Pi Zero 2 W and it's usable with the v3.

Interestingly though - I thought the hardware encoder wasn't exposed any more - but it looks like there might be something at /dev/video31 - bcm2835-codec-encode_image which has a JPEG output - so we might be able to get that integrated!

@acketon
Copy link

acketon commented Jul 11, 2023

By usable with a Pi Zero 2 W, how would you describe the performance? Any lag? Is it worth buying an overpriced Pi Zero 2 on ebay?

I have a PI Zero W 1 w/ Camera Module 2 built into an Apple iSight case that I've been using as my webcam (based on https://github.com/maxbbraun/pisight) but I've been interested in upgrading it to this Camera Module 3 and seeing if I could get a better quality image out of it.

@kbingham
Copy link

I would never suggest buying an overpriced Pi on ebay - the real retailers are getting stock lately - so if you want to try it - get one from an official source. https://rpilocator.com/?cat=PIZERO2 is worth checking from time to time.

The v3 camera is definitely better quality than the v2 - but on the Pi0-2W it was still a bit choppy with not quite 30FPS - but it was very usable for video calls last I used it. If you want to see the quality before buying one to play with - message me privately and I'll join a video call to you with the device.

There's definitely more that could be done to improve it if someone is willing to spend time looking into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants