Code, Computer Vision, Technology And Science

Samsung IP Camera Streaming using RTSP protocol

I am currently working with Samsung IP camera (SNF-7010 & SNF-8010). And I am using rtsp protocol to stream the camera from my application. The simplest way to do it using OpenCV is as follow:First, we need to specify rtsp url correctly:

rtsp://user:pass@ip.add.re.ss/profile2/media.smp

After that, we can feed this url to OpenCV VideoCapture. Here is the example code:

#include "opencv2\videoio.hpp"
#include "opencv2\highgui.hpp"

using namespace cv;

void main()
{
 VideoCapture capture("rtsp://admin:mypass@192.168.2.200/profile2/media.smp");
 Mat frame;

//Press Esc-key to quit the application
 while (waitKey(1) != 27 && capture.read(frame))
 {
 imshow("CAP", frame);
 }
capture.release();
}

Please note that if you are using default factory password (admin:4321), you can dirrectly specify the rtsp url as follow: rtsp://ip.add.re.ss/profile2/media.smp.  You can also enable rtsp connection without authentication (check the user manual).User_Manual-SNF-8010-ENGLISH_Web-0924

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s