# OpenCV/Gstreamer Streaming Optimisation

**URL:** <https://forums.developer.nvidia.com/t/opencv-gstreamer-streaming-optimisation/153889>\
**Category:** Jetson TX2\
**Tags:** opencv, gstreamer\
**Created:** [September 8, 2020, 10:28am UTC](https://forums.developer.nvidia.com/t/opencv-gstreamer-streaming-optimisation/153889 "2020-09-08T10:28:56Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Honey\_Patouceul](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/honey_patouceul/32/389777_2.png) [@Honey\_Patouceul](https://forums.developer.nvidia.com/u/Honey_Patouceul)\
**Post date:** [September 9, 2020, 10:23am UTC](https://forums.developer.nvidia.com/t/opencv-gstreamer-streaming-optimisation/153889/5 "2020-09-09T10:23:22Z")

</div>

The first thing you can do is using BGRx instead of I420 as output of nvvidconv, and use videoconvert for BGRx → BGR. It may be a bit faster than converting in opencv. Reading I420 frames in opencv would only be better if you process your frames in Y(UV) format. If you need BGR (as most opencv algorithm expect), this would be better IMHO.

```auto
nvarguscamerasrc ! video/x-raw(memory:NVMM), width=1920, height=1080,format=NV12, framerate=30/1 ! nvvidconv ! video/x-raw,format=BGRx ! videoconvert ! video/x-raw, format=BGR ! appsink

```

A better alternative would be using jetson-utils for getting frames RGB frames at high rate. See [this example](https://forums.developer.nvidia.com/t/gpu-acceleration-support-for-opencv-gstreamer-pipeline/143909/3).

---

_[View the full topic](https://forums.developer.nvidia.com/t/opencv-gstreamer-streaming-optimisation/153889)._
