I'm wondering if it is possible to encode/decode videos in production on Heroku using opencv-python (along with the Django framework, or with the Flask framework if it needs to be that instead). Basically, the goal is to be able to run functions like the following
import cv2
video = cv2.VideoCapture('url/to/video')
Then from there, be able to run something like: fps = video.get(cv2.CAP_PROP_FPS)
Currently when I right the fps
assignment line, I get back 0
for anything. If you were to run video.read()
you would get back false. There seems to be no way to actually read video files in production. Is this an Opencv-python bug? Or is this something that is not possible?
I've asked this question in a number of places and people seem to think that the only line I'm trying to run is import cv2
and claim that what I'm trying to do is "totally possible". I'm not having trouble importing the library. It's getting any video functions to work. These functions all work locally. But they do not work on a Heroku app in production. Is this something that is not possible with this library?
Tools Im using locally: Python 3.6.4, Django 2.0, Anaconda 4.5.4, Opencv-python 3.4.1