问题
I'm trying to get a videostream vom an ip cam with opencv 3.0 in java. Everything works fine if i look for my webcam with this code:
VideoCapture camera = new VideoCapture(0);
but with the RTSP Stream I get an error. What I found was that it should work to get a RTSP Stream like this:
VideoCapture camera = new VideoCapture("rtsp://test:test@192.168.1.76:88/videoMain");
User: test
Password: test
I am using a Foscam FI9805W. On this website are possible ways to connect but nothings works (http://www.ispyconnect.com/man.aspx?n=foscam)
I only can connect via VLC Player and the rtsp://test:test@192.168.1.76:88/videoMain.
Does anyone know what I am doing wrong or could give me a hint where to search? I'm out of ideas. Or does anyone know a better way to access a RTSP stream with java?
Thanks
回答1:
I solved it with vlcj
the code is from here: http://capricasoftware.co.uk/#/projects/vlcj/tutorial/direct-rendering
来源:https://stackoverflow.com/questions/32055704/java-opencv-3-0-videocapture-rtsp-stream-from-foscam-fi9805w