0

I've successfully uploaded Images and wanted to see how Clarifai behaves with Videos. According to the DOC/Github, we only have to point to a movie file and change the parameter is_video=True

model.predict_by_filename("/Users/xxx/Desktop/h264.mov", is_video=True)

Doing this it kinda tries to upload (network traffic shows up), but then i am getting the following error:

clarifai.rest.client.ApiError: POST models/aaa03c23b3724a16a56b629203edc62c/versions/aa9ca48295b37401f8af92ad1af0d91d/outputs FAILED. code: 400, reason: Bad Request, error_code: 10020, error_description: Failure, error_details: None

user1767754
  • 23,311
  • 18
  • 141
  • 164
  • 1
    What's the size and runtime of your video? They have limits https://developer.clarifai.com/video/. Based on your call, it looks like you'd be limited to the base64 10MB limit. – clockwatcher Jun 03 '17 at 04:45
  • According to the doc's `The Video API currently supports videos of up to 80MB in size` I don't get the base64 part. – user1767754 Jun 03 '17 at 11:04
  • It supports up to 80MB if you use a URL "and videos of up to 10MB in size, if you are uploading through video bytes (base 64)". You're not using an URL. You're using a local file. That local file is converted to a byte stream (via base64) and sent to their servers. You'd need to have your video somewhere publicly accessible and send a URL reference (http://example.com/myvideos/myvideo.mov) to have it be at the 80MB limit. – clockwatcher Jun 03 '17 at 16:01
  • Oh now i got it! Thanks for the answer! – user1767754 Jun 03 '17 at 19:58

1 Answers1

0

Have thought of using mjpeg instead of h264 as it is "stills" encapsulated as a movie file. Then you can process stills instead of video and your worlflow is greatly improved.

  • 1
    Congrats on writing your first answer. I'm having some difficulty understanding what you mean by "stills". Are you saying that this method processes frame by frame and therefore doesn't run into the max size restriction that the OP was having? Please use complete sentences and check spelling ([answer]) – Cecilia Jul 19 '17 at 17:23