Video Encoding
H.264 Encoding API — perceptual, cost-efficient encoding
A neural network makes frame-level encoding decisions, so you hit your target quality at a lower bitrate — cheaper delivery, same eyes-on quality.
Before & after
See the difference
Drag the handle — the picture is identical, but the encoded file is roughly 200× smaller.


What it does
Conventional encoders apply the same rules to every frame. Ours analyzes each frame the way a viewer sees it: where the eye looks gets the bits, motion and texture get what they need, and flat regions give bandwidth back. The result is predictable VMAF at a lower bitrate — measurable savings on delivery and storage, without a quality debate.
Full API referenceimport requests
url = "https://api.mlslabs.io/v1/h264-encoding/jobs"
resp = requests.post(
url,
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"input": "s3://bucket/master.mp4",
"output": "s3://bucket/mezzanine/",
"quality_target": {"metric": "vmaf", "score": 93},
"preset": "streaming",
},
)
job = resp.json()
print(job["job_id"])Key features
Why teams pick this API
Perceptual decision engine
Per-frame analysis picks reference structure and quantization where the eye looks, not uniformly.
VMAF-aware quality control
Encode to a target VMAF score instead of a fixed bitrate, with predictable output size.
Presets for every pipeline
Gaming, streaming, short-form and archive presets tuned per content type.
Scale without re-encoding
Object-storage in, object-storage out, with async jobs and webhook callbacks.
Use cases
Built for real workflows
OTT & CDN delivery
Cut delivery bills by encoding to measured quality instead of worst-case bitrates.
Live & VOD repackaging
Transcode on ingest and on archive, with presets that respect each content type.
Archive compression
Compress master libraries while keeping VMAF above your preservation threshold.
Pricing
Credit-based pricing
Every request draws from your credit pool. This API bills 15 credits per minute of output video.
| Billing unit | Cost in credits | Notes |
|---|---|---|
| Processing time | 15 credits | Per minute of output video |
| Failed jobs | 0 credits | Credits auto-refunded |
| Batch processing | Same rate | One queue, per-file callbacks |
Learn
Guides, tutorials & comparisons
Batch Compress Videos
Batch compress videos and reduce file size across a library: quality-targeted H.264 encodes, per-fil...
Read TutorialTranscode a Short Drama Library
Transcode a short-drama library to streaming-ready H.264: folder batches, per-file status, size and ...
Read TutorialBuild an Adaptive Bitrate Ladder
Build an adaptive bitrate ladder for HLS and DASH: choose renditions by resolution and bitrate, enco...
Read TutorialCompress Video Without Losing Quality
Compress video without visible quality loss: use quality-targeted encoding (CRF/VMAF) instead of bli...
Read TutorialConvert Video to H.264 in Go
Convert video to H.264 in Go with the mlslabs encoding API: choose CRF or target VMAF, get a streami...
Read TutorialConvert Video to H.264 in Node.js
Convert video to H.264 in Node.js with the mlslabs encoding API: choose CRF or target VMAF, get a st...
ReadH.264 vs AV1: The 2026 Codec Decision
H.264 vs AV1 compared: compression efficiency, encode/decode speed, hardware support, royalty landsc...
Read GuideH.264 vs H.265: Which Codec Should You Ship?
H.264 vs H.265/HEVC in 2026: compression efficiency, encoding cost, patent pools, hardware support —...
Read GuidePerceptual Encoding Explained
Perceptual video encoding explained: how encoders exploit human vision (masking, sensitivity curves,...
Read GuideVBR vs CBR: Which Bitrate Mode Should You Use?
VBR vs CBR explained: what constant and variable bitrate really mean, when each mode is required (br...
ReadFAQ
Common questions
How is this different from FFmpeg presets?
FFmpeg applies fixed rules; our engine makes per-frame perceptual decisions to spend bits where viewers see them — typically 15-30% lower bitrate at the same VMAF.
Which quality metrics do you support?
VMAF targets today, with PSNR/SSIM available for tooling compatibility.
Can I get a speed tier?
Yes — faster presets trade some efficiency for lower latency; good for live pipelines.
Do you also do H.265?
Yes — the same perceptual engine is available as the H.265 Encoding API.
Related APIs