Cloud Service Documentation

Table of Contents

Authentication

Basic Authentication

Some endpoints require authentication using HTTP Basic Authentication.

Protected Routes Example

/files/protected/example

To access protected routes, you need to include Basic Authentication credentials in your request header:

Authorization: Basic base64(username:password)
Note: Replace username:password with your actual credentials and encode them in base64 format. For example: if your username is "user" and password is "pass", you would encode "user:pass" to base64.

Authentication Errors

Status Code Description Solution
401 Unauthorized - No credentials provided Include Basic Authentication header
403 Forbidden - Invalid credentials Check your username and password

Video Processing

Features

Usage Examples

HLS Streaming

To stream a video using HLS:

/videos/path/movie.m3u8

This will automatically:

Direct MP4 Access

To access the original MP4 file:

/videos/path/to/video.mp4

Video Processing Details

Quality Resolution Bitrate Bandwidth
480p 854x480 1000k 1 Mbps
720p 1280x720 2500k 2.5 Mbps
1080p 1920x1080 5000k 5 Mbps
Note: Video processing may take several minutes depending on the file size and quality. The API will return a processing status while the conversion is in progress.

Watermarking

To enable watermarking:

  1. Place a PNG file named watermark.png in your domain's root directory
  2. The watermark will be automatically applied to all processed videos
  3. Watermark specifications:
    • Height: 20px (width maintains aspect ratio)
    • Position: Bottom-left corner
    • Margins: 20px from left and bottom edges

Audio Processing

Features

Supported Formats

Format Input Output
MP3 Yes Yes (DASH Streaming)
AAC Yes Yes (DASH Streaming)
WAV Yes Converted to AAC
OGG Yes Converted to AAC
FLAC Yes Converted to AAC

Usage Examples

DASH Audio Streaming

To stream an audio file using DASH:

/audios/path/audio.mpd

This will automatically:

Direct Audio Access

To access the original audio file:

/audios/path/to/audio.mp3

Audio Processing Details

Quality Bitrate Format Use Case
Low 64 kbps AAC Mobile data saving
Medium 128 kbps AAC Standard quality
High 320 kbps AAC High quality audio
Note: Audio processing may take several minutes depending on the file size and quality. The API will return a processing status (202 Accepted) while the conversion is in progress. The DASH manifest and segments will be available at audio_[FILENAME]_dash/manifest.mpd.

Image Processing

Features

Supported Formats

Format Features Processing
JPEG/JPG
  • Quality adjustment
  • Resizing
  • Format conversion
  • Watermarking
Full processing with caching
PNG
  • Transparency support
  • Resizing
  • Format conversion
  • Watermarking
Full processing with caching
GIF
  • Animation support
  • Frame optimization
  • Direct serving
Direct serving (no processing)
SVG
  • Vector graphics
  • Scalable resolution
  • Direct serving
Direct serving (no processing)
WebP
  • Modern format
  • Better compression
  • Animation support
Full processing with caching
Note about GIF and SVG: These formats are served directly without processing to maintain their special features (animation for GIF, vector scaling for SVG).

Image Processing URL Format

/images/path/to/image.jpg?width=800&height=600
Available Parameters:
Note: Processed images are automatically cached for improved performance. The cache is created with a "_none" suffix for all formats except SVG and GIF.

File Handling

Features

File Access URL Format

/files/path/to/file.ext

Error Handling

The service provides proper error responses:

Security Note: All file access is validated and sanitized to prevent directory traversal attacks.