Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I solved my problem (reducing the timeout).

The open() is blocking with RTSP sources. The parameter "time-out" in rtspsrc allow me to reduce the timeout (to 1s in my case). Here my command :

m_pCapture->open(QString("rtspsrc location=rtsp://%1 latency=0 tcp-timeout=1 ! rtph264depay ! h264parse ! avdec_h264 output-corrupt=false ! videoconvert ! appsink").arg(m_Url).toLatin1().data(), cv::CAP_GSTREAMER);

I solved my problem (reducing the timeout).

The open() is blocking with RTSP sources. The parameter "time-out" in rtspsrc allow me to reduce the timeout (to 1s in my case). Here my command :

m_pCapture->open(QString("rtspsrc location=rtsp://%1 latency=0 tcp-timeout=1 ! rtph264depay ! h264parse ! avdec_h264 output-corrupt=false ! videoconvert ! appsink").arg(m_Url).toLatin1().data(), cv::CAP_GSTREAMER);

I hope that will help other people ;)