I have tried many ways but some programs give me a gray color empty screen and another just exit the code detecting camera can not be accessed but couldn't find a solution even though program are successfully build in opencv.

I am using Microsoft Visual Studio 2010 with Opencv 2.4.3

These are the specification of my camera.

- H.264/MJPEG video compression

-G.722 audio compression

- Frame rate 30fps /NTSC, 25fps/PAL

- Resolution: 720P, D1, Half D1, CIF,

- 1/3” SONY CCD, CMOS

- Alarm I/O support motion detection, date, time, event trigger

- Auto Day/Night

- Two-way audio, broadcast system

- RTSP, VLC(PS/TS) stream media protocol

- Bit rate variable 32Kbps-4000Kbps

- Multi-level user accessing with password protection

- Free management software support 1-100 channels

Similar questions and discussions