alliedvision / gst-vimbasrc

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

Issues while installing libraries for Vimbasrc #3

Closed basitraza1214 closed 2 years ago

basitraza1214 commented 2 years ago

Please find the following shell output attached: I have installed the Vimba SDK and I am able to use VimbVIewer. For gst-vimbasrc I successfully run the docker file followed by install.sh but now I am getting this error.

basit@basit-desktop:~/project2/gst-vimbasrc$ gst-launch-1.0 -vv vimbasrc camera=DEV_000F3102A408 ! video/x-bayer,format=grbg ,width=1920,height=1080 ! bayer2rgb ! videoconvert ! x264enc ! rtph264pay ! udpsink host=10.1.3.199 port=5000 WARNING: erroneous pipeline: no element "vimbasrc"

NiklasKroeger-AlliedVision commented 2 years ago

There are pre-compiled binaries available for most systems. You probably do not need to build this project yourself, you can simply use an appropriate binary from the releases page.

followed by install.sh

I do not know which install.sh you are referring to. There is no installation script provided for gst-vimbasrc. General installation instructions are provided in INSTALLING.md. Is this what you are referring to?

It would probably help if you listed the exact steps/commands you performed. The error message pretty clearly points to a problem with the libgstvimbasrc.so file not being loaded by GStreamer. This may be because GStreamer is not aware of the file since it was not placed in an appropriate directory, or because the libVimbaC.so it depends on could not be loaded.

basitraza1214 commented 2 years ago

The directory in which my gst-vimbasrc is cloned is following: /home/basit/project2/gst-vimbasrc whearas the directory for vimba is: /home/basit/project2/Vimba_5_0

Now the issue I am facing is that I believe that there is a path error. The gst-launch-1.0 is unable to recognize vimbasrc.

The file that you mentioned

libgstvimbasrc.so

I am unable to locate it. Can you please point me to where libVimbaC.so file is to be copied or where to add the path to it?

NiklasKroeger-AlliedVision commented 2 years ago

This turned into a wall of text. If you don't care about explanations here is where to place the files. For details please read below:

The file libgstvimbasrc.so is the build result of this repository. It is a shared object file, that contains the vimbasrc element which GStreamer will be using. You can download this file from the releases page. On that page you find several .zip files for different systems. Which file you choose depends on the kind of system you are using. I am guessing that you are using Linux for this. If you are using an embedded board, you likely want to use the ARM64.zip file. If you are using a regular desktop machine, you will want to use the AMD64.zip file. In this zip file you will find the libgstvimbasrc.so file. The next step is to make sure that GStreamer on your system finds this file and tries to load it to make sure that the vimbasrc element becomes available.

From README.md:

GStreamer plugins become available for use in pipelines, when GStreamer is able to load the shared library containing the desired element. GStreamer typically searches the directories defined in GST_PLUGIN_SYSTEM_PATH. By setting this variable to a directory and placing the shared library file in it, GStreamer will pick up the vimbasrc element for use.

This means, that you need to place libgstvimbasrc.so (which you just unpacked from the downloaded zip file) into a directory in which GStreamer searches for elements. You can manually tell GStreamer to search in certain directories by defining the GST_PLUGIN_PATH variable. If you do not want to do that, you can just use a default path in which GStreamer searches if that environment variable is not defined. This would be ~/.local/share/gstreamer-1.0/plugins. On your system this directory probably does not exist. If that is the case create the directory and place libgstvimbasrc.so in there. This way GStreamer will detect this file when it starts and try to load it. Before that is possible however, you will need to make sure that VimbaC is available on your system because libgstvimbasrc.so depends on it.

Again from README.md:

The vimbasrc element uses VimbaC. In order to be usable the VimbaC shared library therefore needs to also be loadable when the element is started. The VimbaC library is provided as part of the Vimba SDK.

