mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-04 04:14:58 +00:00
change streaming protocol to udp
This commit is contained in:
@@ -299,7 +299,7 @@ void CapnSend() {
|
|||||||
return;
|
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);
|
CAP_GSTREAMER, 0, fps, Size(width, height), true);
|
||||||
if (!out.isOpened()) {
|
if (!out.isOpened()) {
|
||||||
cerr << "Error: Can't open video writer" << endl;
|
cerr << "Error: Can't open video writer" << endl;
|
||||||
@@ -314,7 +314,7 @@ void CapnSend() {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write the frame to the RTSP stream
|
// Write the frame to the UDP stream
|
||||||
out.write(frame);
|
out.write(frame);
|
||||||
cout << "Sent image" << endl;
|
cout << "Sent image" << endl;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user