how could i use gstd with python is there nat way to use with python
how could i use gstd with python is there nat way to use with python
A python client binding was recently added - https://github.com/RidgeRun/gstd-1.x/tree/master/libgstc/pygstc. Looks like the documentation for using python is not yet in place - https://developer.ridgerun.com/wiki/index.php?title=GStreamer_Daemon. Hopefully you can see the pattern on how to create and control pipes and then transfer that knowledge to enable you to use the python GSTD client binding.
@DeveloperRachit you can find the PyGstc documentation here: https://developer.ridgerun.com/wiki/index.php?title=GStreamer_Daemon_-_Python_Client
We released GstD v0.9.0 yesterday, including this feature, so it is pretty new and the documentation is a work in progress. We would be happy to hear your feedback!
can i get example using pygstc with python
how to create pipeline by using pipeline_create these kind of example
You can check out the examples in our wiki page: https://developer.ridgerun.com/wiki/index.php?title=GStreamer_Daemon_-_Python_API#Examples
i want to switch two source dyanamically using gstd with python have you any solution?
File "/home/rachit/gstd-1.x/libgstc/pygstc/gstc.py", line 222, in _send_cmd_line result = json.loads(jresult) File "/usr/lib/python3.6/json/__init__.py", line 348, in loads 'not {!r}'.format(s.__class__.__name__)) TypeError: the JSON object must be str, bytes or bytearray, not 'NoneType' Traceback (most recent call last): File "/home/rachit/gstd-1.x/libgstc/pygstc/gstc.py", line 222, in _send_cmd_line result = json.loads(jresult) File "/usr/lib/python3.6/json/__init__.py", line 348, in loads 'not {!r}'.format(s.__class__.__name__)) TypeError: the JSON object must be str, bytes or bytearray, not 'NoneType' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "switching_testsrc.py", line 27, in <module> gstd_client.element_set('p_4_sink','interpipesrc1','listen-to','src_2') File "/home/rachit/gstd-1.x/libgstc/pygstc/gstc.py", line 554, in element_set self._send_cmd_line(['element_set'] + parameters) File "/home/rachit/gstd-1.x/libgstc/pygstc/gstc.py", line 227, in _send_cmd_line raise GstcError(type(exception).__name__) pygstc.gstcerror.GstcError: TypeError
i am getting that error when running my code because in element_set i set listen-to property
Hi @DeveloperRachit, we have a demo available that uses these Python bindings. It's based on interpipes + deepstream, you can check it here: https://developer.ridgerun.com/wiki/index.php?title=NVIDIA_GTC_2020:_How_to_build_a_multi-camera_Media_Server_for_AI_processing_on_Jetson
About the issue, it seems you're receiving a empty JSON (this is happening because an error generated when setting the listen-to property). Please check you're defining properly your pipelines. You can look at the demo provided above. Also if you can provide code it would be helpful to try to replicate and provide a more precise feedback.
Dear do you hve any kind of switching example between two source using gstd with but should be seamless when I would use live rtmp source
Hi @DeveloperRachit, the next Gstd Release v0.11 will improve the error handling for the python GSTD client.
i am getting that error when running my code because in element_set i set listen-to property