pylon gstreamer executable problem.

dean-reed report abuse

Hello Matt et al.

 I pulled the latest github and built source on an ubuntu 16 (LTS) system. I am not having success in firing up pylongstreamer in any basic way. I think my bases are covered with gstreamer-1(xx) packages and pylon 5.0.9.1xx installed.  Here is an example run output:

======================================

sudo ./pylongstreamer -window
sudo: unable to resolve host ARStick: Connection timed out
Press CTRL+C at any time to quit.
Initializing camera and driver...
Using Camera             : Basler daA1920-30uc (22291970)
Camera Area Of Interest  : 1920x1080
Camera Speed             : 31.0001 fps

(pylongstreamer:4137): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed

(pylongstreamer:4137): GStreamer-CRITICAL **: gst_element_get_static_pad: assertion 'GST_IS_ELEMENT (element)' failed

(pylongstreamer:4137): GStreamer-CRITICAL **: gst_ghost_pad_new: assertion 'GST_IS_PAD (target)' failed

(pylongstreamer:4137): GStreamer-CRITICAL **: gst_element_add_pad: assertion 'GST_IS_PAD (pad)' failed

(pylongstreamer:4137): GStreamer-CRITICAL **: gst_object_unref: assertion 'object != NULL' failed
Creating Pipeline for displaying images in local window...
Could not make sink
An exception occurred in main():
Pipeline building failed!

Press Enter to exit.


===============================

 

Any ideas with the GLIB errors? Thanks! 

 

 

Comments

Answers

mattb report abuse

Hi Dean,

Interesting. It seems to work fine on my 16LTS, so I suspect maybe a missing gstreamer plugin.

Do you see the same when running without sudo?

If so, could you try sending me a debug log? It's done by setting the gstreamer debug variable and redirecting console output to a file. (it's a little tricky to keep environment variables across sudo, so I hope you see this without it :)).

The commands would be:

export GST_DEBUG=*:4

./pylongstreamer -window &> debug.log

and then post the log file.

you can also try with GST_DEBUG=*:2 or *:3. *:4 is a very detailed level though, and should catch a lot.

Comments
dean-reed report abuse

I am not seeing a good way to attach the log, but here it is inline below using the command you specified. 

 

0:00:00.028924648 22686       0xbada00 INFO                GST_INIT gst.c:727:init_post: initialized GStreamer successfully
Initializing camera and driver...
Using Camera             : Basler daA1920-30uc (22291970)
Camera Area Of Interest  : 1920x1080
Camera Speed             : 31.0001 fps
0:00:00.433702956 22686       0xbada00 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:362:gst_element_factory_create: creating element "pipeline" named "pipeline"
0:00:00.578488146 22686       0xbada00 INFO      GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstapp.so" loaded
0:00:00.578557412 22686       0xbada00 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:362:gst_element_factory_create: creating element "appsrc" named "source"
0:00:00.578982696 22686       0xbada00 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseSrc@0xd42ce0> adding pad 'src'
0:00:00.582329245 22686       0xbada00 INFO      GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideoscale.so" loaded
0:00:00.582411558 22686       0xbada00 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:362:gst_element_factory_create: creating element "videoscale" named "rescaler"
0:00:00.582857591 22686       0xbada00 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseTransform@0xd944e0> adding pad 'sink'
0:00:00.582911742 22686       0xbada00 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseTransform@0xd944e0> adding pad 'src'
0:00:00.585029958 22686       0xbada00 INFO      GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcoreelements.so" loaded
0:00:00.585078864 22686       0xbada00 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:362:gst_element_factory_create: creating element "capsfilter" named "rescalerCaps"
0:00:00.585281802 22686       0xbada00 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseTransform@0xed82d0> adding pad 'sink'
0:00:00.585331061 22686       0xbada00 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseTransform@0xed82d0> adding pad 'src'
0:00:00.585367382 22686       0xbada00 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:457:gst_element_factory_make: no such element factory "videoflip"!

(pylongstreamer:22686): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed
0:00:00.585543640 22686       0xbada00 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:362:gst_element_factory_create: creating element "bin" named "sourcebin"
0:00:00.585664918 22686       0xbada00 INFO        GST_ELEMENT_PADS gstutils.c:1573:gst_element_link_pads_full: trying to link element source:(any) to element rescaler:(any)
0:00:00.585700768 22686       0xbada00 INFO                GST_PADS gstutils.c:932:gst_pad_check_link: trying to link source:src and rescaler:sink
0:00:00.585750864 22686       0xbada00 INFO                GST_PADS gstpad.c:4098:gst_pad_peer_query:<rescaler:src> pad has no peer
0:00:00.588747899 22686       0xbada00 INFO                GST_PADS gstutils.c:1446:prepare_link_maybe_ghosting: source and rescaler in same bin, no need for ghost pads
0:00:00.588798699 22686       0xbada00 INFO                GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link source:src and rescaler:sink
0:00:00.588835071 22686       0xbada00 INFO                GST_PADS gstpad.c:4098:gst_pad_peer_query:<rescaler:src> pad has no peer
0:00:00.591812097 22686       0xbada00 INFO                GST_PADS gstpad.c:2521:gst_pad_link_full: linked source:src and rescaler:sink, successful
0:00:00.591849168 22686       0xbada00 INFO               GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.591869336 22686       0xbada00 INFO               GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:<source:src> Received event on flushing pad. Discarding
0:00:00.591905023 22686       0xbada00 INFO        GST_ELEMENT_PADS gstutils.c:1573:gst_element_link_pads_full: trying to link element

