raspberrypi / libcamera

Other
238 stars 102 forks source link

libcamerasrc doesn't exist after buildin from source. #75

Closed bjajoh closed 1 year ago

bjajoh commented 1 year ago

Hi, I installed this version of libcamera like this: meson build --buildtype=release -Dpipelines=rpi/vc4 -Dipas=rpi/vc4 -Dv4l2=true -Dgstreamer=enabled -Dtest=false -Dlc-compliance=disabled -Dcam=disabled -Dqcam=disabled -Ddocumentation=disabled -Dpycamera=enabled

the camera is correctly detected: `ubuntu@ubuntu:~/libcamera$ libcamera-hello --list-cameras Available cameras

0 : ov5647 [2592x1944 10-bit GBRG] (/base/soc/i2c0mux/i2c@1/ov5647@36) Modes: 'SGBRG10_CSI2P' : 640x480 [58.92 fps - (16, 0)/2560x1920 crop] 1296x972 [43.25 fps - (0, 0)/2592x1944 crop] 1920x1080 [30.62 fps - (348, 434)/1928x1080 crop] 2592x1944 [15.63 fps - (0, 0)/2592x1944 crop]`

However gstreamer can't find the libcamerasrc plugin. WARNING: erroneous pipeline: no element "libcamerasrc"

bjajoh commented 1 year ago

Issue seems to be the path where the plugin is copied. When adding export GST_PLUGIN_PATH=/usr/local/lib/aarch64-linux-gnu/gstreamer-1.0:$GST_PLUGIN_PATH It at least loads.

However the pipeline crashes:

[2:43:33.309448929] [50591]  INFO Camera camera_manager.cpp:297 libcamera v0.0.5+84-27f1d7d4
[2:43:33.351979770] [50592]  INFO RPI vc4.cpp:437 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media1 and ISP device /dev/media0
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[2:43:33.358395792] [50595]  INFO Camera camera.cpp:1033 configuring streams: (0) 640x480-NV21
[2:43:33.361082715] [50592]  INFO RPI vc4.cpp:565 Sensor: /base/soc/i2c0mux/i2c@1/ov5647@36 - Selected sensor format: 640x480-SGBRG10_1X10 - Selected unicam format: 640x480-pGAA
Redistribute latency...
WARNING: from element /GstPipeline:pipeline0/GstAppSink:appsink0: Pipeline construction is invalid, please add queues.
Additional debug info:
../libs/gst/base/gstbasesink.c(1249): gst_base_sink_query_latency (): /GstPipeline:pipeline0/GstAppSink:appsink0:
Not enough buffering available for  the processing deadline of 0:00:00.020000000, add enough queues to buffer  0:00:00.020000000 additional data. Shortening processing latency to 0:00:00.000000000.
WARNING: from element /GstPipeline:pipeline0/GstAppSink:appsink0: Pipeline construction is invalid, please add queues.
Additional debug info:
../libs/gst/base/gstbasesink.c(1249): gst_base_sink_query_latency (): /GstPipeline:pipeline0/GstAppSink:appsink0:
Not enough buffering available for  the processing deadline of 0:00:00.020000000, add enough queues to buffer  0:00:00.020000000 additional data. Shortening processing latency to 0:00:00.000000000.
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:06.248249040
Setting pipeline to NULL ...
Freeing pipeline ...

All of this works when installing just the binary on Raspbian.

6by9 commented 1 year ago

You haven't given the GStreamer pipeline you're trying to run, and if it contains appsink then there's obviously more than just the pipeline going on. Cut your use case down to the basics for test purposes. You also appear to have ignored the error message

Not enough buffering available for  the processing deadline of 0:00:00.020000000, add enough queues to buffer

All of this works when installing just the binary on Raspbian.

Raspberry Pi OS is the only OS that Raspberry Pi directly support. Support for Ubuntu comes from Canonical.

naushir commented 1 year ago

Closing now...