-
Notifications
You must be signed in to change notification settings - Fork 337
Raspberry Pi 5 with Camera Module 3 #1130
-
I picked up a RPi5 and a Camera Module 3. The RPi 5 is quite different than previous versions and I have been hoping to (and having a difficult time) getting this producer to function on the RPi 5. If anyone has had any success or can offer any guidcente - it would be greatly appreciated. Posted this same on the RPi forums as well: have been banging my head on this one for a bit - I have tried quite a few different tutoriels and troubleshooting steps I have come across, but running through the AWS documentation seems to get me the closest - so that's what I'll post. Following the instructions found here : The final step is to start the camera and publish to the video stream. I am authenticated, the camera starts, the remote stream and relevant info is loaded, but then I fail with:
Full output:
Any assistance or guidance from someone who may have already got thisa working on RPi 5 with Camera module 3 - greatly appreciated! |
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments · 11 replies
-
I'm having this exact same issue with a Pi 4 and bookworm. is there a solution? |
Beta Was this translation helpful? Give feedback.
All reactions
-
lol. I don't remember. I got squirreled into about 40 new projects since then. I did end up getting everything working to a point that I forgot to chase it down further if I recall correctly |
Beta Was this translation helpful? Give feedback.
All reactions
-
Scott, subprocess.Popen("gst-launch-1.0 libcamerasrc ! " + pretty ugly, but working. this was for a prototype and only for a demo. I would like to revisit this if my project goes forward. -V |
Beta Was this translation helpful? Give feedback.
All reactions
-
I am in no way a contributor of any of this - merely a wannabe developer playing around at home trying to build cool stuff :) |
Beta Was this translation helpful? Give feedback.
All reactions
-
I am having same issue with Raspberry Pi 5. Is there solution? |
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks for the details. From my experience, the time freezing issue is usually due to the encoder not being able to accept incoming frames or unrecognized format. You can try removing elements from the right of the pipeline 1 at a time and replacing it with It seems that your Rpi doesn't have the v4l2 hardware accelerated encoder installed, or it's unsupported on your device. Want to make sure that Can you share which cmake command you used to build the project, and also share the exit code of the bus error? You can do To narrow down the issue further, does kvssink only return a bus error with the pipeline above, or also with the videotestsrc pipeline found here: https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/gs-send-data.html#send-data-run-samples, or the non- |
Beta Was this translation helpful? Give feedback.
All reactions
-
Thank you again for the fast answer! Unfortunately I can't get back to this until next Monday. But at least to this: "It seems that your Rpi doesn't have the v4l2 hardware accelerated encoder installed, or it's unsupported on your device. Want to make sure that gst-plugins-good is installed as that may enable it." I researched this today and I found people saying this in multiple places: "On Pi5, there is not hardware H.264 encoder, so the v4l2h264enc V4L2 driver is not present. All encoding tasks are handled through the software libav encoder interface." And I am 100% sure that I installed e.g. the gst-plugins-good but the encoding did not work. But as said I will get back to this on Monday. |
Beta Was this translation helpful? Give feedback.
All reactions
-
This works:
This works:
This fails:
It gets stuck to this:
Same with more detailed logging ( GST_DEBUG="*:5" )
Let's test with x264enc
It failed in a similar way
For the plugins, I have the gst-plugins-good installed but what I understood is that the Pi5 has no hardware support for video encoding. For the project building, I have tried two different ways.
With both builds I have got somewhat similar errors. For the bus error gst-launch-1.0 libcamerasrc ! Here is some more detailed logging for it
If I run The test found here: https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/gs-send-data.html#send-data-run-samples also produces the bus error This
Gave this
And here is the same with more detailed logging
I tried also with the other build (1.) and got bit different result:
And for the sample.mp4 I got also the bus error This
Gave this
Same with more detailed logging:
Here is some info relating to the encoders:
Let me know if you want to know something more. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks for the info, I was able to reproduce this on my RPI 4B. I was able to build the SDK with this (make sure to do a clean build by deleting open-source and dependency folders):
Afterwards, I was able to use both the
Trying with non-hardware accelerated encoder as well (working fine on my setup):
|
Beta Was this translation helpful? Give feedback.
All reactions
-
WOW, it works for me too!! Thank you very much!! Can you explain, why it worked like that and not in the previous attempts. |
Beta Was this translation helpful? Give feedback.
Thanks for the info, I was able to reproduce this on my RPI 4B.
I was able to build the SDK with this (make sure to do a clean build by deleting open-source and dependency folders):
Afterwards, I was able to use both the
kvs_gstreamer_sample
andkvssink
with the pi camera using the following and did not encounter any timestamp freezing issue: