I am using OpenCV's VideoCapture and VideoWriter class. I record a MJPEG stream from an IP camera. To the video writer class, I pass the same parameters which I got calling get in the VideoCapture instance. After recording the video, I can successfully open it in Media Player Classic. But if I try to open the same video in another OpenCV app, I can't seem to stream the video. The call to open succeeds but then successive calls to read fails and I can't grab any frame.

Please, Help!

有帮助吗?

解决方案

I guess my problem was my cheap Ip camera. Once I set the FOURCC code manually to MJPEG (instead of getting from the camera), then my problems are solved...

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top