As you already mentioned you have Vimba installed on your system. Unfortunately this is not enough. When GStreamer tries to load libgstvimbasrc.so, that file informs it that it has a dependency on libVimbaC.so (the shared object file that contains our VimbaC API). We know, that this file is part of your Vimba installation (if you are using a desktop machine in your case at /home/basit/project2/Vimba_5_0/VimbaC/DynamicLib/x86_64bit/libVimbaC.so), but the operating system is not aware of this file. Linux by default only looks for .so files that need to be loaded in some very specific directories. Similar to how you can tell GStreamer to search for plugins in specific directories, you can also tell the operating system to check certain directories for .so files it might need to load. This can for example be done by defining the LD_LIBRARY_PATH environment variable. Alternatively you again can simply use a default directory in which the operating system searches for .so files. A common place for this would be /usr/local/lib. This means that you can just copy libVimbaC.so into that directory and the operating system will be able to pick it up whenever a file says it depends on it. You do need admin rights to copy files into this directory. A command to do this would be sudo cp /home/basit/project2/Vimba_5_0/VimbaC/DynamicLib/x86_64bit/libVimbaC.so /usr/local/lib/ (adjust path to libVimbaC.so if you are not using an x86 machine). After running this command, you can check to see if the file is recognized by the system by running the following command: ldconfig -v | grep libVimbaC.so. This should print out the newly added file.

Once these two files are placed as described above, you should be able to use the vimbasrc element in your GStreamer pipelines. You can perform a simple check to see if it picked up by querying the element for its capabilities with this command: gst-inspect-1.0 vimbasrc. This should show you some information on the element itself as well as all the options it supports.

basitraza1214 commented 2 years ago

Thank you for such detailed instructions. I followed all of your instructions but still the issue remains persistant. I am attaching my shell outputs for your understanding.

ls ~/.local/share/gstreamer-1.0/plugins libgstvimbasrc.so

basit@basit-desktop:/$ ls usr/local/lib libpng12.a libprotobuf.a libprotoc.a libpng12.la libprotobuf.la libprotoc.la libpng12.so libprotobuf-lite.a libprotoc.so libpng12.so.0 libprotobuf-lite.la libprotoc.so.19 libpng12.so.0.54.0 libprotobuf-lite.so libprotoc.so.19.0.0 libpng.a libprotobuf-lite.so.19 libVimbaC.so libpng.la libprotobuf-lite.so.19.0.0 pkgconfig libpng.so libprotobuf.so python2.7 libpng.so.3 libprotobuf.so.19 python3.6 libpng.so.3.54.0 libprotobuf.so.19.0.0 python3.7

Moreover, I am attaching my bashrc file in a txt format as well and I am running ubuntu 16.04 on a Jetson Nano. bashrc.txt

sudo ldconfig -v | grep libVimbaC.so [sudo] password for basit: /sbin/ldconfig.real: Can't stat /usr/local/lib/aarch64-linux-gnu: No such file or directory /sbin/ldconfig.real: Path /usr/lib/aarch64-linux-gnu/tegra' given more than once /sbin/ldconfig.real: Path/lib/aarch64-linux-gnu' given more than once /sbin/ldconfig.real: Path `/usr/lib/aarch64-linux-gnu' given more than once /sbin/ldconfig.real: /lib/aarch64-linux-gnu/ld-2.27.so is the dynamic linker, ignoring

libVimbaC.so -> libVimbaC.so
libVimbaC.so -> libVimbaC.so
libVimbaC.so -> libVimbaC.so
NiklasKroeger-AlliedVision commented 2 years ago

The output of the ldconfig command seems fine. libVimbaC.so is found successfully.

In your bashrc you seem to have set the GST_PLUGIN_PATH on your system to /home/basit/Downloads. Is there a special reason for that? Since you copied the libgstvimbasrc.so to the default directory the setting from the bashrc now seems I would suggest you remove it. After you do see you probably need to reboot the system for this change to take effect.

Please provide the output of the following commands:

file /usr/local/lib/libVimbaC.so

file .local/share/gstreamer-1.0/plugins/libgstvimbasrc.so

ldd .local/share/gstreamer-1.0/plugins/libgstvimbasrc.so

This should show some more details on the installed files and the last command will see if all dependencies for libgstvimbasrc.so can be loaded.

Additionally the following command might be interesting to see if the element has been blacklisted by GStreamer. Please provide the output of:

gst-inspect-1.0 --print-blacklist

