hello, i I use a webcam on nx, this is my code:
int main(void)
{
std::string pipe = “rtspsrc protocols=0x00000001 location=rtsp://admin:admin123@192.168.1.64:554/h264/ch1/main/av_stream latency=0 drop-on-latency=true max-size-buffers=0 ! rtph264depay ! nvv4l2decoder enable-max-performance=1 disable-dpb=1 ! nvvidconv output-buffers=1 ! video/x-raw, format=BGRx ! videoconvert ! video/x-raw,format=BGR ! appsink sync=0”;
cv::VideoCapture cap(pipe, cv::CAP_GSTREAMER);
if( !cap.isOpened() )
{
std::cout << "Not good, open camera failed" << std::endl;
return 0;
}
cv::namedWindow("Frame", cv::WINDOW_AUTOSIZE);
cv::Mat frame;
while(true)
{
cap >> frame;
cv::resize(frame, frame, cv::Size(800, 640), 0, 0);
cv::imshow("Frame", frame);
cv::waitKey(1);
}
}
now i got 200ms delay, I want to reduce the delay to 100 milliseconds or less,what can i do?