title: I want to read a video in opencv using url
body: <p>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.</p>
  
  <p>For a rough work, i simply tried to run this using opencv only
  I pasted the link like this:
  video_link = &lt;'link.com'>
  cap = cv2.VideoCapture(video_link)
  It worked.</p>
  
  <p>This is what i tried</p>
  
  <pre><code>from flask import Flask
  import cv2
  
  app = Flask(__name__)
  @app.route("/video/&lt;string:url&gt;")
  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)
  </code></pre>
  
  <p>I'm getting messages like <code>404</code></p>