Video Streaming & Transcoding

Video streaming without the complexity

Transcode, stream, merge—all from your CDN. Upload any video and get HLS streams with adaptive bitrate, thumbnails, watermarks, and global delivery.

$0.005 / minute transcoding + $0.05 / GB streaming

Uploading...
2:34
product-demo.mp448 MB
0%
How It Works

Three steps to streaming

From upload to playback in minutes, not hours

Step 1

Upload to CDN

Upload your video to Stack0 CDN. Any format, any size.

Step 2

Transcode to HLS

Choose your quality variants. We handle the encoding.

Step 3

Stream anywhere

Get HLS URLs ready for any player. Adaptive quality included.

transcode.ts
import { Stack0 } from '@stack0/sdk';
const stack0 = new Stack0({ apiKey: process.env.STACK0_API_KEY });
// 1. Upload video to CDN first
const asset = await stack0.cdn.upload({
projectSlug: 'my-project',
file: videoBuffer,
filename: 'course-video.mp4',
mimeType: 'video/mp4',
});
// 2. Transcode to HLS for adaptive streaming
const job = await stack0.cdn.transcode({
projectSlug: 'my-project',
assetId: asset.id,
outputFormat: 'hls',
variants: [
{ quality: '480p', codec: 'h264' },
{ quality: '720p', codec: 'h264' },
{ quality: '1080p', codec: 'h264' },
],
webhookUrl: 'https://yourapp.com/webhook',
});
// 3. Check job status
const status = await stack0.cdn.getJob(job.id);
console.log(`Progress: ${status.progress}%`);
// 4. Get streaming URLs when complete
const urls = await stack0.cdn.getStreamingUrls(asset.id);
console.log(urls.hlsUrl); // HLS master playlist
console.log(urls.mp4Urls); // Direct MP4 downloads
console.log(urls.thumbnails); // Generated thumbnails
Capabilities

Complete video toolkit

Everything you need for video processing, streaming, and delivery

HLS Streaming

Automatic HLS transcoding with .m3u8 playlists. Adaptive quality switching based on viewer bandwidth.

Multi-Resolution

Generate 360p to 4K quality variants automatically. One upload, all formats ready.

Video Merge

Combine multiple videos and images into one. Add audio overlays, create slideshows.

Watermarks

Add image or text watermarks during transcode. Control position and opacity.

Thumbnails

Extract frames at any timestamp. Generate preview images in JPG, PNG, or WebP.

Audio Extraction

Extract audio tracks as MP3, AAC, or WAV. Perfect for podcasts from video content.

HLS Streaming

Adaptive bitrate streaming

HLS (HTTP Live Streaming) automatically adjusts video quality based on your viewer's bandwidth. No buffering, no quality drops—just smooth playback.

360p
800 kbps
Mobile data saver
480p
1.4 Mbps
Standard mobile
720p
2.8 Mbps
HD streaming
1080p
5 Mbps
Full HD
1440p
8 Mbps
2K displays
2160p
16 Mbps
4K Ultra HD

Players automatically switch between quality levels based on viewer bandwidth. Works with HLS.js, Video.js, and native Safari.

Player Integration

Works with any HLS player

Drop-in integration with HLS.js, Video.js, or native Safari playback

player.tsx
import Hls from 'hls.js';
const urls = await stack0.cdn.getStreamingUrls('asset-id');
const video = document.getElementById('video') as HTMLVideoElement;
if (Hls.isSupported() && urls.hlsUrl) {
const hls = new Hls();
hls.loadSource(urls.hlsUrl);
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED, () => {
video.play();
});
} else if (video.canPlayType('application/vnd.apple.mpegurl')) {
// Safari native HLS
video.src = urls.hlsUrl!;
}
Video Merge

Combine videos, images, and audio

Create compilations, photo slideshows with music, or merge clips programmatically. Full control over timing, transitions, and output.

