Kajan001 0 Posted March 29, 2023 Is am trying to get program working on tinker board r2 or s2 with recommended OS. But I am having issues because I am used to raspberry pi and piOS Is there any of the shared libraries that correspond to the following piOS libraries: libbcm_host.so => not found libvcos.so => not found libmmal.so => not found libmmal_core.so => not found libmmal_util.so => not found libmmal_vc_client.so => not found these are libraries referring to the use of the pi camera. Share this post Link to post Share on other sites
tooz 52 Posted April 6, 2023 hello @Kajan001, i'd suggst to use gstreamer and v4l2-ctl as they are more compatible on rockchip-based platforms sudo vi /boot/config.txt edit Line 60 overlay=CSI0-IMX219: gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=NV12,width=640,height=480 ! videoconvert ! autovideosink and then reboot -- reference: rpicamsrc (gstreamer): https://gstreamer.freedesktop.org/documentation/rpicamsrc/index.html?gi-language=c Share this post Link to post Share on other sites
Kajan001 0 Posted April 6, 2023 Thanks! After much research I have found that mmal is pretty much specific for raspberry pi and pi camera. Ffmpeg does not currently work with most rock boards, at least not with video encoding. So Gstreamer it is. If anyone know how to extract motion vectors with gstream or other compatible program, please point me in the right direction. I want to do motion detection, and not the CPU heavy way of comparing jpegs. Share this post Link to post Share on other sites
tooz 52 Posted April 7, 2023 hello @Kajan001, you can use python with gstreamer -- there are python packages that can be used for motion detection https://gstreamer.freedesktop.org/documentation/opencv/motioncells.html?gi-language=c Share this post Link to post Share on other sites
Kajan001 0 Posted April 7, 2023 Thanks, i have looked into that and gstreamer appears to have it's own motion detection addon. I will explore it further once i have figured out hw encoding so I can get decent framerate and resolution. Damn it, my old Pi gets 720p and 20 fps without laggy vids and dropped frames! Gstreamer motion detection https://developer.ridgerun.com/wiki/index.php/GStreamer_Background_Subtraction_Camera-Based_Motion_Detection_Plugin https://forums.developer.nvidia.com/t/motion-vectors-in-gstreamer/167290/4 https://gstreamer.freedesktop.org/documentation/opencv/motioncells.html?gi-language=c Share this post Link to post Share on other sites
Kajan001 0 Posted April 7, 2023 The problem is that like most other MD solutions it compares frames. That's a pretty CPU heavy operation. With picamera and mmal you could extract motion vectors directly (somehow) and use those = less CPU intensive. See pikrellcam Alas, this is not possible with v4l2. Share this post Link to post Share on other sites