If this shows the vimbasrc element has been blacklisted, you may reset the element cache of GStreamer by deleting the following file: ~/.cache/gstreamer-1.0/registry.x86_64.bin (file ending probably has to be adjusted to match your system architecture)

basitraza1214 commented 2 years ago

Please find the output following: file /usr/local/lib/libVimbaC.so /usr/local/lib/libVimbaC.so: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, BuildID[sha1]=7ccfd55eb3f6d41a040f73a657ac165a0e31f808, stripped

file .local/share/gstreamer-1.0/plugins/libgstvimbasrc.so

.local/share/gstreamer-1.0/plugins/libgstvimbasrc.so: cannot open `.local/share/gstreamer-1.0/plugins/libgstvimbasrc.so' (No such file or directory)

ldd .local/share/gstreamer-1.0/plugins/libgstvimbasrc.so ldd: .local/share/gstreamer-1.0/plugins/libgstvimbasrc.so: No such file or directory

altough the output to the above files shows that the library is missing but I had already changed the path in the bashrc file andit is working now but it is not loading queue and autovideoslink

NiklasKroeger-AlliedVision commented 2 years ago

file .local/share/gstreamer-1.0/plugins/libgstvimbasrc.so .local/share/gstreamer-1.0/plugins/libgstvimbasrc.so: cannot open `.local/share/gstreamer-1.0/plugins/libgstvimbasrc.so' (No such file or directory)

ldd .local/share/gstreamer-1.0/plugins/libgstvimbasrc.so ldd: .local/share/gstreamer-1.0/plugins/libgstvimbasrc.so: No such file or directory

Hmmm. What happened here? I though you added libgstvimbasrc.so to that directory?

From the comment above mine:

ls ~/.local/share/gstreamer-1.0/plugins libgstvimbasrc.so

Did you remove the file again?

andit is working now but it is not loading queue and autovideoslink

Does this mean you can now load vimbasrc as an element? What do you mean by not loading queue and autovideosink? Do you have an error message?

basitraza1214 commented 2 years ago

i did not remove but vimbasrc element is accepted now but I get the following error now:

gst-launch-1.0 vimbasrc camera=DEV_02-2613A-09385 ! videoscale ! videoconvert ! queue ! autovideosink

WARNING: erroneous pipeline: no element "queue" Caught SIGSEGV

0 0x0000007f7ef14ce4 in __waitpid (pid=, stat_loc=0x7fc9533634, options=) at ../sysdeps/unix/sysv/linux/waitpid.c:30

1 0x0000007f7ef502a0 in g_on_error_stack_trace ()

2 0x000000557dbe1c3c in ()

3 0x0000007f7e5c1000 in pthread_mutexattr_init@got.plt ()

Spinning. Please run 'gdb gst-launch-1.0 21727' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.

the same error comes with autovideosink

NiklasKroeger-AlliedVision commented 2 years ago

Let's make sure we know which libgstvimbasrc.so file is loaded. Please run

gst-inspect-1.0 vimbasrc

and provide the output. The first 15 lines or so should be enough. This should show us which file the element is loaded from.

basitraza1214 commented 2 years ago

videoconvert: Factory Details: videoconvert: Rank none (0) videoconvert: Long-name Colorspace converter videoconvert: Klass Filter/Converter/Video videoconvert: Description Converts video from one colorspace to another videoconvert: Author GStreamer maintainers gstreamer-devel@lists.freedesktop.org videoconvert: videoconvert: Plugin Details: videoconvert: Name videoconvert videoconvert: Description Colorspace conversion videoconvert: Filename /home/basit/.local/share/gstreamer-1.0/plugins/libgstvideoconvert.so videoconvert: Version 1.14.5 videoconvert: License LGPL videoconvert: Source module gst-plugins-base videoconvert: Source release date 2019-05-29 videoconvert: Binary package GStreamer Base Plugins (Ubuntu) videoconvert: Origin URL https://launchpad.net/distros/ubuntu/+source/gst-plugins-base1.0 videoconvert: videoconvert: GObject videoconvert: +----GInitiallyUnowned videoconvert: +----GstObject videoconvert: +----GstElement videoconvert: +----GstBaseTransform videoconvert: +----GstVideoFilter videoconvert: +----GstVideoConvert videoconvert: videoconvert: Pad Templates: videoconvert: SRC template: 'src' videoconvert: Availability: Always videoconvert: Capabilities: videoconvert: video/x-raw

