basler / pypylon

The official python wrapper for the pylon Camera Software Suite
http://www.baslerweb.com
BSD 3-Clause "New" or "Revised" License
566 stars 207 forks source link

Basler pylon Gstreamer for python #328

Open mgabell opened 3 years ago

mgabell commented 3 years ago

Hi,

I have seen the library InstantCameraAppSrc library from Imaginghub that can be used to utilize Gstreamer and Basler camera. It does not however consider python. Its all C code. Anyone here who knows about a libs that support pypylon/python and Gstreamer?

br, Mgabell

thiesmoeller commented 3 years ago

@mgabell It works this way:

+------------+        +--------------+     +-------------+
|            |        |              |     |             
|   PYPYLON  +------->+   appsrc     +----->     gst     
|            |        |              |     |     pipeline..
+------------+        +--------------+     +-------------+

see this explanation: http://lifestyletransfer.com/how-to-use-gstreamer-appsrc-in-python/

mgabell commented 3 years ago

Hi,

Thanks for the response. That means that you will go to the CPU buffer and back into (whatever GPU buffer of sorts) which would decrease performance?

Br, Magnus

From: Thies Möller notifications@github.com Sent: den 23 februari 2021 09:45 To: basler/pypylon pypylon@noreply.github.com Cc: Gabell, Magnus magnus.gabell@uponor.com; Mention mention@noreply.github.com Subject: Re: [basler/pypylon] Basler pylon Gstreamer for python (#328)

@mgabellhttps://github.com/mgabell It works this way:

+------------+ +--------------+ +-------------+

| | | | |

| PYPYLON +------->+ appsrc +-----> gst

| | | | | pipeline..

+------------+ +--------------+ +-------------+

see this explanation: http://lifestyletransfer.com/how-to-use-gstreamer-appsrc-in-python/

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/basler/pypylon/issues/328#issuecomment-784010014, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AS2O5NH2O72KMADN4ON5N2LTANTKTANCNFSM4XQXIJ2Q.

Christina-ko commented 2 years ago

Hi,

Can you provide me a guide on how to do the installation of GStreamer in ubuntu 18.04. I followed the steps stated in https://github.com/joshdoe/gst-plugins-vision. However, when I try this command: gst-launch-1.0 pylonsrc ! autovideoconvert ! autovideosink

I got the error: WARNING: erroneous pipeline: no element "pylonsrc"

Do you have any ideas what caused this error?

MagnusGabell commented 2 years ago

Hi, I dont know exactly. Ensure you have pylon library installed. Also g-streamer, of course. Then for the code attached you also need pypylon. For windows I dont know how to install and get this to work, but in linux it should. not a direct answer to your question but I also struggle with the pipelines. simple_gstr.zip

MagnusGabell commented 2 years ago

Hi,

Can you provide me a guide on how to do the installation of GStreamer in ubuntu 18.04. I followed the steps stated in https://github.com/joshdoe/gst-plugins-vision. However, when I try this command: gst-launch-1.0 pylonsrc ! autovideoconvert ! autovideosink

I got the error: WARNING: erroneous pipeline: no element "pylonsrc"

Do you have any ideas what caused this error?

Try this "gst-inspect-1.0 | grep pylon" (without the quote signs ") to ensure you have the pylon plugins installed properly check also the follow thread on the matter. I had the same problem as you... : https://github.com/joshdoe/gst-plugins-vision/issues/50

Christina-ko commented 2 years ago

Hi, I dont know exactly. Ensure you have pylon library installed. Also g-streamer, of course. Then for the code attachedyou also need pypylon. For windows I dont know how to install and get this to work, but in linux it should. not a direct answer to your question but I also struggle with the pipelines. simple_gstr.zip

Hi,

Thanks for the reply and sharing.

I have installed the pylon 6.2 in my Ubuntu 18.04 PC. How can I check whether my g-streamer is successfully installed in my PC?

MagnusGabell commented 2 years ago

If gst-launch works responds and gst-inspect you probably have it. More likely the pylon-plugin is not.

//Magnus

Christina-ko commented 2 years ago

If gst-launch works responds and gst-inspect you probably have it. More likely the pylon-plugin is not.

//Magnus

Thank you Do you have any document on how to install g-streamer correctly in ubuntu 18.04 ? Do you think this document is useful (https://gitlab.com/zingmars/gst-pylonsrc)?

thiesmoeller commented 2 years ago

Check that GST_PLUGIN_PATH for local install or for a systemwide install GST_PLUGIN_SYSTEM_PATH is pointing to where you installed pylonsrc

Christina-ko @.***> schrieb am Fr., 17. Dez. 2021, 08:25:

If gst-launch works responds and gst-inspect you probably have it. More likely the pylon-plugin is not.

//Magnus

Thank you Do you have any document on how to install g-streamer correctly in ubuntu 18.04 ? Do you think this document is useful ( https://gitlab.com/zingmars/gst-pylonsrc)?

— Reply to this email directly, view it on GitHub https://github.com/basler/pypylon/issues/328#issuecomment-996495449, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKCYJKYAMS5JQ2JP44JZILURLQVZANCNFSM4XQXIJ2Q . You are receiving this because you commented.Message ID: @.***>

Christina-ko commented 2 years ago

Check that GST_PLUGIN_PATH for local install or for a systemwide install GST_PLUGIN_SYSTEM_PATH is pointing to where you installed pylonsrc Christina-ko @.> schrieb am Fr., 17. Dez. 2021, 08:25: If gst-launch works responds and gst-inspect you probably have it. More likely the pylon-plugin is not. //Magnus Thank you Do you have any document on how to install g-streamer correctly in ubuntu 18.04 ? Do you think this document is useful ( https://gitlab.com/zingmars/gst-pylonsrc)? — Reply to this email directly, view it on GitHub <#328 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKCYJKYAMS5JQ2JP44JZILURLQVZANCNFSM4XQXIJ2Q . You are receiving this because you commented.Message ID: @.>

Hi,

I will check it and try it again. Thank you for your help

mgabell commented 2 years ago

I found that it was easy to follow the instruction to get gstreamer to work but to get pylon to work was tricky. I think the solution was in the thread I referred to.