Video compilations
Photo slideshows
Audio overlays
Trim & clip
merge.ts
// Create photo slideshow with music
const slideshow = await stack0.cdn.createMergeJob({
projectSlug: 'my-project',
inputs: [
{ assetId: 'photo-1', duration: 3 },
{ assetId: 'photo-2', duration: 3 },
{ assetId: 'photo-3', duration: 3 },
{ assetId: 'photo-4', duration: 3 },
],
audioTrack: {
assetId: 'background-music',
loop: true,
fadeIn: 1,
fadeOut: 2,
},
output: {
format: 'mp4',
quality: '1080p',
filename: 'slideshow.mp4',
},
});
// Combine video clips
const compilation = await stack0.cdn.createMergeJob({
projectSlug: 'my-project',
inputs: [
{ assetId: 'intro-video' },
{ assetId: 'main-footage', startTime: 30, endTime: 90 },
{ assetId: 'title-card-image', duration: 5 },
{ assetId: 'outro-video', endTime: 10 },
],
output: { format: 'mp4', quality: '1080p' },
});
Transcoding Options

Full control over encoding

Output Formats

HLS
Adaptive streaming with .m3u8 playlists
MP4
Progressive download, universal compatibility

Codec Support

H.264
Maximum compatibility (default)
H.265 (HEVC)
Better compression, 4K optimized
options.ts
// Transcode with watermark
const watermarked = await stack0.cdn.transcode({
projectSlug: 'my-project',
assetId: asset.id,
outputFormat: 'hls',
variants: [{ quality: '1080p', codec: 'h264' }],
watermark: {
type: 'image',
imageAssetId: 'logo-asset-id',
position: 'bottom-right',
opacity: 50,
},
});
// Transcode with trimming
const trimmed = await stack0.cdn.transcode({
projectSlug: 'my-project',
assetId: asset.id,
outputFormat: 'mp4',
variants: [{ quality: '720p', codec: 'h264' }],
trim: {
start: 10, // Start at 10 seconds
end: 60, // End at 60 seconds
},
});

Thumbnail Generation

Extract frames at specific timestamps for previews, galleries, and video navigation.

  • Any timestamp extraction
  • JPG, PNG, WebP formats
  • Custom dimensions

Audio Extraction

Extract audio tracks from videos. Perfect for creating podcasts from video content.

  • MP3, AAC, WAV output
  • Custom bitrate control
  • Podcast-ready audio
utils.ts
// Generate thumbnail at specific timestamp
const thumbnail = await stack0.cdn.getThumbnail({
assetId: asset.id,
timestamp: 10.5, // 10.5 seconds
width: 640,
format: 'webp',
});
// Extract audio from video
const audio = await stack0.cdn.extractAudio({
projectSlug: 'my-project',
assetId: asset.id,
format: 'mp3',
bitrate: 192,
});
Use Cases

Built for your video needs

From course platforms to marketing tools

Course Platforms

Upload lectures, transcode to HLS, deliver multiple quality levels to students worldwide.

  • Multi-quality streaming for varying connections
  • Watermark course content
  • Chapter thumbnails for navigation

User-Generated Content

Process uploaded videos automatically. Consistent quality and format across all uploads.

  • Auto-transcode on upload
  • Content moderation friendly
  • Consistent delivery format

Marketing Videos

Create compilations, add branded watermarks, merge clips for promotional content.

  • Merge multiple clips
  • Brand watermarking
  • Social media optimized formats

Internal Tools

Training video libraries, meeting recordings, internal documentation with video.

  • Secure streaming
  • Training video management
  • Meeting recording processing

Part of Stack0 CDN

Video streaming is integrated with Stack0 CDN. Upload to CDN, transcode for streaming—same SDK, same dashboard, same billing. No separate video service to manage.

Pricing

Simple, usage-based pricing

Pay for transcoding minutes and streaming bandwidth. No hidden fees.

Transcoding
$0.005/ minute

HLS & MP4 transcoding with adaptive bitrate.

HLS & MP4 output
Up to 4K resolution
Auto quality variants
Streaming
$0.05/ GB

Video streaming bandwidth via global CDN.

Global CDN delivery
Low latency playback
Unlimited viewers
Audio
$0.002/ minute

Audio extraction and format conversion.

MP3 & AAC output
Extract from video
Podcast ready
Get Started

Start with $5 free credits. No credit card required.

Ready to start streaming?

Upload your first video and get HLS streams in minutes. Transcoding, streaming, merge—all included.