Create HLS streams
“Chalkboard” (a course platform like Teachable) hosts 2-hour lectures. Students on slow connections need adaptive bitrate streaming — the player adjusts quality based on bandwidth.
API
ittybit adaptive \
-i https://chalkboard-app.com/courses/cs101/lecture-1.mov \
--format hls \
--cloudconst task = {
input: "https://chalkboard-app.com/courses/cs101/lecture-1.mov",
kind: "adaptive_video",
options: {
format: "hls",
},
};
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://chalkboard-app.com/courses/cs101/lecture-1.mov",
"kind": "adaptive_video",
"options": {
"format": "hls",
},
}
res = requests.post(
"https://api.ittybit.com/tasks",
headers={"Authorization": f"Bearer {api_key}"},
json=task,
)
data = res.json()TASK='{
"input": "https://chalkboard-app.com/courses/cs101/lecture-1.mov",
"kind": "adaptive_video",
"options": {
"format": "hls"
}
}'
curl -X POST https://api.ittybit.com/tasks \
-H "Authorization: Bearer $ITTYBIT_API_KEY" \
-H "Content-Type: application/json" \
-d "$TASK" This produces an HLS manifest (.m3u8) with multiple quality variants. The player picks the right one automatically.
CLI
ittybit adaptive \
-i lecture-1.mov \
-o lecture-1.m3u8
Trim before streaming
Only need the first 30 minutes of a 2-hour recording:
ittybit adaptive \
-i lecture-1.mov \
-o lecture-1.m3u8 \
--start 0 \
--end 1800
When to use HLS
| Scenario | Format |
|---|---|
| Long-form content (lectures, webinars) | HLS |
| Short clips (< 2 min) | MP4 |
| Downloads / offline | MP4 |
| Live-ish playback on varied connections | HLS |
For short videos, a single MP4 is simpler and works everywhere. HLS pays off when content is long and viewers have varying bandwidth.