Encode video with H.265/HEVC
“Vault” (a video backup app like Backblaze) wants to compress archived footage. H.265 (HEVC) produces files ~30% smaller than H.264 and plays natively on Apple devices and modern Android.
API
ittybit video \
-i https://vault-app.com/archives/family-video.mov \
--codec h265 \
--format mp4 \
--quality high \
--cloudconst task = {
input: "https://vault-app.com/archives/family-video.mov",
kind: "video",
options: {
codec: "h265",
format: "mp4",
quality: "high",
},
};
const res = await fetch("https://api.ittybit.com/tasks", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.ITTYBIT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify(task),
});
const data = await res.json();import requests
task = {
"input": "https://vault-app.com/archives/family-video.mov",
"kind": "video",
"options": {
"codec": "h265",
"format": "mp4",
"quality": "high",
},
}
res = requests.post(
"https://api.ittybit.com/tasks",
headers={"Authorization": f"Bearer {api_key}"},
json=task,
)
data = res.json()TASK='{
"input": "https://vault-app.com/archives/family-video.mov",
"kind": "video",
"options": {
"codec": "h265",
"format": "mp4",
"quality": "high"
}
}'
curl -X POST https://api.ittybit.com/tasks \
-H "Authorization: Bearer $ITTYBIT_API_KEY" \
-H "Content-Type: application/json" \
-d "$TASK" CLI
ittybit video \
-i family-video.mov \
-o family-video-h265.mp4 \
--codec h265 \
--quality high
When to use H.265 vs H.264
| H.264 | H.265 | |
|---|---|---|
| File size | Baseline | ~30% smaller |
| Browser support | Universal | Safari, Edge, Chrome (partial) |
| Mobile support | Everything | iOS, modern Android |
| Encode speed | Fast | Slower |
| Best for | Web playback | Apps, Apple ecosystem, archives |
H.265 for mobile apps
If your app plays video in a native player (not a browser), H.265 is the sweet spot — smaller than H.264, better supported than AV1 on mobile:
ittybit video \
-i upload.mov \
-o mobile.mp4 \
--codec h265 \
--width 1080 \
--quality high
Dual encode for web + mobile
ittybit video \
-i upload.mov \
-o web.mp4 \
--codec h264 \
--quality high
ittybit video \
-i upload.mov \
-o mobile.mp4 \
--codec h265 \
--quality high