Transforms

Audio

View Markdown

Introduction

Audio tasks let you extract, transcode, and manipulate audio from video and audio files.

You can use audio tasks to:

  • Extract audio tracks from video files
  • Convert audio to different formats (MP3, AAC, WAV, OGG, FLAC, ALAC)
  • Trim audio to specific segments
  • Adjust quality settings

Creating an audio task

Provide a url and set kind to audio. All processing options go inside the options object.

curl -X POST "https://api.ittybit.com/tasks" \
-H "Authorization: Bearer ITTYBIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "url": "https://example.com/video.mp4",
  "kind": "audio",
  "options": {
    "format": "mp3",
    "quality": "high"
  }
}'

Audio options

Audio tasks support the following optional properties inside the options object:

OptionTypeDescription
formatstringOutput format: mp3, aac, wav, ogg, flac, alac
qualitystringQuality level: very_low, low, medium, high, very_high
startnumberStart time in seconds
endnumberEnd time in seconds

Format

The output audio format.

{
  "url": "https://example.com/audio.wav",
  "kind": "audio",
  "options": { "format": "mp3" }
}

Available formats: mp3, aac, wav, ogg, flac, alac.


Quality

The desired quality of the output audio.

{
  "url": "https://example.com/audio.wav",
  "kind": "audio",
  "options": { "quality": "high" }
}

Available values: very_low, low, medium, high, very_high.


Start / End

Trim the audio to a specific time range in seconds.

{
  "url": "https://example.com/podcast.mp3",
  "kind": "audio",
  "options": { "start": 30.0, "end": 120.0 }
}

Supported inputs

Audio tasks work with:

  • Audio files: .mp3, .m4a, .wav, .ogg, .aac, .flac
  • Video files with audio tracks: .mp4, .mov, .webm

Video

Speech

On this page