NiklasKroeger-AlliedVision commented 2 years ago

Also, why are there dashes (-) in the camera ID? These are not usually part of the ID. You can get the ID by e.g. running the ListCameras example from VimbaC. You should be able to find it as part of your Vimba installation at /home/basit/project2/Vimba_5_0/VimbaC/Examples/Bin/aarch64/ListCameras If you run this file the connected cameras will be listed and you can simply copy the ID from there.

NiklasKroeger-AlliedVision commented 2 years ago

videoconvert: Factory Details: videoconvert: Rank none (0) videoconvert: Long-name Colorspace converter ... videoconvert: Availability: Always videoconvert: Capabilities: videoconvert: video/x-raw

This is not the output I am looking for. This seems to be details on the videoconvert element. Please run gst-inspect-1.0 vimbasrc and copy that output.

basitraza1214 commented 2 years ago

My bad I copied form the wrong shell:

Factory Details: Rank none (0) Long-name Vimba GStreamer source Klass Generic Description GStreamer source plugin for Vimba cameras Author Allied Vision Technologies GmbH

Plugin Details: Name vimbasrc Description GStreamer source plugin for Vimba cameras Filename /home/basit/.local/share/gstreamer-1.0/plugins/libgstvimbasrc.so Version 0.3.2-beta1 License LGPL Source module gstvimbasrc Binary package gstvimbasrc Origin URL https://alliedvision.com/

GObject +----GInitiallyUnowned +----GstObject +----GstElement +----GstBaseSrc +----GstPushSrc +----GstVimbaSrc

Pad Templates: SRC template: 'src' Availability: Always Capabilities: video/x-raw

NiklasKroeger-AlliedVision commented 2 years ago

My bad I copied form the wrong shell: No worries. That happens.

Okay this at least proves, that the element itself can be loaded successfully and is found in the file we were expecting.

Then the problem has to be in the image pipeline. Do you have a display connected to the system or are you connected via ssh? If you have a display we can try to show the live image with this pipeline:

gst-launch-1.0 vimbasrc camera=<ADD-YOUR-ID-HERE> ! videoscale ! videoconvert ! queue ! xvimagesink

Note that I replaced the autovideosink at the end with an xvimagesink which is what seems to work most reliably on linux. Usually autovideosink should just use that internally but this way we can be sure of it.

basitraza1214 commented 2 years ago

WARNING: erroneous pipeline: no element "xvimagesink" WARNING: erroneous pipeline: no element "queue"

The rest of the error remains the same

Do you have a display connected to the system

Yes I have a display connected

NiklasKroeger-AlliedVision commented 2 years ago

This seems like you might be missing parts of the GStreamer installation. Which apt packages did you install? Here is a list of the commands you would use for full installation: https://gstreamer.freedesktop.org/documentation/installing/on-linux.html?gi-language=c

I am not sure which package contains the xvimagesink and queue element. But if you run the full install command (probably for Ubuntu) you should have them.

basitraza1214 commented 2 years ago

I used the same link to install before, I just re-installed but no effect.

NiklasKroeger-AlliedVision commented 2 years ago

Hmm. The error message now clearly indicates, that it cannot find the xvimagesink and queue elements which are part of a regular GStreamer installation.

Maybe something got messed up with the GStreamer search paths. Could you run the following command to show the environment variables and copy the output:

env
basitraza1214 commented 2 years ago

