From a4ba54161afdcd4ce03fe2c8dbfcf441050d0993 Mon Sep 17 00:00:00 2001 From: Sam Hos Date: Tue, 14 Jan 2025 15:04:06 +0100 Subject: [PATCH] change streaming protocol to udp --- src/C++/Driver/src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/C++/Driver/src/main.cpp b/src/C++/Driver/src/main.cpp index faabda2..988d214 100644 --- a/src/C++/Driver/src/main.cpp +++ b/src/C++/Driver/src/main.cpp @@ -299,7 +299,7 @@ void CapnSend() { return; } - VideoWriter out("appsrc ! videoconvert ! video/x-raw,format=I420 ! x264enc speed-preset=ultrafast bitrate=600 key-int-max=" + to_string(fps * 2) + " ! video/x-h264,profile=baseline ! rtspclientsink location=rtsp://localhost:8554/mystream", + VideoWriter out("appsrc ! videoconvert ! video/x-raw,format=I420 ! x264enc speed-preset=ultrafast bitrate=600 key-int-max=" + to_string(fps * 2) + " ! video/x-h264,profile=baseline ! mpegtsmux ! udpsink host=127.0.0.1 port=5000", CAP_GSTREAMER, 0, fps, Size(width, height), true); if (!out.isOpened()) { cerr << "Error: Can't open video writer" << endl; @@ -314,7 +314,7 @@ void CapnSend() { continue; } - // Write the frame to the RTSP stream + // Write the frame to the UDP stream out.write(frame); cout << "Sent image" << endl;