Upload a video from an external storage location with the Wowza Video REST API

Wowza Video™ allows users to ingest, store, and categorize video content in order to centralize, reuse, amplify, and provide user-friendly access to videos.

This article demonstrates how to upload .mp4 files stored at an external storage location, like AWS or Google, to Wowza Video using the Wowza Video REST API.

Info

This topic only applies to version 2.0 and later of the REST API.

Before you start

You should be familiar with the following concepts:

  • API authentication methods . We use JSON web tokens for API authentication. See Authentication for more information.
  • Environment variables . We use environment variables for the API version and your JWT in the cURL API request examples in this topic to make it easier for you to copy, paste, and run commands in your Terminal or Command Prompt window. If you don't set environment variables for these values, you'll need to manually enter the correct values in the code samples throughout this tutorial. See Tools for testing the API for instructions.

1. Create a copy of your video asset in Wowza Video

Send a POST request to the /videos endpoint with the video's URL to create a copy of the video asset in Wowza Video.

Info

We support multiple video and audio formats, but we recommend MP4 format and H.264 and AAC encoded files.

You can use the following sample request, making sure to:

  • Specify FETCH for the input or upload method. Wowza Video will fetch the video from the external storage URL you specify and then create a copy of the video in Wowza Video. If you want to specify a poster image to display in the player, set fetch_image_url as well.
  • Set any other information you'd like to now, like the video name and description. You can always set these values later using PATCH /video/ID .
    Info

    To categorize a video, you'll need to already have an existing category so you can pass the category ID in this request.

Sample request
Endpoint Reference

Copy
Copied
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${WV_JWT}" \
-d '{
      "video": {
        "input": {
          "method": "FETCH",
          "fetch_url": "https://storage.googleapis.com/myorg/test_files/myvideo.mp4"
        },
        "name":"My video"
      }
}' "${WV_HOST}/api/${WV_VERSION}/videos"

Sample response

The response includes:

  • An id for the asset that you'll use to complete other actions on the asset.

The response might look similar to the following code:

Copy
Copied
{
  "video": {
    ...
    "id": "fc5b04bc-7bf6-468e-ae88-afdb1873a6c4",
    "name": "My video",
    ...
  }
}

When you upload the video to Wowza Video, we'll transcode your MP4 so that you'll also have an HLS stream that ensures the best viewing experience possible. If you want to check the transcoding status of your video, you can send a POST request to /videos/ID, where ID is the ID returned in step 1.

Related API requests