MJPEG streaming and decoding

I want to receive JPEG images from an IP camera (over RTSP). For this, I tried cvCreateFileCapture_FFMPEG in OpenCV. But ffmpeg seems to have some problem with the MJPEG format of the streaming (since it automatically tries to detect the streaming info) and I end up with the following error

mjpeg: unsupported coding type

I, then, decided to use live555 for streaming. Till now, I can successfully establish streaming and capture (non-decoded) images through openRTSP.

The question is how can I do this in my application, e.g., in OpenCV. How can I use openRTSP in OpenCV to get images and save them in JPEG format?

I have heard that the data from openRTSP can be sent to a buffer (or a named pipe) and then read in OpenCV's IplImage. But I don't know how to do this.

I will really appreciate any help/suggestion in about this problem. I need answers of either of the following questions:

  1. How can I disable ffmpeg's automatic stream information detection and specify my own format (mjpeg), or
  2. How can I use openRTSP in OpenCV?

Regards,

16
задан Roman R. 23 October 2012 в 21:14
поделиться