mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-03 20:04:58 +00:00
change streaming protocol to udp
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user