How to stream rtsp videos or mp4 files throught python/flask + opencv
First, you need to download the code to generate your site with flask. To do this, you can use the following @miguelgrinberg project to stream your webcam or image files with flask. git clone https://github.com/miguelgrinberg/flask-video-streaming In app.py you need replace: from camera import Camera by from camera_opencv import Camera Now, you must edit your video source from camera_opencv.py. video_source = 0 , means that you want to stream your webcam (/dev/video0) You can edit it, by a file or a rstp url If you replace 0 by 'video.mp4' you will probably get the following error: Starting camera thread. Exception in thread Thread-4: Traceback (most recent call last): File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner self.run() File "/usr/lib/python3.5/threading.py", line 862, in run self._target(*self._args, **self._kwargs) File "/home/nboettcher/Downloads/rtsp/flask-video-streaming/base_camera.py", line 93, i...