Reading MJPEG stream from Flask server with OpenCV (Python)
Changing the frame generator worked for me:
yield (b'--frame\r\n'
b'Content-Type:image/jpeg\r\n'
b'Content-Length: ' + f"{len(frame)}".encode() + b'\r\n'
b'\r\n' + frame + b'\r\n')