Create a CDN resource for video streaming
Overview
Use CDB Video CDN to deliver live streams and video-on-demand content globally without transcoding. This guide walks you through creating a CDN resource optimized for video delivery.
When to use Video CDN
You should use video CDN when:
- You already have HLS, DASH, or FLV streams ready
- You handle transcoding on your own servers
- You need global delivery at scale (thousands to millions of viewers)
- You want advanced CDN features:
- Geo-blocking by country
- Secure token authentication
- Custom domains
- Origin shielding
- You want to reduce origin bandwidth costs
Supported formats:
- HLS (
.m3u8playlists,.tsor.m4ssegments) - MPEG-DASH (
.mpdmanifests) - HTTP-FLV (
.flvstreams) - MP4 (progressive download, VOD only)
Example scenarios:
- You run a media server (Wowza, Nginx-RTMP, SRS) producing HLS
- You're migrating from another CDN (Cloudflare, AWS, etc.)
- You need geo-restrictions for broadcasting rights
- You want to offload bandwidth from your origin
Quick setup (4 steps)
Step 1: Request streaming activation
Required first step: Video streaming requires legal approval from CDB support.
Contact CDB Support or use the chat in the bottom-right corner. Provide:
- Your Client ID (found on the main page of CDB Technical Web Portal)
- Domain name and company name
- Content type: Sports, education, entertainment, news, etc.
- Sample stream URL: Example of your typical stream format
- Viewer geography: Where your audience is located
- Broadcasting license or content compliance policy
Processing time: Usually 1-2 business days

Step 2: Activate paid CDN plan
Video streaming requires a paid CDN subscription:
- Navigate to CDN in the Customer Portal
- If you're on the free plan, upgrade to:
- Start (1.5 TB included traffic)
- Pro (5 TB included traffic)
Pricing: Pay for bandwidth delivered to viewers. View pricing details
Step 3: Create CDN resource
Once streaming is activated by support, create your CDN resource:
- Go to CDN > CDN Resources
- Click Create CDN Resource
- Configure the resource (for static assets):
Origin settings:
- Origin type: Your server
- Origin address: Your media server domain or IP
- Example:
live.example.comor192.0.2.1
- Example:
- Origin protocol: HTTP or HTTPS (match your origin)
CDN resource name:
- Choose a custom domain:
video.yourdomain.com - Or use auto-generated:
123456.gcdn.co
- Click Create CDN Resource
Detailed guide: Create a CDN resource for static assets (same process for video)
Step 4: Configure caching rules
Optimize caching for video delivery:
Basic cache configuration for live streams:
Step 1: Enable "Always online" (Recommended)
- Go to CDN Resource > Cache
- Enable "Always online" with these settings:
- Check error (serve stale cache if origin returns errors)
- Check timeout (serve stale cache if origin times out)
- ⚠️ Uncheck "updating" (important - conflicts with internal optimizations)
Why enable Always online?
- Protects viewers from origin failures
- If origin goes down, CDN serves cached content instead of error pages
- Improves reliability and uptime
Important: Uncheck the "updating" option for optimal live streaming performance. When excluded, the CDN can deliver video chunks more efficiently, reducing buffering and ensuring smoother playback. Only enable "error" and "timeout".
Step 2: Set resource-level cache (for segments)
- Still in CDN Resource > Cache
- Set CDN cache expiry time: 60 seconds
- This caches all content (except manifests, see below) for 60 seconds
- If you use DVR, increase this to match your DVR window (e.g., 30 minutes)
Step 3: Create manifest caching rule
- Go to CDN Resource > Rules
- Click Create Rule > Enter manually:
- Rule name:
manifests - Pattern:
^/.+\.(m3u8|mpd|ism)$(regex for manifest files) - Cache time: 2 seconds
- Browser cache: 0 seconds (no browser caching for manifests)
- Rule name:
- Click Create rule
Why these values?
- Segments (60s): Balances freshness with cache efficiency. Longer than segment duration for slow connections.
- Manifests (2s): Very short to ensure viewers get latest segment list
- DVR adjustment: If DVR enabled, segment cache should match DVR window
Optional: LL-HLS (Low-Latency) configuration
If using LL-HLS (Low-Latency HLS):
- Go to CDN Resource > Cache
- Enable Query parameters whitelist
- Add these parameters:
_HLS_msn,_HLS_part,_HLS_skip- These are required for LL-HLS to work correctly
- All other query parameters will be ignored

Need advanced performance optimization? For high-traffic streaming or specific performance requirements, contact CDB Support to configure:
- Cache sharding: Distribute cache across multiple servers
- Cache lock timing: Optimize concurrent request handling
- Custom TTL strategies: Fine-tune cache behavior per file type
- Origin connection limits: Protect origin from traffic spikes
Step 5 (Live only): Enable LIVE STREAMING preset
For live streams only - Skip this step if you're delivering VOD.
The LIVE STREAMING preset enables RAM-based caching for reduced latency:
- Go to CDN Resources
- Click the three dots next to your video CDN resource
- Select Turn on LIVE STREAMING preset

What it does: Caches video segments in RAM instead of disk for faster delivery and lower latency.
Test your stream
Get your CDN URL
Update your stream URLs from origin to CDN:
Before (origin):
http://live.example.com/playlist.m3u8
After (CDN):
http://video.yourdomain.com/playlist.m3u8
Or with auto-generated domain:
http://123456.gcdn.co/playlist.m3u8
Test playback
Test your stream in a player that supports HLS:
- Browser: VLC Media Player
- Online: HLS.js demo player
- Mobile: Native Safari (iOS) or Chrome (Android)
Paste your CDN URL and verify playback works correctly.
Optional: Advanced configuration
Enable origin shielding
For high-traffic streams (100+ concurrent viewers), enable origin shielding:
- Go to CDN Resource > General > Origin shielding
- Toggle Enable origin shielding
- Select shield location closest to your origin
Benefit: Reduces origin requests by 80-95%, protecting your origin from traffic spikes.
Learn more: Origin Shielding
Add geo-restrictions
Restrict content by country (e.g., for broadcasting rights):
- Go to CDN Resource > Security > Country access policy
- Choose:
- Allow only: Content available only in selected countries
- Block: Content blocked in selected countries
- Select countries
- Save changes
Example: "Allow only in Dominican Republic" for regional sports rights.
Learn more: Geo-restrictions
Add secure tokens
Protect content with time-limited authenticated URLs:
- Go to CDN Resource > Security > Secure Token
- Enable and configure token settings
- Generate tokens on your backend for each user
Use cases: Paid content, private videos, time-limited previews.
Learn more: Secure Tokens
Next steps
Troubleshooting
Stream not playing
- Check origin is accessible: Test origin URL directly in browser
- Verify DNS: Ensure CNAME points to CDN (if using custom domain)
- Check cache rules: Verify
.m3u8and.tsrules are configured - Review CDN logs: Check for 4xx/5xx errors in CDN statistics
High latency
- Enable LIVE STREAMING preset: For live streams (see Step 5)
- Reduce playlist cache: Set
.m3u8cache to 1-2 seconds - Enable origin shielding: Reduces routing hops
- Contact support: For advanced latency optimization
Need help?
Contact CDB Support or use the chat in the bottom-right corner.