Axis M1011 cam mjpg stream error

asked 2013-11-01 07:06:56 -0500

moc601 gravatar image

updated 2013-11-01 11:56:25 -0500

I'm using an Axis M1011 camera to stream mjpg frames to a rasberry pi running simplecv 1.3.0.

I have been successful in viewing the stream from the camera using Firefox.
http://192.168.1.75/mjpg/1/video.mjpg

I have a very simple test program that throws an error.
This test program is common example code, there appears to be some kind of incompatibility between what the axis is sending and what simplecv is expecting. 

#!/usr/bin/python

from SimpleCV import JpegStreamCamera, Display

cam = JpegStreamCamera("http://192.168.1.75/mjpg/1/video.mjpg")
img = cam.getImage()

The ERROR:
ERROR: 
Traceback (most recent call last):
  File "./test", line 6, in <module>
    img = cam.getImage()
  File "/usr/local/lib/python2.7/dist-packages/SimpleCV/Camera.py", line 1031, in getImage
    return Image(pil.open(StringIO(self.camthread.currentframe)), self)
  File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 1980, in open
    raise IOError("cannot identify image file")
IOError: cannot identify image file
Exception in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
  File "/usr/local/lib/python2.7/dist-packages/SimpleCV/Camera.py", line 981, in run
<type 'exceptions.attributeerror'="">: 'NoneType' object has no attribute 'sleep'

</type></module>
edit retag flag offensive close merge delete