# DeepStream python apps in custom application

**URL:** <https://forums.developer.nvidia.com/t/deepstream-python-apps-in-custom-application/146659>\
**Category:** DeepStream SDK\
**Created:** [August 13, 2020, 10:10am UTC](https://forums.developer.nvidia.com/t/deepstream-python-apps-in-custom-application/146659 "2020-08-13T10:10:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LoveNvidia](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@LoveNvidia](https://forums.developer.nvidia.com/u/LoveNvidia)\
**Post date:** [August 13, 2020, 10:10am UTC](https://forums.developer.nvidia.com/t/deepstream-python-apps-in-custom-application/146659/1 "2020-08-13T10:10:07Z")

</div>

Hi guys,  
In this [link](https://github.com/NVIDIA-AI-IOT/deepstream_python_apps/blob/master/apps/deepstream-imagedata-multistream/deepstream_imagedata-multistream.py#L123), we can access to gstreamer pipeline buffer and convert the frame buffers in numpy array, I want to know, How I can to accesses the frame buffers in GPU mem and then feed into my custom processor without convert frames into numpy array.

We have two solutions for using of deepstream decoder(efficient way than opencv+gstreamer):  
the one way is we need to write custom element of processing and register in gstreamer and then put the custom element in the pipeline and then do processing on frames buffer. this way is good but need to write and knowledge gstreamer programming. this way is same way of deep stream.  
the second way is we use only decoded of frames from that [link](https://github.com/NVIDIA-AI-IOT/deepstream_python_apps/blob/master/apps/deepstream-imagedata-multistream/deepstream_imagedata-multistream.py), then passed the frames into custom processor units. for this part I have two question:  
\*\*1-\*\*The loop of gstreamer is same as asyncio programming loop?  
**2-** As you know, If we add additional operation into pad prob function, this cause drop performance, but I want to know, Is it possible to put the frames in the pad prob function and do **loop.create\_task(process(frame))** like async? this cause we here don’t wait to perform processing. like this:

```
def tiler_sink_pad_buffer_probe(pad,info,u_data):
    ....
    ### capture the frames in GPU buffer without converting into numpy
    loop.create_task(process(frame))
    ....
    return Gst.PadProbeReturn.OK

```

---

<div class="post-metadata">

**Author:** ![kayccc](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/kayccc/32/14043_2.png) [@kayccc](https://forums.developer.nvidia.com/u/kayccc)\
**Post date:** [September 23, 2020, 6:58am UTC](https://forums.developer.nvidia.com/t/deepstream-python-apps-in-custom-application/146659/3 "2020-09-23T06:58:10Z")

</div>

Hi LoveNvidia,

We’re discussing if can have some enhancement, but no conclusion yet as to interact with GPU buffer in Python will have some complications.

Sorry for the late response.

---

<div class="post-metadata">

**Author:** ![TomNVIDIA](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/tomnvidia/32/14181_2.png) [@TomNVIDIA](https://forums.developer.nvidia.com/u/TomNVIDIA)\
**Post date:** [October 12, 2021, 4:16pm UTC](https://forums.developer.nvidia.com/t/deepstream-python-apps-in-custom-application/146659/5 "2021-10-12T16:16:28Z")

</div>

Closed on October 12, 2021, 4:16pm UTC


