Skip to content

Uploading a Video

The VIDEO.TAXI platform allows you to upload videos in various formats. This guide will help you get started with the basics of uploading a video with the API.

  1. Create a new VoD (video on demand) draft. It is important to include the file ending in the name. You can rename the uploaded VoD later to remove the file ending. More parameters can already be passed here, but are not necessary for the upload.
    mutation {
    createVodDraft(name: "Test-VOD.mp4") {
    id
    status
    }
    }
  2. Split your video into chunks of 5MB. Request for every chunk a signed URL to upload the chunk. Then upload the chunk to the signed URL with a PUT request. For every uploaded chunk, you receive an etag in the response header. Save the etag for the next step.
    query {
    vodDraft(id: "<YOUR_VOD_ID>") {
    partUrl(number: 1)
    }
    }
  3. Indicate to VIDEO.TAXI that you are done by calling the processVodDraft function. Pass the etags of all uploaded chunks.
    mutation {
    processVodDraft(id: "<VOD_ID>", parts: ["ETAG1", "ETAG2]) {
    id
    status
    }
    }
  4. Check on the progress of the transcoding process.
    query {
    vodDraft(id:"4qe1eXPhTB2z") {
    id
    status
    }
    }