Message Boards Message Boards

Can a video clip be stored in a databin and then accessed for processing?

Posted 2 years ago

I want to upload a video clip to the Wolfram cloud and then access it from the cloud for video processing in the cloud. I saved a video clip to a databin as follows - first I create a FormObject

CloudDeploy[
 FormPage[
  {"video" -> 
    QuickTime | 
     MP4}, 
  DatabinAdd[myDB, #video] &],
 Permissions -> "Public"
 ]

Then I access the URL returned by the CloudDeploy I get a form to upload a video, which I do. What I see in the databin is

Video["/tmp/UserTemporaryFiles/public/13673/4d1/4d1c2014-ae34-4e3b-\
80ba-8d2da7d6aa43/upload-directory-0/trim.5D7FEF2A-41DA-430C-B5BF-\
7C37C80997D9.MOV", Appearance -> Automatic, 
 AudioOutputDevice -> Automatic, SoundVolume -> Automatic]

I do the following in the cloud in a cloud notebook, attempting to create a Video object from the tmp file

vid = Video["/tmp/UserTemporaryFiles/public/13673/4d1/4d1c2014-ae34-4e3b-80ba-\
8d2da7d6aa43/upload-directory-0/trim.5D7FEF2A-41DA-430C-B5BF-\
7C37C80997D9.MOV"]

And I get the dreaded File not found error. So my question is - Is it possible to save a video clip as a binary object to a databin and retrieve it for video processing? It seems like the uploaded file is saved to a tmp file and then deleted before it can be accessed. So how do I achieve what I am trying to do as stated in the first sentence? Thanks much.

POSTED BY: Nitin Borwankar
2 Replies
POSTED BY: Sam Carrettie
POSTED BY: Nitin Borwankar
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract