I tested some code on my windows who worked perfectly. When exporting it on my VPS (Debian) I had some errors. Does it means it's not possible to make it work on linux at all (there's nothing I can do about it ?) ?
Here's what I found on the package page :
MacOS and Linux wheels have currently some limitations:
- video related functionality is not supported (not compiled with FFmpeg)
- for example ``cv2.imshow()`` will not work (not compiled with GTK+ 2.x or Carbon support)
And here is the output error :
root@vps324173:~/Test# python main.py
* Running on http://myserverip:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 296-193-487
myclientip - - [05/May/2017 04:33:52] "GET / HTTP/1.1" 200 -
a
OpenCV Error: Unknown error code -10 (Raw image encoder error: Empty JPEG image (DNL not supported)) in throwOnEror, file /io/opencv/modules/imgcodecs/src/grfmt_base.cpp, line 139
OpenCV Error: Unknown error code -10 (Raw image encoder error: Empty JPEG image (DNL not supported)) in throwOnEror, file /io/opencv/modules/imgcodecs/src/grfmt_base.cpp, line 139
Debugging middleware caught exception in streamed response at a point where response headers were already sent.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 704, in __next__
return self._next()
File "/usr/local/lib/python2.7/dist-packages/werkzeug/wrappers.py", line 81, in _iter_encoded
for item in iterable:
File "/root/Test/main.py", line 14, in gen
frame = camera.get_frame()
File "/root/Test/camera.py", line 42, in get_frame
ret, jpeg = cv2.imencode('.jpg', image)
error: /io/opencv/modules/imgcodecs/src/grfmt_base.cpp:139: error: (-10) Raw image encoder error: Empty JPEG image (DNL not supported) in function throwOnEror
myclientip - - [05/May/2017 04:33:52] "GET /video_feed HTTP/1.1" 200 -
Thanks for help !