Skip to content

rtsp failure: nonmatching transport #15164

@ksmuthucv

Description

@ksmuthucv
System information (version)
  • OpenCV => 4.1.1
  • Operating System / Platform => Windows 64 Bit
  • Compiler => Visual Studio 2017
Detailed description

I couldn't not make rtsp url loaded/displayed with latest codebase via ffmpeg. it gives an error related to transport protocol i.e. Nonmatching transport in server reply. now in the latest code open-cv uses pre-built binaries (opencv_videoio_ffmpeg411_64.dll) to handle rtsp streaming, couldn't debug that part closer. Please note that this rtsp url is streamed propertly in vlc player (latest) && in ffplay.exe via command line arguments.

latest ffmpeg sdk plays this rtsp url without issue and any delay.

Code

std::string nwindow = "OpenCv", address = "rtsp://";

//this below line didn't make any difference either
_putenv_s("OPENCV_FFMPEG_CAPTURE_OPTIONS", "rtsp_transport;udp");

cv::Mat frame;
cv::VideoCapture cap;
bool status = cap.open(address);
while (status && true)
{
cap >> frame;
//(display the frame and proceed)
}

Error

[ INFO:0] global C:\Files\Library\opencv\sources\modules\videoio\src\videoio_registry.cpp (187) cv::`anonymous-namespace'::VideoBackendRegistry::VideoBackendRegistry VIDEOIO: Enabled backends(7, sorted by priority): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); MSMF(970); DSHOW(960); CV_IMAGES(950); CV_MJPEG(940)

[ INFO:0] global C:\Files\Library\opencv\sources\modules\videoio\src\backend_plugin.cpp (340) cv::impl::getPluginCandidates Found 2 plugin(s) for FFMPEG

[ INFO:0] global C:\Files\Library\opencv\sources\modules\videoio\src\backend_plugin.cpp (172) cv::impl::DynamicLib::libraryLoad load C:\Files\Work\Samples\opencv.va.pg\x64\Debug\opencv_videoio_ffmpeg411_64.dll => OK

[ INFO:0] global C:\Files\Library\opencv\sources\modules\videoio\src\backend_plugin.cpp (220) cv::impl::PluginBackend::PluginBackend Video I/O: loaded plugin 'FFmpeg OpenCV Video I/O plugin'
[rtsp @ 0000022b502b75c0] Nonmatching transport in server reply

[ INFO:0] global C:\Files\Library\opencv\sources\modules\videoio\src\backend_plugin.cpp (340) cv::impl::getPluginCandidates Found 2 plugin(s) for GSTREAMER

Can you please help?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions