Source
R2 bucket or URL
Qencode pulls your source video from an R2 bucket (or any URL).
Encode and store video on Cloudflare R2 with zero egress fees.
Qencode integrates with Cloudflare R2 as both a source and destination for video transcoding jobs. R2 provides an S3-compatible API with a standout feature: zero egress fees. Pull source video from any R2 bucket, transcode it, and write the output back automatically. Combined with Cloudflare’s global edge network and Workers for custom logic, R2 eliminates the unpredictable egress costs that make video delivery expensive on other platforms.
R2 bucket or URL
Qencode pulls your source video from an R2 bucket (or any URL).
Transcode & package
Qencode transcodes, encrypts, and packages the video per your job configuration.
Destination bucket
Encoded files are written directly to your destination R2 bucket.
Via Cloudflare edge
Serve via Cloudflare's edge network with a custom domain, or use Workers for access control.
In the Cloudflare dashboard, navigate to R2 and create a new bucket. Connect a custom domain or use the R2.dev subdomain for public access.
This step is completed in the Cloudflare dashboard — see R2 documentation
In the Cloudflare dashboard, go to R2 → Manage R2 API Tokens and create an API token with Object Read & Write permissions scoped to your bucket. Note the Access Key ID and Secret Access Key.
Store your API token as an environment variable. Never commit credentials to source control.
In Transcode Media, go to Third-Party Storage, then choose Generic S3. Enter your Bucket Name, Endpoint, Access Key ID, and Secret Access Key.
In your API request, set the destination parameter to your R2 bucket URL with the desired output path. Use the S3-compatible endpoint format.
After the job completes, check your R2 bucket for the encoded files. Qencode sends a webhook notification when writing is complete.
MP4 output to Cloudflare R2
{
"query": {
"source": "https://[account_id].r2.cloudflarestorage.com/my-source-bucket/folder/input.mov",
"format": [
{
"output": "mp4",
"destination": {
"url": "s3://[account_id].r2.cloudflarestorage.com/my-bucket/folder/output.mp4",
"key": "YOUR_ACCOUNT_KEY",
"secret": "YOUR_ACCOUNT_SECRET"
}
}
]
}
}Replace placeholder credentials with your actual R2 Access Key ID and Secret Access Key. Use environment variables in production.
For a step-by-step walkthrough, see Tutorial: Cloudflare R2 Integration
Qencode transcoding (HLS, H.264)
~$1.80
R2 Storage (1 GB encoded output)
~$0.015/mo
Cloudflare delivery (100 viewers × 1 GB)
$0.00 (zero egress)
Low-cost B2 storage with free egress to Cloudflare
Reduce file sizes with AI-driven analysis
Encrypt R2-stored content with Widevine, FairPlay, and PlayReady
We love creating powerful solutions that are aligned with the needs of your business.
Please send us a message if you have a question or Schedule a call for a demo to discuss your integration.
Contact us with any questions. We'd love to help.
Los Angeles, CA - (HQ)
San Francisco, CA
New York, NY