0:00:00.591934667 22686       0xbada00 INFO                GST_PADS gstutils.c:932:gst_pad_check_link: trying to link rescaler:src and rescalerCaps:sink
0:00:00.594953266 22686       0xbada00 INFO                GST_PADS gstpad.c:4098:gst_pad_peer_query:<rescalerCaps:src> pad has no peer
0:00:00.595014698 22686       0xbada00 INFO                GST_PADS gstutils.c:1446:prepare_link_maybe_ghosting: rescaler and rescalerCaps in same bin, no need for ghost pads
0:00:00.595051441 22686       0xbada00 INFO                GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link rescaler:src and rescalerCaps:sink
0:00:00.598010940 22686       0xbada00 INFO                GST_PADS gstpad.c:4098:gst_pad_peer_query:<rescalerCaps:src> pad has no peer
0:00:00.598064286 22686       0xbada00 INFO                GST_PADS gstpad.c:2521:gst_pad_link_full: linked rescaler:src and rescalerCaps:sink, successful
0:00:00.598090929 22686       0xbada00 INFO               GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.598109363 22686       0xbada00 INFO               GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:<rescaler:src> Received event on flushing pad. Discarding

(pylongstreamer:22686): GStreamer-CRITICAL **: gst_element_get_static_pad: assertion 'GST_IS_ELEMENT (element)' failed

(pylongstreamer:22686): GStreamer-CRITICAL **: gst_ghost_pad_new: assertion 'GST_IS_PAD (target)' failed

(pylongstreamer:22686): GStreamer-CRITICAL **: gst_element_add_pad: assertion 'GST_IS_PAD (pad)' failed

(pylongstreamer:22686): GStreamer-CRITICAL **: gst_object_unref: assertion 'object != NULL' failed
0:00:00.598293676 22686       0xbada00 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:362:gst_element_factory_create: creating element "videoscale" named "videoscale"
0:00:00.598354723 22686       0xbada00 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseTransform@0xd8cc10> adding pad 'sink'
0:00:00.598394597 22686       0xbada00 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseTransform@0xd8cc10> adding pad 'src'
0:00:00.598432513 22686       0xbada00 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:362:gst_element_factory_create: creating element "capsfilter" named "videocaps"
0:00:00.598474964 22686       0xbada00 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseTransform@0xed8600> adding pad 'sink'
0:00:00.598509422 22686       0xbada00 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseTransform@0xed8600> adding pad 'src'
Creating Pipeline for displaying images in local window...
0:00:00.599628420 22686       0xbada00 INFO      GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideoconvert.so" loaded
0:00:00.599670544 22686       0xbada00 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:362:gst_element_factory_create: creating element "videoconvert" named "converter"
0:00:00.600227167 22686       0xbada00 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseTransform@0xd9c8d0> adding pad 'sink'
0:00:00.600275063 22686       0xbada00 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseTransform@0xd9c8d0> adding pad 'src'
0:00:00.600305724 22686       0xbada00 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:457:gst_element_factory_make: no such element factory "autovideosink"!
Could not make sink
An exception occurred in main():
Pipeline building failed!

 

Comments
mattb report abuse

Thanks Dean! It looks like it's missing the 'videoflip' plugin (which does the image rotation in the CInstantCameraAppSrc):

gst_element_factory_make: no such element factory "videoflip"!

As a test you could try this to see if you have it:

gst-launch-1.0 videotestsrc ! videoflip method=clockwise ! videoconvert ! autovideosink

or

gst-inspect-1.0 videoflip

I believe this plugin is in gstreamer's "good" library, so this may install it:

sudo apt-get install gstreamer1.0-plugins-good

PS: I'll have a look and see if I can add some code to check for the plugins and display a better warning.

Comments
dean-reed report abuse

Thanks Matt! Installing the good plugins fixed the issue. I thought I had previously had that installed, and did not. Your added warning idea would be helpful for the future.

 Side question, maybe for another post title: Do you think that pylongstreamer could be used (Ported/recompiled etc) with GStreamer 0.1? I have a large project that is built on 0.1 (inherited) and it would be ideal to use pylon there.

 

Comments
mattb report abuse

Cool, I'm glad it worked!

0.1 should be possible. I was on the fence about using it in the beginning because of the large amount of users still out there. 

At the core, all I'm really doing is hooking up pylon code to gstreamer's gstappsrc api, and that's in 0.1 also to my knowledge.

The rest of the stuff might be tricky depending on the availability of the plugins, but that stuff is really in there for convinience and demo purposes. I figure in the end, the user will code up his own pipelines, etc. and just use CInstantCameraAppsrc as the source element in their pipeline.

anyway, I'll have a look at it over the next few weeks and see what I can do. If you take a stab at it in the meantime, let me know how it works out too :-)

Comments
Add Answer