alliedvision / gst-vimbasrc

Official vimbasrc element for use of Vimba with GStreamer
Other
11 stars 9 forks source link

Pipeline fail to start #7

Closed Michal-Kochman closed 2 years ago

Michal-Kochman commented 2 years ago

On a custom built linux-type OS with gstreamer (32bit ARM) I have succesfully run the instalation scripts for Vimba USB layer, I have included gst vimbasrc plugin (it reports OK using gst-inspect) and installed VimabC and CPP shared libraries. I can get the camera ID running the "print cameras" example provided with the vimba library.

When I try to run the example pipeline to display the video (exatctly as specified in the repo with only change being the camera's ID) the pipeline fails to start wit output ''' Setting pipeline to PAUSED ... ERROR: Pipeline doesn't want to pause. ERROR: from element /GstPipeline:pipeline0/GstVimbaSrc:vimbasrc0: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure. Additional debug info: gstbasesrc.c(3452): gst_base_src_start (): /GstPipeline:pipeline0/GstVimbaSrc:vimbasrc0: Failed to start Setting pipeline to NULL ... Freeing pipeline ... ''' I have attached the gstreamer output fwhen GST_DEBUG=5 debugLevel5.txt

Could anyone please point me in the direction where to look for problem?

Thanks Michal

NiklasKroeger-AlliedVision commented 2 years ago

On line 18295 in the attached log file the following error message is output:

0:00:01.353302667 1766 0x147f600 ERROR             vimbasrc gstvimbasrc.c:1351:open_camera_connection:<vimbasrc0> Could not open camera DEV_1AB22C0107AB. Got error code: Not found.

This indicates, that the camera with the provided camera Id DEV_1AB22C0107AB can not be found on the system. Perhaps there is a mistake in the camera ID?

With your Vimba installation you also received a few pre-compiled code examples. You can find them in your Vimba installation directory for example under <path-to-Vimba>/VimbaC/Examples/Bin/arm_32bit/. You already mention "print cameras", which I assume refers to ListCameras in that directory. Maybe check the output of that example again to make sure, the camera ID is the one you provide to the GStreamer pipeline. You can also just paste the output of the example here.

If you wish to test out the camera stream you can use the AsynchronousGrab example in the mentioned directory. It uses the same frame transfer procedure that gst-vimbasrc uses and would be a good test to see if something is wrong with the camera or if this is just a configuration problem.

Michal-Kochman commented 2 years ago

Hi, sorry for the long delay. It would seem I really sent the wrong output. When used with the correct ID the pipeline does not report any error, it just fails to display anything. I believe it could be too slow USB connection, is that possible?

$ ./SynchronousGrabConsole 
//////////////////////////////////////////
/// Vimba API Synchronous Grab Example ///
//////////////////////////////////////////

Vimba C++ API Version 1.8.4
Camera ID:DEV_1AB22C0107AB

received frame was not complete
$ ./AsynchronousGrabConsole 
///////////////////////////////////////////
/// Vimba API Asynchronous Grab Example ///
///////////////////////////////////////////

Vimba C++ API Version 1.8.4
Opening camera with ID: DEV_1AB22C0107AB
Press <enter> to stop acquisition...
frame incomplete
^C
$ ./BandwidthHelper 

//////////////////////////////////////////
/// Vimba API Bandwidth Helper Example ///
//////////////////////////////////////////

Vimba C++ API Version 1.8.4
Successfully opened USB camera Allied Vision 1800 U-1236c (DEV_1AB22C0107AB)
Bandwidth usage: 100%
$ gst-launch-1.0 vimbasrc camera=DEV_1AB22C0107AB ! videoscale ! videoconvert ! queue ! autovideosink 
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
NiklasKroeger-AlliedVision commented 2 years ago

I believe it could be too slow USB connection, is that possible?

Yes that seems quite likely. The fact that you are also not able to stream images with the AsynchronousGrabConsole example is a good indicator for this.

What kind of system are you using? You mention a 32bit ARM architecture. Would it be possible for you to open the VimbaViewer to connect to the camera? With that you would get full access to the cameras feature tree. Maybe lowering the cameras DeviceLinkThrougputLimit and limiting the recorded frames per second could help in reducing the speed at which data is transmitted to at least got a first stream going.

Are you sure, that the camera is connected as a USB3 device?

This now also feels like it is entering a more general troubleshooting area for the camera stream and is not purely related to the vimbasrc gstreamer plugin. Maybe it would also make sense to contact our support in this regard. You can contact them via the form on our website.

Michal-Kochman commented 2 years ago

Yes, this does not seem to be vimbasrc issue in the end, but rather general camera problem. Thanks for the support anyway.