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.

VideoEncoding

Before & after

See the difference

Drag the handle — the picture is identical, but the encoded file is roughly 200× smaller.

H.264 · 6 Mbps
RAW · 1.2 Gbps
RAW · 1.2 GbpsH.264 · 6 Mbps
Bitrate1.2 Gbps6 Mbps
File size · 10 min90 GB450 MB
Visual qualityReferenceVisually lossless

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 reference
Python
import 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 unitCost in creditsNotes
Processing time15 creditsPer minute of output video
Failed jobs0 creditsCredits auto-refunded
Batch processingSame rateOne queue, per-file callbacks

See credit packs & full pricing

Learn

Guides, tutorials & comparisons

Browse all tutorials

FAQ

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.