Hi, so I'm a bit puzzled that your original pipeline works at all:Under libcamera, cameras are no longer simple V4L2 video devices, so the above would actually have to be run like this:If it complains about not finding "v4l2-compat.so", then make sure you've run "sudo apt install libcamera-v4l2".
Coming onto the Python question, the code you have should work, but again, only under libcamerify. So you would start the Python interpreter like this:You also have the option to use the Gstreamer libcamera source instead of the V4L2 compatibility layer. Check that you've done "sudo apt install gstreamer1.0-libcamera" and then replace "v4l2src device=/dev/video0" by "libcamerasrc". In this instance, remove the "libcamerify".
(I've just tried all the above on the latest Raspberry Pi OS on a Pi 4B with a camera v2, and it behaved as described.)
Code:
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw, format=YUY2, width=640, height=480, framerate=30/1 ! videoconvert ! autovideosink
Code:
libcamerify gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw, format=YUY2, width=640, height=480, framerate=30/1 ! videoconvert ! autovideosink
Coming onto the Python question, the code you have should work, but again, only under libcamerify. So you would start the Python interpreter like this:
Code:
libcamerify python
(I've just tried all the above on the latest Raspberry Pi OS on a Pi 4B with a camera v2, and it behaved as described.)
Statistics: Posted by therealdavidp — Tue Dec 10, 2024 1:24 pm