Create audio-only HLS streams

View Markdown

Long audio files as a single download are slow to start and waste bandwidth when listeners skip ahead. “Wavelength” (a podcast and music platform like Spotify) packages audio as HLS so playback starts instantly and seeks are efficient.

API

ittybit adaptive \
  -i https://wavelength-app.com/episodes/ep-87.wav \
  --format hls
const task = {
  input: 'https://wavelength-app.com/episodes/ep-87.wav',
  kind: 'adaptive_video',
  options: {
    format: 'hls',
  },
};

const res = await fetch('https://api.ittybit.com/jobs', {
  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://wavelength-app.com/episodes/ep-87.wav",
    "kind": "adaptive_video",
    "options": {
        "format": "hls",
    },
}

res = requests.post(
    "https://api.ittybit.com/jobs",
    headers={"Authorization": f"Bearer {api_key}"},
    json=task,
)
data = res.json()
TASK='{
  "input": "https://wavelength-app.com/episodes/ep-87.wav",
  "kind": "adaptive_video",
  "options": {
    "format": "hls"
  }
}'

curl -X POST https://api.ittybit.com/jobs \
  -H "Authorization: Bearer $ITTYBIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d "$TASK"

When the input has no video track, the output is an audio-only HLS package with segmented AAC and an .m3u8 manifest. The kind stays adaptive_video because HLS packaging is the same process regardless of whether video tracks are present.

CLI

ittybit adaptive \
  -i ep-87.wav \
  -o ep-87.m3u8

From video input

Extract audio-only HLS from a video file by disabling the video track:

ittybit adaptive \
  -i interview-raw.mp4 \
  -o interview-audio.m3u8 \
  --mute-video

Useful when the video is just a static recording screen and only the audio matters.

Multiple bitrates

Provide quality variants so the player adapts to bandwidth. This matters for listeners on cellular connections:

{
  "input": "https://wavelength-app.com/episodes/ep-87.wav",
  "kind": "adaptive_video",
  "options": {
    "format": "hls",
    "audio_bitrates": [64, 128, 256]
  }
}
Bitrate (kbps)Use case
64Low bandwidth, spoken word
128Standard podcast quality
256Music, high-fidelity audio

When HLS beats a single file

ScenarioBest format
Episodes > 10 minHLS — instant start, efficient seeking
Short clips < 2 minSingle MP3/AAC — simpler, fewer requests
Offline / downloadSingle file — no manifest needed
Adaptive bandwidthHLS — player switches bitrates automatically

For a podcast platform serving hour-long episodes, HLS eliminates the wait for a full file download before playback begins.