I have an IP camera which streams a rtsp The follow code allows me to show the rtsp stream
int main(int, char**) { cv::VideoCapture vcap; cv::Mat image;
const std::string videoStreamAddress = "rtsp://my_rtspstream";
//open the video stream and make sure it's opened
if(!vcap.open(videoStreamAddress)) {
std::cout << "Error opening video stream or file" << std::endl;
return -1;
}
for(;;) {
if(!vcap.read(image)) {
std::cout << "No frame" << std::endl;
cv::waitKey();
}
cv::imshow("Output Window", image);
if(cv::waitKey(1) >= 0) break;
}
} The problem is that i have about 450-600 ms of delay difference between what is the camera seeing and what i have o the window of opencv, and i need less becouse is camera with pt control.
Do you have any aproach? I should use another thing instead opencv??
Thanks