I am experimenting with OpenCV on Android. I have seen a lot of online material that utilise VideoCapture to read an rtsp stream.
In all Java examples that I found, the VideoCapture constructor takes a String. However the official javadoc pages ( http://docs.opencv.org/java/2.4.11/ ) only says that an int can be passed to the constructor which is the camera id.
If you have a look at the following stackoverflow thread ( OpenCV IP Camera RTSP stream ) you notice that an URL is passed to the constructor.
What am I missing?
The reason behind VideoCapture failing to open an RTSP stream was because on my machine OpenCV was missing ffmpeg. The way I ended up solving it was by using brew to install ffmpeg and then compiling OpenCV from source using cmake. After that was done, I was able to use OpenCV to read RTSP streams
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.