# Efficient pipeline for streaming BGR frames to local network via UDP

**URL:** https://discourse.gstreamer.org/t/efficient-pipeline-for-streaming-bgr-frames-to-local-network-via-udp/2216
**Category:** General Discussion
**Created:** [August 21, 2024, 5:17pm UTC](https://discourse.gstreamer.org/t/efficient-pipeline-for-streaming-bgr-frames-to-local-network-via-udp/2216 "2024-08-21T17:17:22Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![Honey\_Patouceul](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/honey_patouceul/32/365_2.png) [@Honey\_Patouceul](https://discourse.gstreamer.org/u/Honey_Patouceul)
#### Post date: [August 21, 2024, 7:28pm UTC](https://discourse.gstreamer.org/t/efficient-pipeline-for-streaming-bgr-frames-to-local-network-via-udp/2216/3 "2024-08-21T19:28:51Z")

</div>

In addition to what @tpm mentioned above, for more details you may have look to the RTSP example in this post:

> [@Unable to Stream Video with GStreamer HTTP Server](https://discourse.gstreamer.org/t/unable-to-stream-video-with-gstreamer-http-server/1179/6):
>
> You may get better latency with no http server running and just using: gst-launch-1.0 videotestsrc pattern=ball is-live=1 ! video/x-raw,width=320,height=240,framerate=30/1 ! timeoverlay font-desc="Sans, 24" ! tee name=t ! queue ! autovideosink t. ! queue ! videoscale ! video/x-raw,width=640,height=480,framerate=30/1 ! theoraenc ! queue ! oggmux ! tcpserversink host=127.0.0.1 port=8080 and test from localhost with: firefox http://127.0.0.1:8080 cvlc tcp://127.0.0.1:8080 Though, you may bette…

RTSP server may not be required for your case, but that’s just easing things for trying. The example shows some ways for RTP video streaming (to localhost in the example) with gstreamer.

I’d suggest that you try these, adjust to your resolution/framerate and see what better suits your case.

Once done, you may just have to replace videotestsrc with your video source.

At this point you may say if you want to process frames with opencv or if you were just using it for format conversion. If your intent is just streaming the camera and if your USB camera is UVC then a pure gstreamer pipeline using v4l2src may be more efficient with Linux.

If you want to use OpenCV for processing, it may not be the best for latency, though you would use similar pipelines in writer from appsrc (opencv app pushing BGR frames) → videoconvert → encoding\_if\_any → RTP pay → udpsink

---

_[View the full topic](https://discourse.gstreamer.org/t/efficient-pipeline-for-streaming-bgr-frames-to-local-network-via-udp/2216)._
