Skip to main content

Video best practices

Overview

Uploading and managing videos with Teyuto is a straightforward process. This guide will walk you through creating a video object, uploading your video, and understanding key features and best practices.

Steps to Create and Upload a Video

  1. Create a Video Object:

    • Think of a video object as a container or placeholder for your video. Initially, it’s an empty shell with an ID and basic asset details, ready to be populated with your video content.
  2. Upload the Video:

    • Once the video object is created, you can upload your video file into this container.

Example: Using Curl for Video Upload

For a practical example of uploading a video using curl, please refer to the detailed tutorial here.

Key Information

Video Quality and Encoding

  • Streams: The encoded video includes up to 6 different streams, ranging from 240p to 4K resolution.
  • Containers:
    • HLS container using H.264 format.
    • MP4 version with H.264, reflecting the highest quality available from the source.

Video Size Limitations

  • Maximum File Size: Videos can be up to 30 GiB.
  • Compression: Videos are compressed to meet delivery standards, supporting up to 4K resolution with H.264 at 60fps and AAC audio.

360° Video Support

  • Panoramic Videos: Supports 360° panoramic videos, which can be enabled after the upload process.

Video Access Management

  • Privacy Settings: Videos can be initially set as public or private. This setting can be changed later by updating the video object.

Progressive Upload

  • Chunked Upload: Allows for videos to be uploaded in segments, which is particularly useful for large files.

Recommendations for Optimal Upload

For the best results, your video should conform to these specifications:

  • Resolution: Up to 4K
  • Video Codec: H.264
  • Bitrate:
    • Up to 1080p: Max 16 Mbps
    • Greater than 1080p up to 4K: Max 50 Mbps
  • Color Space: Standard Dynamic Range (yuv420p)
  • Framerate: Up to 60fps
  • Audio Codec: AAC

Limitations and Considerations

Sandbox Environment

  • Video Duration: Uploads are limited to 30 seconds.
  • Watermark: A watermark will be added to videos, which cannot be removed.
  • Storage: Videos are automatically deleted after 24 hours.
  • Empty Containers: Video containers without content are removed after 7 days.

Progressive Upload Details

  • Single Chunk: Videos uploaded in one chunk must be between 0 and 200 MiB.
  • Multiple Chunks:
    • Up to 10,000 chunks.
    • Each chunk should be between 5 MiB and 200 MiB, except the last chunk which can be between 0 and 200 MiB.
  • Time Constraints: Videos must be uploaded, downloaded, or copied within 7 days (168 hours).
  • Size and Duration:
    • Maximum file size: 30 GiB
    • Maximum video length: 24 hours
  • Unsupported Codec: ProRes RAW is not supported at this time.

Managing Video Access

By default, video objects are created as public. To set a video as private, either create it as a private object initially or update it later. For more details on managing private videos, check out our guide on Private Videos.

Creating a Video with Metadata

$ curl https://ws.api.video/videos \
-H 'Authorization: Bearer {access_token}' \
-d '{"title" : "My video", "description" : "so many details", "mp4Support" : true}'

Creating a Video from a URL

To create a video from a URL, use the following command:

$ curl https://ws.api.video/videos \
-H 'Authorization: Bearer {access_token}' \
-d '{"source":"http://uri/to/video.mp4", "title":"My video"}'

The service will respond with 202 Accepted, and the video will be processed asynchronously.

For further details and advanced features, please consult the Teyuto Video API documentation.