I tried the mjpegStreamServer
from here but it doesn't seems to work...
First of all, most times, after run it throws errors:
—
Exception in thread Thread-1:
Traceback (most recent call last):
File “/usr/lib/python2.7/threading.py”, line 552, in __bootstrap_inner
self.run()
File “stream2.py”, line 93, in run
self.camera.stop_preview()
AttributeError: ‘ImageProcessor’ object has no attribute ‘camera’
HTTP server started…
—
In that case HTTP server doesn’t respond with anything, but throws exception on connection:
—
0.0.0.0 – – [23/Jul/2015 18:52:50] “GET /1.mjpeg HTTP/1.1″ 200 –
—————————————-
Exception happened during processing of request from (‘217.153.167.44′, 60365)
Traceback (most recent call last):
File “/usr/lib/python2.7/SocketServer.py”, line 593, in process_request_thread
self.finish_request(request, client_address)
File “/usr/lib/python2.7/SocketServer.py”, line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File “/usr/lib/python2.7/SocketServer.py”, line 649, in __init__
self.handle()
File “/usr/lib/python2.7/BaseHTTPServer.py”, line 340, in handle
self.handle_one_request()
File “/usr/lib/python2.7/BaseHTTPServer.py”, line 328, in handle_one_request
method()
File “stream2.py”, line 139, in do_GET
stream = ImageProcessor.getInstance().getStream()
File “stream2.py”, line 122, in getStream
return self.buffer.get()
File “stream2.py”, line 29, in get
return self.data[-1]
IndexError: deque index out of range
—————————————-
—
But sometimes it does start correctly, but… when trying to see mjpeg on Chrome, it sends something forever, freezing raspberry… and nothing shows up… in log it looks like this:
—
HTTP server started…
Camera interface started…
0.0.0.0 – – [23/Jul/2015 18:58:00] “GET /1.mjpeg HTTP/1.1″ 200 –
0.0.0.0 – – [23/Jul/2015 18:58:00] “GET /1.mjpeg HTTP/1.1″ 200 –
0.0.0.0 – – [23/Jul/2015 18:58:00] “GET /1.mjpeg HTTP/1.1″ 200 –
0.0.0.0 – – [23/Jul/2015 18:58:00] “GET /1.mjpeg HTTP/1.1″ 200 –
0.0.0.0 – – [23/Jul/2015 18:58:00] “GET /1.mjpeg HTTP/1.1″ 200 –
0.0.0.0 – – [23/Jul/2015 18:58:00] “GET /1.mjpeg HTTP/1.1″ 200 –
0.0.0.0 – – [23/Jul/2015 18:58:00] “GET /1.mjpeg HTTP/1.1″ 200 –
0.0.0.0 – – [23/Jul/2015 18:58:00] “GET /1.mjpeg HTTP/1.1″ 200 –
0.0.0.0 – – [23/Jul/2015 18:58:00] “GET /1.mjpeg HTTP/1.1″ 200 –
0.0.0.0 – – [23/Jul/2015 18:58:00] “GET /1.mjpeg HTTP/1.1″ 200 –
0.0.0.0 – – [23/Jul/2015 18:58:00] “GET /1.mjpeg HTTP/1.1″ 200 –
0.0.0.0 – – [23/Jul/2015 18:58:00] “GET /1.mjpeg HTTP/1.1″ 200 –
0.0.0.0 – – [23/Jul/2015 18:58:00] “GET /1.mjpeg HTTP/1.1″ 200 –
0.0.0.0 – – [23/Jul/2015 18:58:01] “GET /1.mjpeg HTTP/1.1″ 200 –
0.0.0.0 – – [23/Jul/2015 18:58:01] “GET /1.mjpeg HTTP/1.1″ 200 –
0.0.0.0 – – [23/Jul/2015 18:58:01] “GET /1.mjpeg HTTP/1.1″ 200 –
0.0.0.0 – – [23/Jul/2015 18:58:01] “GET /1.mjpeg HTTP/1.1″ 200 –
0.0.0.0 – – [23/Jul/2015 18:58:01] “GET /1.mjpeg HTTP/1.1″ 200 –
0.0.0.0 – – [23/Jul/2015 18:58:01] “GET /1.mjpeg HTTP/1.1″ 200 –
0.0.0.0 – – [23/Jul/2015 18:58:01] “GET /1.mjpeg HTTP/1.1″ 200 –
0.0.0.0 – – [23/Jul/2015 18:58:01] “GET /1.mjpeg HTTP/1.1″ 200 –
0.0.0.0 – – [23/Jul/2015 18:58:01] “GET /1.mjpeg HTTP/1.1″ 200 –
0.0.0.0 – – [23/Jul/2015 18:58:01] “GET /1.mjpeg HTTP/1.1″ 200 –
0.0.0.0 – – [23/Jul/2015 18:58:01] “GET /1.mjpeg HTTP/1.1″ 200 –
(…)
—
Any help?
'mjpeg'
on thestart_recording
line (although vlc won't like that as it's being told to decode h264). That won't work with a web-browser though as they don't understand MJPEG directly.