Capture Video from the Ethernet Camera

I have an Ethernet camera, I have connected this to my Ethernet port and configured the IP address to what the vendor has suggested (
Using the custom software from the vendor I can stream the video, from the command mode I call the .exe file by setting the http port.

I tried streaming the video using the openCV, I am unable to stream it.

VideoCapture cap;“”);

Could anyone guide me to make it work?


Does the string work when called from vlc? What make is the camera?

you mean in vlc media player? I never tried this before.
The Image sensor (AR0147) and ISP (AP201) is from onSemi, but the camera module is from tier1 supplier.

Yes. I always try in vlc as a check to make sure the connection string is correct.

Media->Open Network Stream->PASTE_CONNECTION_STRING->Play

Does the camera stream via rtsp? What is the name of the manufacturer?

Thanks for the quick feedback, I will try configuring vlc and update feedback.

I tried setting up the vlc, it was not streaming. Screenshot of the error is attached.


Let me know if I am doing anything wrong in the code,

VideoCapture cap;“”);

if (!cap.isOpened())
	cout << "Not Opened" << endl;
	return -1;

Mat frame;

while (1)
	if (!
	imshow("ip", frame);
return 0;

What is the manufacturer of your camera? Are you sure you can stream using that link or are you just assuming it should work?

If it is a standard ip camera it will probably default to streaming via rtsp. If it supports onvif you can try ONVIF Device Manager to discover the camera and get the rtsp url.

it’s an entire web page, isn’t it? nothing can deal with web pages, except a browser. open it in the browser, dig around, find the real stream URL