Hello,
I am trying to stream an IP camera, via sdp extension,
int main()
{
VideoCapture input(“CAM_configuration.sdp”);
if (!input.isOpened())
{
cout << “failed” << endl;
return -1;
}
Mat img;
while (true)
{
if (!input.read(img))
break;
imshow("cameraRead", img);
waitKey(2);
}
return 0;
}
I get the error,
[ INFO:0] global C:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\backend_plugin.cpp (233) cv::impl::PluginBackend::PluginBackend Video I/O: loaded plugin ‘FFmpeg OpenCV Video I/O plugin’
[rtp @ 000002cbcd6c5c80] Protocol ‘rtp’ not on whitelist ‘file,crypto’!
[ INFO:0] global C:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\backend_plugin.cpp (172) cv::impl::DynamicLib::libraryLoad load opencv_videoio_intel_mfx420_64.dll => FAILED
OpenCV(4.2.0) Error: Bad argument (CAP_IMAGES: can’t find starting number (in the name of file): CAM_configuration.sdp) in cv::icvExtractPattern, file C:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\cap_images.cpp, line 253
[ERROR:0] global C:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\cap.cpp (116) cv::VideoCapture::open VIDEOIO(CV_IMAGES): raised OpenCV exception:
OpenCV(4.2.0) C:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can’t find starting number (in the name of file): CAM_configuration.sdp in function ‘cv::icvExtractPattern’
failed
(process 23560) exited with code -1.
To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
Press any key to close this window . . .
this woks well when I try with ffmpeg command,
ffmpeg -protocol_whitelist file,rtp,udp -i CAM_configuration.sdp -c:v copy test.mp4