The official SDK libraries make video upload simple. However, if you are building your own workflow then a few extra steps are required.
This workflow is typically used when you build your own application that implements its own video file uploader, or if you want to handle uploading files directly to S3 yourself.
The code examples that follow use the Ruby SDK, but all SDK libraries offer the same functionality.
The API generates 2 types of signature. The signature you need depends on your file and what you know about the file. The SDK will default to a
multipart signature, only falling back to a
single signature if your file size is below
- Generate a
multipartsignature if your file size is at least
- Generate a
singlesignature if your file size is below
5MBor if you don't know the file size.
# multipart VzaarApi::Signature::Multipart.create(filename: 'video.mp4', filesize: 10000000000) # single VzaarApi::Signature::Single.create
The upload process you follow depends on the signature you generated.
multipartsignature requires that you perform a chunked upload to S3. The number and size of chunks are specified in the signature. If you do not use the values specified in the signature your video will not be processed correctly. See the multipart signature documentation for more details.
singlesignature requires that you perform a simple file upload to S3. See the single part signature documentation for more details.
Once your upload has completed successfully, the final step is to tell vzaar that the video is ready for processing. Using the
guid specified in the signature:
Updated less than a minute ago