Upload video file with dash

I have successfully tried the code to upload an image or a csv file and all goes well.
But when trying to upload a video, the captureVideo.isOpened () returns false (an opencv method). That means the video is not opened.
Anyone has a suggestion for video uploading with dash?

The first thing to do would be to check that you’ve processed the uploaded file contents correctly (ie stripping off the content type and decoding the base64 encoded contents) by verifying that you can open and play back the video. If you can open the video then you’re probably looking at an opencv issue or something else that you can debug outside of Dash in a simpler setup.

If you can’t play back the video then check the way you’re processing it. My guess is that you can start by looking at the Dash upload component example, and use the Excel spreadsheet as an example, but then using opencv to read rather than pandas.

1 Like