Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to decode video which I get from POST method with OpenCV?

I am writing a Python backend for an Android app with Flask. I get video from POST method (when I do this: print(request.files['video'].read()) I get "d3\xb9}\xff\x04\xa4M\xef\x8fS\xc1\xf0\x9e:|ge\x1cfO\xc1\x11ry\x0b\xea\xd1\x82\xf2\xa9-H..."). I can convert it to numpy array by doing this np.frombuffer(request.files['video'].read(), np.uint8), but I don't know how I can decode it so that I can then process it with OpenCV. Can you please help me?

How to decode video which I get from POST method with OpenCV?

I am writing a Python backend for an Android app with Flask. I get video from POST method (when I do this: print(request.files['video'].read()) I get "d3\xb9}\xff\x04\xa4M\xef\x8fS\xc1\xf0\x9e:|ge\x1cfO\xc1\x11ry\x0b\xea\xd1\x82\xf2\xa9-H..."). I can convert it to numpy array by doing this np.frombuffer(request.files['video'].read(), np.uint8), but I don't know how I can decode it so that I can then process it with OpenCV. Can you please help me?

How to decode video which I get from POST method with OpenCV?

I am writing a Python backend for an Android app with Flask. I get video from POST method (when I do this: print(request.files['video'].read()) I get "d3\xb9}\xff\x04\xa4M\xef\x8fS\xc1\xf0\x9e:|ge\x1cfO\xc1\x11ry\x0b\xea\xd1\x82\xf2\xa9-H..."). I can convert it to numpy array by doing this np.frombuffer(request.files['video'].read(), np.uint8), but I don't know how I can decode it so that I can then process it with OpenCV. Can you please help me?

How to decode video which I get from POST method with OpenCV?

I am writing a Python backend for an Android app with Flask. I get video from POST method (when I do this: print(request.files['video'].read()) I get "d3\xb9}\xff\x04\xa4M\xef\x8fS\xc1\xf0\x9e:|ge\x1cfO\xc1\x11ry\x0b\xea\xd1\x82\xf2\xa9-H..."). I can convert it to numpy array by doing this np.frombuffer(request.files['video'].read(), np.uint8), but I don't know how I can decode it so that I can then process it with OpenCV. Can you please help me?