CLUTTER_IM_MODULE=xim LD_LIBRARY_PATH=/usr/local/cuda/lib64 LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arc=01;31:.arj=01;31:.taz=01;31:.lha=01;31:.lz4=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.tzo=01;31:.t7z=01;31:.zip=01;31:.z=01;31:.Z=01;31:.dz=01;31:.gz=01;31:.lrz=01;31:.lz=01;31:.lzo=01;31:.xz=01;31:.zst=01;31:.tzst=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.alz=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.cab=01;31:.wim=01;31:.swm=01;31:.dwm=01;31:.esd=01;31:.jpg=01;35:.jpeg=01;35:.mjpg=01;35:.mjpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.webm=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.ogv=01;35:.ogx=01;35:.aac=00;36:.au=00;36:.flac=00;36:.m4a=00;36:.mid=00;36:.midi=00;36:.mka=00;36:.mp3=00;36:.mpc=00;36:.ogg=00;36:.ra=00;36:.wav=00;36:.oga=00;36:.opus=00;36:.spx=00;36:.xspf=00;36: LC_MEASUREMENT=ur_PK LESSCLOSE=/usr/bin/lesspipe %s %s LC_PAPER=ur_PK LC_MONETARY=ur_PK XDG_MENU_PREFIX=gnome- GST_PLUGIN_SYSTEM_PATH=/home/basit/.local/share/gstreamer-1.0/plugins LANG=en_US.UTF-8 MANAGERPID=5569 DISPLAY=:0 INVOCATION_ID=79a4cebdcccc48519a480387ab696d98 UNITY_DEFAULT_PROFILE=unity COMPIZ_CONFIG_PROFILE=ubuntu GST_PLUGIN_PATH=/home/basit/.local/share/gstreamer-1.0/plugins GTK_CSD=0 COLORTERM=truecolor ZEITGEIST_DATA_PATH=/home/basit/.local/share/zeitgeist USERNAME=basit SSH_AUTH_SOCK=/run/user/1000/keyring/ssh LC_NAME=ur_PK USER=basit DESKTOP_SESSION=unity QT4_IM_MODULE=xim TEXTDOMAINDIR=/usr/share/locale/ GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/2fb44b8e_8fa3_44b2_b0d9_0b0b8329f62f PWD=/home/basit/project2/Vimba_5_0/VimbaPython/Examples HOME=/home/basit GENICAM_GENTL64_PATH=:/home/basit/project2/Vimba_5_0/VimbaGigETL/CTI/arm_64bit JOURNAL_STREAM=8:29102 TEXTDOMAIN=im-config QT_ACCESSIBILITY=1 XDG_SESSION_TYPE=x11 XDG_DATA_DIRS=/usr/share/unity:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop XDG_SESSION_DESKTOP=unity LC_ADDRESS=ur_PK DBUS_STARTER_ADDRESS=unix:path=/run/user/1000/bus,guid=a4413494057b62b24083a9736127690d SSH_AGENT_LAUNCHER=gnome-keyring LC_NUMERIC=ur_PK GTK_MODULES=gail:atk-bridge:unity-gtk-module WINDOWPATH=1 GNOME_SESSION_XDG_SESSION_PATH= TERM=xterm-256color VTE_VERSION=5202 SHELL=/bin/bash QT_IM_MODULE=ibus XMODIFIERS=@im=ibus IM_CONFIG_PHASE=2 DBUS_STARTER_BUS_TYPE=session XDG_CURRENT_DESKTOP=Unity:Unity7:ubuntu GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1 GNOME_TERMINAL_SERVICE=:1.88 UNITY_HAS_3D_SUPPORT=true SHLVL=2 LC_TELEPHONE=ur_PK GDMSESSION=unity GNOME_DESKTOP_SESSION_ID=this-is-deprecated LOGNAME=basit DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus,guid=a4413494057b62b24083a9736127690d XDG_RUNTIME_DIR=/run/user/1000 XAUTHORITY=/run/user/1000/gdm/Xauthority XDG_CONFIG_DIRS=/etc/xdg/xdg-unity:/etc/xdg PATH=/usr/local/cuda/bin:/home/basit/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin LC_IDENTIFICATION=ur_PK LD_PRELOAD=libgtk3-nocsd.so.0 SESSION_MANAGER=local/basit-desktop:@/tmp/.ICE-unix/6143,unix/basit-desktop:/tmp/.ICE-unix/6143 LESSOPEN=| /usr/bin/lesspipe %s GTK_IM_MODULE=ibus LC_TIME=urPK =/usr/bin/env

