I've got a weird problem:
I've installed the OpenCV lib on my Pi. I have a Pi Cam connexted to the Pi (i am able to list all video devices and am able to take a picture with raspistill)
But when i try to take a video feed from opencv with python
from flask import Flask, render_template, Response
import cv2
app = Flask(__name__)
cap = cv2.VideoCapture(1)
I get the error:
[ WARN:0] global /tmp/pip-wheel-qd18ncao/opencv-python/opencv/modules/videoio/src/cap_v4l.cpp (893) open VIDEOIO(V4L2:/dev/video0): can't open camera by index
I tried it with different index (from -1 up to 13) but nothing works.
Any hints ?