IP camera with OpenCv in Java

前端 未结 2 1043
伪装坚强ぢ
伪装坚强ぢ 2020-12-19 04:18

I am trying to get and display an video stream from a IP camera. I found some sample code here:http://answers.opencv.org/question/24012/reading-video-stream-from-ip-camera-i

2条回答
  •  被撕碎了的回忆
    2020-12-19 04:33

    After 3 to 4 weeks of hardwork,I found a 100% working solution for this

    First of All you have to load the ffmpeg's dll file Dynamically i-e Using

    System.loadLibrary("[NAME OF YOUR DLL FILE]") You can find the required dll file in **opencv/build/x64/vc11/bin** The name of DLL in my case is "opencv_ffmpeg2413_64.dll" copy the file to default path of the Project and use

    System.loadLibrary("opencv_ffmpeg2413_64");//You May have different File Name Depending on the Version of OpenCV Installed on your Computer
    

    Then You can Simply use

    VideoCapture ipcamera = new VideoCapture("[RTSP URL OF THE IP Camera]")//I used this Demo Link (rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov)
    

提交回复
热议问题