# Problems of copying gstreamer buffer into numpy array

**URL:** <https://forums.developer.nvidia.com/t/problems-of-copying-gstreamer-buffer-into-numpy-array/157345>\
**Category:** Jetson Nano\
**Tags:** gstreamer\
**Created:** [October 18, 2020, 10:23pm UTC](https://forums.developer.nvidia.com/t/problems-of-copying-gstreamer-buffer-into-numpy-array/157345 "2020-10-18T22:23:11Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![DaneLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/danelll/32/14043_2.png) [@DaneLLL](https://forums.developer.nvidia.com/u/DaneLLL)\
**Post date:** [October 19, 2020, 1:06am UTC](https://forums.developer.nvidia.com/t/problems-of-copying-gstreamer-buffer-into-numpy-array/157345/3 "2020-10-19T01:06:01Z")

</div>

Hi,  
There are several posts with similar questions:

> [@How to pass GstBuffer to inference plugin in custom gstreamer plugin](https://forums.developer.nvidia.com/t/156819):
>
> Hi all, @mdegans, @miguel.taylor I want to create a custom gstreamer buffer and added to deepstream. My goal is to create inference plugin gstreamer like face recognition plugin and add to deepstream pipeline. This work has two Question: I want to use python in do\_transform\_ip() method: 1- How to pass gst-buffer to inferecne model? I don’t want to convert buffer to numpy array. 2- Crop the buffer with given coordinates(metadata) that comes from before element and then feed to model.

> [@Write custom gstreamer plugin in python and use tin deepstream](https://forums.developer.nvidia.com/t/156284):
>
> Hi, Q1- Suppose I create a pipeline and the last pipeline produce with caps : video/x-raw(memory:NVMM) and I want to create a custom plugin and perform some processing on nvidia jetson devices. This need to do processing in GPU buffer? Is it possible to convert buffers to numpy? If it so, Is it optimal solution? Q2- I create a class that inherited from GstBase.BaseTransform and has this method: def do\_transform\_ip(self, buffer: Gst.Buffer) -\> Gst.FlowReturn: // Do some processing on B…

This is known in python programming. We would suggest write a custom plugin in C instead of using numpy array.

---

_[View the full topic](https://forums.developer.nvidia.com/t/problems-of-copying-gstreamer-buffer-into-numpy-array/157345)._