NiklasKroeger-AlliedVision commented 2 years ago

GST_PLUGIN_SYSTEM_PATH=/home/basit/.local/share/gstreamer-1.0/plugins GST_PLUGIN_PATH=/home/basit/.local/share/gstreamer-1.0/plugins

You have both of these variables defined and they are both pointing to a directory that is searched by default. Maybe by having them both set, you are forcing GStreamer to lok only in that directory which might explain why it can no longer find the default elements queue and xvimagesink. Are you setting these varibles in your bashrc? If so try removing the setting from there and reboot the board. That should clear the entries.

basitraza1214 commented 2 years ago

Setting pipeline to PAUSED ... libEGL warning: DRI2: failed to authenticate libEGL warning: MESA-LOADER: failed to open swrast (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)

libEGL warning: MESA-LOADER: failed to open swrast (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)

nvbuf_utils: Could not get EGL display connection Pipeline is live and does not need PREROLL ... Setting pipeline to PLAYING ... New clock: GstSystemClock ERROR: from element /GstPipeline:pipeline0/GstVimbaSrc:vimbasrc0: Internal data stream error. Additional debug info: gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstVimbaSrc:vimbasrc0: streaming stopped, reason not-negotiated (-4) Execution ended after 0:00:02.605843018 Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ... Caught SIGSEGV

The execution is stuck there

NiklasKroeger-AlliedVision commented 2 years ago

The execution is stuck there

But we are making progress!

Let's see if we can get some more info by turning on some debug information:

GST_DEBUG=WARNING gst-launch-1.0 vimbasrc camera=<ADD-YOUR-ID-HERE> ! videoscale ! videoconvert ! queue ! xvimagesink

This will output all debug messages with a level of WARNING or higher.

basitraza1214 commented 2 years ago

It works perfectly with imagesink but the following error(with debug messages) is with autovideoslink

