I used host='0.0.0.0' so that i can run this code from a different machine. Now suppose my ip is ###.###.#.###. What i want to do is pass a link like this: ###.###.#.###/ and the video will run on the browser. I tried this way but it seems like it is wrong approach.
For a rough work, i simply tried to run this using opencv only I pasted the link like this: video_link = <'link.com'> cap = cv2.VideoCapture(video_link) It worked.
This is what i tried
from flask import Flask
import cv2
app = Flask(__name__)
@app.route("/video/<string:url>")
def input_value(url):
link = str(url)
return link
cap = cv2.VideoCapture(link)
while (cap.isOpened()):
ret, frame = cap.read()
if ret:
cv2.imshow('output', frame)
if cv2.waitKey(1) == ord('q'):
break
else:
break
if __name__ == "__main__":
app.run(host='0.0.0.0', debug=True)
I'm getting messages like 404