Streaming over RTSP (Bug #3494)


Added by Matheus Castro Rocha about 11 years ago. Updated over 9 years ago.


Status:Incomplete Start date:2014-01-21
Priority:Normal Due date:
Assignee:Matheus Castro Rocha % Done:

0%

Category:highgui-camera
Target version:Next Hackathon
Affected version:2.4.0 - 2.4.7 Operating System:Windows
Difficulty:Easy HW Platform:x64
Pull request:

Description

Hello guys !

I have been trying to access an IP Camera through RTSP in Visual Studio 2012. Here is my code:

VideoCapture cap("rtsp://IP_ADRRESS/play1.sdp/?tcp");

if (!cap.isOpened()) {
cout << "Cannot open the video file" << endl;
return -1;
}
double dWidth = cap.get(CV_CAP_PROP_FRAME_WIDTH); double dHeight = cap.get(CV_CAP_PROP_FRAME_HEIGHT); cout << "Frame size : " << dWidth << " x " << dHeight << endl;

namedWindow("MyVideo",CV_WINDOW_AUTOSIZE);

while (1) {
Mat frame;

bool bSuccess = cap.read(frame); 
{
cout << "esc key is pressed by user" << endl;
break;
}
}
if (!bSuccess) 
{
cout << "Cannot read a frame from video file" << endl;
break;
}
imshow("MyVideo", frame);
if (waitKey(30) == 27)

When I run it in debug mode, it works just fine, but when I run it in realese , it doesn't work. Any ideas ?
I was able to access the camera using only ffmpeg.

if i didn't post any useful informantion, let me know !

Thanks a lot !


History

Updated by Andrew Senin about 11 years ago

Matheus, thank you for posting this issue!

Could you please let us know what version of OpenCV you use? If it is not the latest - please try with the latest. Also, please describe how it does not work (crash or no image etc.).

Since our resources now are limited it would be greatly appreciated if you could try to debug this issue locally and send as a fixing push request. You can find all details here: http://code.opencv.org/projects/opencv/wiki/How_to_contribute

Thank you

  • Target version set to Next Hackathon
  • Category set to highgui-camera
  • Difficulty changed from Hard to Easy
  • Priority changed from High to Normal
  • Assignee set to Matheus Castro Rocha
  • Status changed from New to Incomplete

Updated by Maksim Shabunin over 9 years ago

Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/4682

Also available in: Atom PDF