GST_DEBUG=WARNING gst-launch-1.0 vimbasrc camera=DEV_000F3103902C ! videoscale ! videoconvert ! queue ! xvimagesink Setting pipeline to PAUSED ... 0:00:01.205840334 25265 0x55717f2e40 WARN vimbasrc gstvimbasrc.c:1417:apply_feature_settings: Failed to set "ExposureTime" to 0.000000. Return code was: Not found. Attempting "ExposureTimeAbs" 0:00:01.207742512 25265 0x55717f2e40 WARN vimbasrc gstvimbasrc.c:1428:apply_feature_settings: Failed to set "ExposureTimeAbs" to 0.000000. Return code was: Invalid value. Pipeline is live and does not need PREROLL ... Setting pipeline to PLAYING ... New clock: GstSystemClock ^Z [3]+ Stopped GST_DEBUG=WARNING gst-launch-1.0 vimbasrc camera=DEV_000F3103902C ! videoscale ! videoconvert ! queue ! xvimagesink basit@basit-desktop:~$ GST_DEBUG=WARNING gst-launch-1.0 vimbasrc camera=DEV_000F3103902C ! videoscale ! videoconvert ! queue ! autovideosink Setting pipeline to PAUSED ... 0:00:00.477674490 25545 0x55844fc590 WARN omx gstomx.c:2826:plugin_init: Failed to load configuration file: Valid key file could not be found in search dirs (searched in: /home/basit/.config:/etc/xdg/xdg-unity:/etc/xdg as per GST_OMX_CONFIG_DIR environment variable, the xdg user config directory (or XDG_CONFIG_HOME) and the system config directory (or XDG_CONFIG_DIRS) 0:00:01.302674615 25545 0x55844fc590 WARN vimbasrc gstvimbasrc.c:1417:apply_feature_settings: Failed to set "ExposureTime" to 0.000000. Return code was: Not found. Attempting "ExposureTimeAbs" 0:00:01.304728569 25545 0x55844fc590 WARN vimbasrc gstvimbasrc.c:1428:apply_feature_settings: Failed to set "ExposureTimeAbs" to 0.000000. Return code was: Invalid value. Pipeline is live and does not need PREROLL ... Setting pipeline to PLAYING ... New clock: GstSystemClock 0:00:01.400078036 25545 0x55844e8370 ERROR omxvideosink gstomxvideosink.c:1246:gst_omx_video_sink_setcaps: Unsupported format UYVY 0:00:01.400240331 25545 0x55844e8370 ERROR omxvideosink gstomxvideosink.c:1246:gst_omx_video_sink_setcaps: Unsupported format UYVY 0:00:01.400273978 25545 0x55844e8370 WARN GST_PADS gstpad.c:4226:gst_pad_peer_query: could not send sticky events 0:00:02.923475725 25545 0x55844e8370 ERROR omxvideosink gstomxvideosink.c:1246:gst_omx_video_sink_setcaps: Unsupported format UYVY 0:00:02.923622447 25545 0x55844e8370 ERROR omxvideosink gstomxvideosink.c:1246:gst_omx_video_sink_setcaps: Unsupported format UYVY 0:00:03.964175064 25545 0x55844e82d0 WARN basesrc gstbasesrc.c:3055:gst_base_src_loop: error: Internal data stream error. 0:00:03.964233555 25545 0x55844e82d0 WARN basesrc gstbasesrc.c:3055:gst_base_src_loop: error: streaming stopped, reason not-negotiated (-4) 0:00:03.964440383 25545 0x55844e82d0 WARN queue gstqueue.c:988:gst_queue_handle_sink_event: error: Internal data stream error. 0:00:03.964483561 25545 0x55844e82d0 WARN queue gstqueue.c:988:gst_queue_handle_sink_event: error: streaming stopped, reason not-negotiated (-4) ERROR: from element /GstPipeline:pipeline0/GstVimbaSrc:vimbasrc0: Internal data stream error. Additional debug info: gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstVimbaSrc:vimbasrc0: streaming stopped, reason not-negotiated (-4) Execution ended after 0:00:02.602471915 Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ...

NiklasKroeger-AlliedVision commented 2 years ago

Okay but that seems to be unrelated to using vimbasrc. Just something to keep in mind when setting up the pipeline that you should use xvimagesink.

It seems like autovideosink attempts to use gstomxvideosink which has some problems because it does not get a supported format from the videoconvert element. That is not something I would worry about now. If you really want to you might be able to manually set a format between the videoconvert element and the autovideosink that is supported by gstomxvideosink, but I think it would be better to simply stick to xvimagesink since you know it works.

NiklasKroeger-AlliedVision commented 2 years ago

But it is something I will consider updating the README with. I originally chose the autovideosink because for me it worked on x86 Windows and x86 Linux without a problem. But if it does become an issue on ARM boards, maybe it would be better to explicitly use xvimagesink in the example for Linux systems and an appropriate alternative for Windows.

I hope you will be able to achieve your goals with vimbasrc. If you have further problems feel free to open another issue or contact our support via the form on our website.

basitraza1214 commented 2 years ago

Thank you so much for your support. Would the rtsp link be generated with xvimagesink as well, since I intend to use the video stream in an external python code for object detection. Any ideas on this would be welcome.

NiklasKroeger-AlliedVision commented 2 years ago

RTSP would only really be needed if you want to stream the image data from your board to a different computer via network. In that case you would not need an xvimagesink on your board, as it would only push out the recorded images (usually after performing some encoding into a video format to save on network bandwidth). If you want to perform the image processing on the same board, RTSP would probably not be needed as you don't need to communicate via network and the video encoding would add unwanted artifacts as well as use a lot of unneeded processing power). Instead you could for example use the GStreamer pipeline as an OpenCV image source as was done by someone else in #1. The best course of action very much depends on what you want to do and I would probably need some more information on your planned setup to give better insights.

If you do want to only use this as input for a python image processing pipeline, I would also like to point out that we have a direct Python interface for our Vimba API named VimbaPython. This interface generally would allow you some more fine-grained control over how you receive your images than the vimbasrc element does. It is really up to what you want to do which solution is the best fit for you.

I will close this issue as the installation has been fixed. Like I said if you have further problems feel free to open new issues or contact us in other ways.

Best regards,
-Niklas.

basitraza1214 commented 2 years ago

Hey, Is there a way to save the stream on the device locally?